From adrian.dimulescu@free.fr Sat Feb 08 18:25:46 2003 Received: from postfix4-1.free.fr ([213.228.0.62]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18hXnW-00055d-00 for ; Sat, 08 Feb 2003 18:25:46 +0200 Received: from lns-p19-26-62-147-247-88.adsl.proxad.net (lns-p19-26-62-147-247-88.adsl.proxad.net [62.147.247.88]) by postfix4-1.free.fr (Postfix) with ESMTP id 1512C15F3C for ; Sat, 8 Feb 2003 16:27:12 +0100 (CET) From: Adrian Petru Dimulescu To: users@millstone.org Date: Sat, 8 Feb 2003 16:27:24 +0100 User-Agent: KMail/1.5 MyWishForYou: Have AWonderful Day! MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200302081627.24735.adrian.dimulescu@free.fr> Subject: [Users] accessing local file Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hello, I am currently developping a Millstone UI which can be configured using an XML file located at WEB-INF/config/userconfigs.xml . The problem is I don't know how to access that file in a web application-location independent way (not by specifying /usr/local/tomcat/... or C:\Program Files\Apache Group\... but in a way relative to the path of the webapp. While I can do that when using a servlet, I don't see how to access the underlying servlet support of Millstone. Thank you, Adrian. From Joonas.Lehtinen@itmill.com Sat Feb 08 19:00:27 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18hYL5-00059Z-00 for ; Sat, 08 Feb 2003 19:00:27 +0200 Received: from tower.yok.utu.fi ([130.232.128.192] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18hXA2-0002WY-00 for ; Sat, 08 Feb 2003 17:44:58 +0200 Message-ID: <3E4529E6.7090406@itmill.com> Date: Sat, 08 Feb 2003 18:01:42 +0200 From: Joonas Lehtinen Organization: IT Mill Ltd. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: fi, en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] accessing local file References: <200302081627.24735.adrian.dimulescu@free.fr> In-Reply-To: <200302081627.24735.adrian.dimulescu@free.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hi, You are right, current Web Adapter does not provide servlet context path to application, because: - We can not guarantee that such directory would be available on other adapters. - As defined in the Servlet spec, the access to WEB-INF folder is not guaranteed. If the application is WAR packaged, there is no file-level access at all -- the access is done trough named resources requested from the context. Instead of getting the paths from servlet context, the paths should be given as context parameters. Context parameters can be accessed through org.millstone.base.Application.getProperty(String). Anyway - we will consider adding access to servlet context in the future versions. Please post a feature-request about it to bugzilla.millstone.org. I hope this helps. Best regards, Joonas Lehtinen Adrian Petru Dimulescu wrote: >Hello, > >I am currently developping a Millstone UI which can be configured using an XML >file located at WEB-INF/config/userconfigs.xml . > >The problem is I don't know how to access that file in a web >application-location independent way (not by specifying >/usr/local/tomcat/... or C:\Program Files\Apache Group\... but in a way >relative to the path of the webapp. > >While I can do that when using a servlet, I don't see how to access the >underlying servlet support of Millstone. > >Thank you, >Adrian. > >_______________________________________________ >Users mailing list >Users@millstone.org >http://community.millstone.org/mailinglists/listinfo/users > > From Joonas.Lehtinen@itmill.com Sun Feb 09 17:29:18 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18htOQ-0007W6-00 for ; Sun, 09 Feb 2003 17:29:18 +0200 Received: from tower.yok.utu.fi ([130.232.128.192] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18hsDJ-0005qn-00 for ; Sun, 09 Feb 2003 16:13:45 +0200 Message-ID: <3E46660C.1000106@itmill.com> Date: Sun, 09 Feb 2003 16:30:36 +0200 From: Joonas Lehtinen Organization: IT Mill Ltd. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: fi, en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] accessing local file References: <200302081627.24735.adrian.dimulescu@free.fr> <3E4529E6.7090406@itmill.com> <200302081843.16810.adrian.dimulescu@free.fr> In-Reply-To: <200302081843.16810.adrian.dimulescu@free.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Yes, read-only access to resources is possible. I recommend ClassResource - it might be more appropriate for your purpose. Or of cource you can access your file using class-loader directly. -- Joonas Adrian Petru Dimulescu wrote: >>I hope this helps. >> >> > >It does help, thank you. > >I wonder if I cannot access a local file looking at it as at a resource >though, perhaps like a "theme" resource ? > > > From adrian.dimulescu@free.fr Sat Feb 22 15:19:23 2003 Received: from postfix4-2.free.fr ([213.228.0.176]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18mZYp-0004Vm-00 for ; Sat, 22 Feb 2003 15:19:23 +0200 Received: from kati (lns-th2-4f-81-56-215-133.adsl.proxad.net [81.56.215.133]) by postfix4-2.free.fr (Postfix) with ESMTP id C7068C0CE for ; Sat, 22 Feb 2003 13:19:23 +0100 (CET) From: "Adrian Petru Dimulescu" To: Date: Sat, 22 Feb 2003 13:19:05 +0100 Message-ID: <000001c2da6c$a1351950$1e13190a@kati> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: [Users] image buttons Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hello, is it possible to render images instead of standard HTML buttons ? ; Sat, 22 Feb 2003 16:49:47 +0200 Received: from tower.yok.utu.fi ([130.232.128.192] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18ma1v-00006E-00 for ; Sat, 22 Feb 2003 15:49:27 +0200 Message-ID: <3E577FED.7070808@itmill.com> Date: Sat, 22 Feb 2003 15:49:33 +0200 From: Joonas Lehtinen Organization: IT Mill Ltd. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: fi, en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] image buttons References: <000001c2da6c$a1351950$1e13190a@kati> In-Reply-To: <000001c2da6c$a1351950$1e13190a@kati> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Yes. If you set the caption to be empty and the button to have an icon, the icon is rendered alone to achieve desired result. -- Joonas Adrian Petru Dimulescu wrote: >Hello, > >is it possible to render images instead of standard HTML buttons ? > > >instead of > > >The interface I am developing right now with millstone tends to have >lots of embedded forms (given the ease of constructing them :) and >really lots of buttons which takes up quite a lot of space on the page >economy. > >Thank you, >Adrian. > > > >_______________________________________________ >Users mailing list >Users@millstone.org >http://community.millstone.org/mailman/listinfo/users > > From hans-petter.ruud@hakon.no Mon Feb 24 12:07:33 2003 Received: from nic.ica.se ([194.71.243.66]) by hydra.itmill.com with smtp (Exim 3.35 #1 (Debian)) id 18nFWH-0000Mw-00 for ; Mon, 24 Feb 2003 12:07:33 +0200 Received: (qmail 18618 invoked from network); 24 Feb 2003 09:03:22 -0000 Received: from unknown (HELO icase02.ica.se) (10.100.6.134) by nic.ica.se with SMTP; 24 Feb 2003 09:03:22 -0000 Received: from oshk_h01.home.hakon.no ([10.128.1.27]) by icase02.ica.se (Lotus Domino Release 5.0.11) with ESMTP id 2003022410061732:22686 ; Mon, 24 Feb 2003 10:06:17 +0100 To: users@millstone.org X-Mailer: Lotus Notes Release 5.0.3 (France) 21 March 2000 Message-ID: From: "Hans-Petter Ruud" Date: Mon, 24 Feb 2003 10:06:46 +0100 MIME-Version: 1.0 X-MIMETrack: Serialize by Router on OSHK_H01/HAKON/NO(Release 5.0.10 |March 22, 2002) at 24.02.2003 10:06:56, Itemize by SMTP Server on ICASE02/Server/ICA/SE(Release 5.0.11 |July 24, 2002) at 2003-02-24 10:06:17, Serialize by Router on ICASE02/Server/ICA/SE(Release 5.0.11 |July 24, 2002) at 2003-02-24 10:06:18, Serialize complete at 2003-02-24 10:06:18 Content-type: text/plain; charset=us-ascii Subject: [Users] Modal dialog boxes/windows Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hello, We are currently developing a web-based application using the Millstone UI framework. The application is specified to be used with Internet Explorer 5.x or higher. We are looking for ways to have the possibility to have new windows created by the main application to be openend in a modal way. By looking in the "default.js" file it seems you have thought about modal windows, but have not implemented the code for it(see line#218 in default.js in the Millstone-3.0.2 library). It feels natural for us to use the javascript methods showModalDialog() and/or the showModelessDialog() as they are supported by Internet Explorer 4.x and higher. After digging into the Millstone UI code we discovered that opening and handling new windows was done by a call in the windows.xsl() file to the windowScript() function in the ThemeFunctionLibrary.java which is part of the Millstone webadapter. Of course - we could update the code in the webadapter to support different ways of opening windows/dialogs(normal, modal, modeless), instead of just using the javascript window.open method. But we are trying to avoid modifying the millstone core components, and are trying to keep it "simple" by only expanding the default theme(in this case the .xsl files) when it comes to creating new functionality. We would like to achieve beeing able to do something like this: Window myWindow = new Window(); myWindow.setStyle("modal"); (Or expanding the webadapter to support: Window myWindow = new Window(); myWindow.setModal(true); ... but again thats exactly what we are trying to avoid :) Any ideas/opinions on this? Thanks, Hans-Petter Ruud From sami.ekblad@itmill.com Mon Feb 24 15:58:58 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18nJ8E-0000jq-00 for ; Mon, 24 Feb 2003 15:58:58 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18nIBk-0000Ek-00 for ; Mon, 24 Feb 2003 14:58:32 +0200 Message-ID: <3E5A1711.7090901@itmill.com> Date: Mon, 24 Feb 2003 14:58:57 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] Modal dialog boxes/windows References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hi, Actually, the earlier Millstone versions included API for modal windows, but due to browser incompability (and tight schedule) this feature was eventually left out from 3.0 release. The main problems were: - The modal API is supported by IE, and somehow it should be emulated in other browsers. - Late setting of modal property is not supported by browsers. (i.e. the API like setModal(boolean) would be functional only before the window is actually visible. This might be acceptable.) - Even in IE the modal dialogs are treated differently (for example links do not work like in normal windows) Your suggestion about using the style-property to control the modality might be useful. I have quickly tested it and it might work in your case. However as a partial solution, it is not included in the default-theme and if you like to test it, I suggest you to implement this style into your own theme extending the default-theme. Like: 1. Create a theme of your own. (Refer the 'stoneplayer' example application for details how this can be done). 2. Create new custom xsl-template with match="window[@style='modal']". (you may copy/paste the template from the window.xsl file in default-theme and change only the match-attribute) 3. Add BODY focus handler, by adding the following xsl-statement right after the BODY tag: window.focus() 4. Set the application to use your custom theme: app.setTheme("mytheme") This emulates the modality, by switching the focus back to the modal window whenever it loses the focus. It has its limitations, but at least in IE it seems so be quite useful. n general, we try to find more elegant and more compatible solution to be included in the distribution. Unfortunately, so far we have not found any good solution and therefore any suggestions are very welcome... :) Regards, -- Sami Ekblad Oy IT Mill Ltd www.itmill.com Hans-Petter Ruud wrote: > Hello, > > We are currently developing a web-based application using the Millstone UI framework. > The application is specified to be used with Internet Explorer 5.x or higher. > > We are looking for ways to have the possibility to have new windows created by the main application > to be openend in a modal way. > > By looking in the "default.js" file it seems you have thought about modal windows, but have not > implemented the code for it(see line#218 in default.js in the Millstone-3.0.2 library). > > It feels natural for us to use the javascript methods showModalDialog() and/or the showModelessDialog() > as they are supported by Internet Explorer 4.x and higher. > > After digging into the Millstone UI code we discovered that opening and handling new windows > was done by a call in the windows.xsl() file to the > windowScript() function in the ThemeFunctionLibrary.java which is part of the Millstone webadapter. > > > Of course - we could update the code in the webadapter to support different ways of opening > windows/dialogs(normal, modal, modeless), instead of just using the javascript window.open method. > > But we are trying to avoid modifying the millstone core components, and are trying to keep it "simple" by > only expanding the default theme(in this case the .xsl files) when it comes to creating new functionality. > > > > We would like to achieve beeing able to do something like this: > > Window myWindow = new Window(); > myWindow.setStyle("modal"); > > > (Or expanding the webadapter to support: > > Window myWindow = new Window(); > myWindow.setModal(true); > > ... but again thats exactly what we are trying to avoid :) > > > > Any ideas/opinions on this? > > > Thanks, > Hans-Petter Ruud From hans-petter.ruud@hakon.no Tue Feb 25 14:32:57 2003 Received: from nic.ica.se ([194.71.243.66]) by hydra.itmill.com with smtp (Exim 3.35 #1 (Debian)) id 18neGX-0002wO-00 for ; Tue, 25 Feb 2003 14:32:57 +0200 Received: (qmail 8346 invoked from network); 25 Feb 2003 11:28:54 -0000 Received: from unknown (HELO icase02.ica.se) (10.100.6.134) by nic.ica.se with SMTP; 25 Feb 2003 11:28:54 -0000 Received: from oshk_h01.home.hakon.no ([10.128.1.27]) by icase02.ica.se (Lotus Domino Release 5.0.11) with ESMTP id 2003022512315010:25457 ; Tue, 25 Feb 2003 12:31:50 +0100 Subject: Re: [Users] Modal dialog boxes/windows To: users@millstone.org X-Mailer: Lotus Notes Release 5.0.3 (France) 21 March 2000 Message-ID: From: "Hans-Petter Ruud" Date: Tue, 25 Feb 2003 12:32:21 +0100 MIME-Version: 1.0 X-MIMETrack: Serialize by Router on OSHK_H01/HAKON/NO(Release 5.0.10 |March 22, 2002) at 25.02.2003 12:32:29, Itemize by SMTP Server on ICASE02/Server/ICA/SE(Release 5.0.11 |July 24, 2002) at 2003-02-25 12:31:50, Serialize by Router on ICASE02/Server/ICA/SE(Release 5.0.11 |July 24, 2002) at 2003-02-25 12:31:50, Serialize complete at 2003-02-25 12:31:50 Content-type: text/plain; charset=us-ascii Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hi again, The emulated modality does not work when the opened window contains one or more form elements for user input. When one of the form elements attains focus, the onBlur event on the window is triggered, and the window gets focus again, thus not allowing any data to be entered in the form element. Regards, Hans-Petter Sami Ekblad cc: (bcc: Hans-Petter Ruud/HAKON/NO) Subject: Re: [Users] Modal dialog boxes/windows 24.02.2003 13:58 Please respond to users Hi, Actually, the earlier Millstone versions included API for modal windows, but due to browser incompability (and tight schedule) this feature was eventually left out from 3.0 release. The main problems were: - The modal API is supported by IE, and somehow it should be emulated in other browsers. - Late setting of modal property is not supported by browsers. (i.e. the API like setModal(boolean) would be functional only before the window is actually visible. This might be acceptable.) - Even in IE the modal dialogs are treated differently (for example links do not work like in normal windows) Your suggestion about using the style-property to control the modality might be useful. I have quickly tested it and it might work in your case. However as a partial solution, it is not included in the default-theme and if you like to test it, I suggest you to implement this style into your own theme extending the default-theme. Like: 1. Create a theme of your own. (Refer the 'stoneplayer' example application for details how this can be done). 2. Create new custom xsl-template with match="window[@style='modal']". (you may copy/paste the template from the window.xsl file in default-theme and change only the match-attribute) 3. Add BODY focus handler, by adding the following xsl-statement right after the BODY tag: window.focus() 4. Set the application to use your custom theme: app.setTheme("mytheme") This emulates the modality, by switching the focus back to the modal window whenever it loses the focus. It has its limitations, but at least in IE it seems so be quite useful. n general, we try to find more elegant and more compatible solution to be included in the distribution. Unfortunately, so far we have not found any good solution and therefore any suggestions are very welcome... :) Regards, -- Sami Ekblad Oy IT Mill Ltd www.itmill.com Hans-Petter Ruud wrote: > Hello, > > We are currently developing a web-based application using the Millstone UI framework. > The application is specified to be used with Internet Explorer 5.x or higher. > > We are looking for ways to have the possibility to have new windows created by the main application > to be openend in a modal way. > > By looking in the "default.js" file it seems you have thought about modal windows, but have not > implemented the code for it(see line#218 in default.js in the Millstone-3.0.2 library). > > It feels natural for us to use the javascript methods showModalDialog() and/or the showModelessDialog() > as they are supported by Internet Explorer 4.x and higher. > > After digging into the Millstone UI code we discovered that opening and handling new windows > was done by a call in the windows.xsl() file to the > windowScript() function in the ThemeFunctionLibrary.java which is part of the Millstone webadapter. > > > Of course - we could update the code in the webadapter to support different ways of opening > windows/dialogs(normal, modal, modeless), instead of just using the javascript window.open method. > > But we are trying to avoid modifying the millstone core components, and are trying to keep it "simple" by > only expanding the default theme(in this case the .xsl files) when it comes to creating new functionality. > > > > We would like to achieve beeing able to do something like this: > > Window myWindow = new Window(); > myWindow.setStyle("modal"); > > > (Or expanding the webadapter to support: > > Window myWindow = new Window(); > myWindow.setModal(true); > > ... but again thats exactly what we are trying to avoid :) > > > > Any ideas/opinions on this? > > > Thanks, > Hans-Petter Ruud _______________________________________________ Users mailing list Users@millstone.org http://community.millstone.org/mailman/listinfo/users ------------------------------------------------------------------------------- This verifies that this e-mail has been scanned for virus and deemed virus-free according to F-Secure Content Scanner 5.0 Mon, 24 Feb 2003 14:58:57 +0200 GMT ------------------------------------------------------------------------------- From Joonas.Lehtinen@itmill.com Tue Feb 25 15:07:37 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18neo5-000307-00 for ; Tue, 25 Feb 2003 15:07:37 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18ndrY-0004h1-00 for ; Tue, 25 Feb 2003 14:07:08 +0200 Message-ID: <3E5B5C7C.1040909@itmill.com> Date: Tue, 25 Feb 2003 14:07:24 +0200 From: Joonas Lehtinen Organization: IT Mill Ltd. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: fi, en-us, en MIME-Version: 1.0 To: users@millstone.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [Users] Custom datasources, anyone Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hi folks, I am interested in various ideas for Millstone data sources (Property, Item and Container data models) you have had. In addition to the implementations included in org.millstone.base.data.util.* (bean item, filesystem container, method property and various memory based implementations) I have seen people implementing the following: - Excel sheet container: can be directly connected to Table-component for trivial spreadsheet functionality. Supports R/W. - IMAP container for connecting to mail servers and browsing mail folders and emails ( http://community.millstone.org/themes/img/native-1.gif ) - NNTP container for browsing and reading usenet news - JDBC containers for interacting with databases - Properties Item that uses java.util.Properties for data storage Any other interesting ideas for datasource implementations, anyone? Some of the interesting container possibilities might be DOM-tree hierarchical container and LDAP containers might be handy. JDBC and EJB containers are so essential that I wish that they will be part of org.millstone.base.data.* in future. -- Joonas PS. If you did not have a clue on what I am talking about, please see http://www.millstone.org/documentation/apidocs/org/millstone/base/data/package-summary.html From sami.ekblad@itmill.com Fri Feb 28 12:06:43 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18ohPf-00018b-00 for ; Fri, 28 Feb 2003 12:06:43 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18ogSy-0001HL-00 for ; Fri, 28 Feb 2003 11:06:04 +0200 Message-ID: <3E5F26A9.7040103@itmill.com> Date: Fri, 28 Feb 2003 11:06:49 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] Modal dialog boxes/windows References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hi, Ok, unfortunately you seem to be right. :( However, I found some ideas how to get around this. I'll test the stuff and send you more information later. Regards, -- Sami Ekblad Oy IT Mill Ltd www.itmill.com Hans-Petter Ruud wrote: > Hi again, > > The emulated modality does not work when the opened window contains > one or more form elements for user input. > > When one of the form elements attains focus, the onBlur event on the window is > triggered, and the window gets focus again, thus not allowing any data to be > entered in the form element. > > Regards, > Hans-Petter From adrian.dimulescu@free.fr Fri Feb 28 14:50:12 2003 Received: from postfix3-2.free.fr ([213.228.0.169]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18ojxs-0001RH-00 for ; Fri, 28 Feb 2003 14:50:12 +0200 Received: from imp2-1.free.fr (imp2-1.free.fr [213.228.0.22]) by postfix3-2.free.fr (Postfix) with ESMTP id 400C0C1F8 for ; Fri, 28 Feb 2003 12:50:23 +0100 (CET) Received: by imp2-1.free.fr (Postfix, from userid 33) id 1F89958045; Fri, 28 Feb 2003 12:50:18 +0100 (CET) To: users@millstone.org Message-ID: <1046433016.3e5f4cf8b61d6@imp.free.fr> Date: Fri, 28 Feb 2003 12:50:16 +0100 (CET) From: adrian.dimulescu@free.fr MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.6 X-Originating-IP: 212.81.100.66 Subject: [Users] message box Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hello, Is it possible in the current version to display a MessageBox-like popup window with a little message and Ok/Cancel buttons? And if so, is it be possible to write something like : if (MessageBox(....) == OK) ? Thank you, Adrian. From adrian.dimulescu@free.fr Wed Mar 05 17:31:41 2003 Received: from postfix3-1.free.fr ([213.228.0.44]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18qart-0000g4-00 for ; Wed, 05 Mar 2003 17:31:41 +0200 Received: from imp5-1.free.fr (imp5-1.free.fr [213.228.0.64]) by postfix3-1.free.fr (Postfix) with ESMTP id B27E4C2B7 for ; Wed, 5 Mar 2003 15:32:00 +0100 (CET) Received: by imp5-1.free.fr (Postfix, from userid 33) id 89EBB8C0A1; Wed, 5 Mar 2003 15:31:50 +0100 (CET) To: users@millstone.org Message-ID: <1046874710.3e660a56340cf@imp.free.fr> Date: Wed, 05 Mar 2003 15:31:50 +0100 (CET) From: adrian.dimulescu@free.fr MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.6 X-Originating-IP: 212.81.100.66 Subject: [Users] message box (again :) Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hello, I'll reformulate the last question, obviously it was not very explicite. I am trying to show message boxes to the user. I saw that one can manipulate windows but as far as I could see (the feature demo included) an open window must be closed from its parent, not from some button on itself; that is unacceptable for most MessageBoxes. If one tries to close the window from a button located, say, on that very windows, a strange behaviour occures, that is to say one ends up with to windows with the same content. I seem to remember somebody else on the list having the same problem; or is it just me ? I also noted, while browsing the Javadoc, a class called UserError which looks pretty neat. Alas, I have no idea how to use it. Apparently I cannot attach it to my MainWindow nor can I send some kind of show() message to it. Thank you for your time, Adrian. From adrian.dimulescu@free.fr Thu Mar 06 20:57:26 2003 Received: from postfix4-2.free.fr ([213.228.0.176]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18r0YY-0003Ph-00 for ; Thu, 06 Mar 2003 20:57:26 +0200 Received: from imp2-2.free.fr (imp2-2.free.fr [213.228.0.152]) by postfix4-2.free.fr (Postfix) with ESMTP id BB421C1B0 for ; Thu, 6 Mar 2003 18:57:43 +0100 (CET) Received: by imp2-2.free.fr (Postfix, from userid 33) id 859048C062; Thu, 6 Mar 2003 18:57:43 +0100 (CET) To: millstone-users@sourceforge.net Message-ID: <1046971642.3e6784fa44a62@imp.free.fr> Date: Thu, 06 Mar 2003 18:27:22 +0100 (CET) From: adrian.dimulescu@free.fr MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.6 Resent-Date: Thu, 06 Mar 2003 18:57:43 +0100 (CET) Resent-From: adrian.dimulescu@free.fr Resent-To: users@millstone.org Resent-Message-ID: <1046973463.3e678c176a7f9@imp.free.fr> X-Originating-IP: 212.81.100.66 Subject: [Users] millstone user's guide Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hi, is there any (even incomplete) version of the Millstone user's or developer's guide available ? Thanks, Adrian. From sami.ekblad@itmill.com Fri Mar 07 11:41:42 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18rEMH-0004rP-00 for ; Fri, 07 Mar 2003 11:41:41 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18rDPE-0008Rf-00 for ; Fri, 07 Mar 2003 10:40:40 +0200 Message-ID: <3E685B4E.4000103@itmill.com> Date: Fri, 07 Mar 2003 10:41:50 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] message box (again :) References: <1046874710.3e660a56340cf@imp.free.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hi, > I am trying to show message boxes to the user. I saw that one can manipulate > windows but as far as I could see (the feature demo included) an open window > must be closed from its parent, not from some button on itself; that is > unacceptable for most MessageBoxes. This is a known bug, and it has already been fixed in stable branch (cvs tag 'version-3_0'). The fix will also be included in the next release (3.0.3) in near future. If you are looking for a way to present normal javascript dialog (like confirm), it can be implemented as a theme for Button or Select component. Just drop me email and show you how to do this. This solution comes from the fact that the confirmation (i.e. yes/no selection) is logically the same as button click or selection change. :) > I also noted, while browsing the Javadoc, a class called UserError which looks > pretty neat. Alas, I have no idea how to use it. Apparently I cannot attach it > to my MainWindow nor can I send some kind of show() message to it. User error is used in components to I far I recall, the Window component theme does not implement the error messages (certainly it should, I think). The AbstractComponent class implements setComponentError method which can be used to assign errors to components. Demo of this feature can also be found in FeatureBrowser. Regards, -- Sami Ekblad Oy IT Mill Ltd www.itmill.com From sami.ekblad@itmill.com Fri Mar 07 12:07:25 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18rElB-0004uM-00 for ; Fri, 07 Mar 2003 12:07:25 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18rDo7-00007C-00 for ; Fri, 07 Mar 2003 11:06:23 +0200 Message-ID: <3E68615A.50009@itmill.com> Date: Fri, 07 Mar 2003 11:07:38 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] millstone user's guide References: <1046971642.3e6784fa44a62@imp.free.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: adrian.dimulescu@free.fr wrote: > is there any (even incomplete) version of the Millstone user's or developer's > guide available ? There are some early drafts (based on previous versions of Millstone), but nothing that can be published. :( There are some tutorials, documents and faq (and this maililing list :) available at millstone.org, but the work to combine this scattered information into single manual is only in very early stage. The "Millstone Manual" is something urgently needed, but as our resources are limited, some help would be appreciated. If you (or somebody else) are interested in participating in this effort, please let me know. (Everyone who contributes will get a neat Millstone mug ;) Regards, -- Sami Ekblad Oy IT Mill Ltd www.itmill.com From adrian.dimulescu@free.fr Fri Mar 07 19:24:44 2003 Received: from [212.81.100.72] (helo=srvmailav.kertel.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18rLaO-0005fO-00 for ; Fri, 07 Mar 2003 19:24:44 +0200 Received: from srvxchange.kertel.com (unverified) by srvmailav.kertel.com (Content Technologies SMTPRS 4.1.5) with ESMTP id for ; Fri, 7 Mar 2003 17:16:40 +0100 Received: by srvxchange.kertel.com with Internet Mail Service (5.5.2650.21) id ; Fri, 7 Mar 2003 17:23:35 +0100 Received: from free.fr (DSI0049009 [10.100.77.9]) by srvxchange.kertel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id G1NDLZDN; Fri, 7 Mar 2003 17:23:35 +0100 From: Adrian Petru Dimulescu To: users@millstone.org Message-ID: <3E68C787.5070106@free.fr> Date: Fri, 07 Mar 2003 17:23:35 +0100 User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [Users] sorting a container Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hello, does anybody happen to have some examples of sorting a simple container? (like a Select containing String's, but even more complicated are welcome) Thanks, Adrian. From emile@iris-advies.nl Sun Mar 09 16:08:56 2003 Received: from amsfep16-int.chello.nl ([213.46.243.26]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18s1U0-0001eD-00 for ; Sun, 09 Mar 2003 16:08:56 +0200 Received: from iris-advies.nl ([213.93.99.224]) by amsfep16-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with ESMTP id <20030309130851.SBXO10275.amsfep16-int.chello.nl@iris-advies.nl> for ; Sun, 9 Mar 2003 14:08:51 +0100 Message-ID: <3E6B3CE3.8000406@iris-advies.nl> Date: Sun, 09 Mar 2003 14:08:51 +0100 From: Emiliano Heyns User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [Users] Dependencies Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Still stuck with the dependency tracking stuff... If I have a menu with three entries, 'linking' to three separate panels, would I have to register a dependency from those menu entries to each and every control on these panels? I do not know up front how many controls, or what type even, will be on those panels. The user interface is decided upon at runtime, driven by an XML configuration file. Additionally, some of these controls will have immediate mode set; should I register a dependency on all sibling controls that are non-immediate? All sibling controls? What about controls on other panels? I like millstone a lot, ease of use in general and great looks and functionality, but unless I can somehow automate my way out of this dependency tracking bit... I still don't fully understand the need for dependency tracking, I guess. Frameworks like Echo or wingS seem to be able to do without. Emile From sami.ekblad@itmill.com Mon Mar 10 13:50:36 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18sLng-0003im-00 for ; Mon, 10 Mar 2003 13:50:36 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18sKqS-0003yZ-00 for ; Mon, 10 Mar 2003 12:49:24 +0200 Message-ID: <3E6C6E0B.4080309@itmill.com> Date: Mon, 10 Mar 2003 12:50:51 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] sorting a container References: <3E68C787.5070106@free.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Adrian Petru Dimulescu wrote: > Hello, > > does anybody happen to have some examples of sorting a simple container? > (like a Select containing String's, but even more complicated are welcome) There are at least couple of ways to do this. The easiest way to get sorted Select entries is to construct the Select using a sorted collection of items (strings in the simplest case) and use the utilities provided by java.util.Collections to sort the collections. The basic data interfaces do include sorting functions, but implementing your own SortedContainer (backed up by some collection) with sorting capabilities should be straight-forward. Take a look for example IndexedContainer in org.millstone.base.data.util package. Regards, -- Sami Ekblad Oy IT Mill Ltd www.itmill.com From emile@iris-advies.nl Mon Mar 10 21:10:58 2003 Received: from amsfep14-int.chello.nl ([213.46.243.22]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18sSfp-0004gt-00 for ; Mon, 10 Mar 2003 21:10:58 +0200 Received: from iris-advies.nl ([213.93.99.224]) by amsfep14-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with SMTP id <20030310181055.WRHM643.amsfep14-int.chello.nl@iris-advies.nl> for ; Mon, 10 Mar 2003 19:10:55 +0100 Received: by iris-advies.nl (sSMTP sendmail emulation); Mon, 10 Mar 2003 19:10:54 +0100 From: Emiliano Date: Mon, 10 Mar 2003 19:10:54 +0100 To: users@millstone.org Message-ID: <20030310181054.GA2052@iris-advies.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Subject: [Users] Dependencies [repost] Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Sorry for the repost, but this issue is really urgent for me. I must make a decision about what framewrok to use really soon. I would personally prefer Millstone (as said, works, looks good, easy to use), but I must get these dependency questions resolved. So, without further ado.... Still stuck with the dependency tracking stuff... If I have a menu with three entries, 'linking' to three separate panels, would I have to register a dependency from those menu entries to each and every control on these panels? I do not know up front how many controls, or what type even, will be on those panels. The user interface is decided upon at runtime, driven by an XML configuration file. Additionally, some of these controls will have immediate mode set; should I register a dependency on all sibling controls that are non-immediate? All sibling controls? What about controls on other panels? I like millstone a lot, ease of use in general and great looks and functionality, but unless I can somehow automate my way out of this dependency tracking bit... I still don't fully understand the need for dependency tracking, I guess. Frameworks like Echo or wingS seem to be able to do without. Emile From sami.ekblad@itmill.com Tue Mar 11 11:30:36 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18sg5k-00068i-00 for ; Tue, 11 Mar 2003 11:30:36 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18sf8T-0008TF-00 for ; Tue, 11 Mar 2003 10:29:21 +0200 Message-ID: <3E6D9ECC.1030600@itmill.com> Date: Tue, 11 Mar 2003 10:31:08 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] Dependencies References: <3E6B3CE3.8000406@iris-advies.nl> In-Reply-To: <3E6B3CE3.8000406@iris-advies.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Emiliano Heyns wrote: > Still stuck with the dependency tracking stuff... > > If I have a menu with three entries, 'linking' to three separate panels, > would I have to register a dependency from those menu entries to each > and every control on these panels? I do not know up front how many > controls, or what type even, will be on those panels. The user interface > is decided upon at runtime, driven by an XML configuration file. Try to make a helper function for creating the components runtime, which sets up the dependencies correctly, or alternatively create the dependent components as last component and make all other field dependant of this. > Additionally, some of these controls will have immediate mode set; > should I register a dependency on all sibling controls that are > non-immediate? All sibling controls? What about controls on other panels? If the immediate mode is used in some control to commit data edited in some other (possibly non-immediate) fields it should then depend on these fields. Button is a good example of immediate component, which should depend on all fields that are required to execute the button handler currectly. > I like millstone a lot, ease of use in general and great looks and > functionality, but unless I can somehow automate my way out of this > dependency tracking bit... I know, what you mean. However, there is no good way to do this in totally generic way. So my suggestion is that you create function for constructing components which require a dependency be assigned to them. > I still don't fully understand the need for dependency tracking, I > guess. Frameworks like Echo or wingS seem to be able to do without. All Millstone components are event driven (no visible fetch-process- render cycle), which in general is good, but might be little confusing in the web environment. From the components point of view events in single web page occur at the exactly same time (the time of HTTP request), and there must be a way to tell the order of the events. There is no generic way to tell the absolute order of these concurrent events, and therefore in Millstone you _can_ explicitely assign that order usings the dependsOn-function. Real-world example: Think of a form consisting of username and password and login button. Typically there is a button handler to do username password verification, and this requires that there are valid data in these fields. OK, the button click triggers a page fetch, which sends three events to server: username change , password change and the button click itself - at the same time. In which order we should process the fields events? The correct order in this case is obvious: username, password changes before the button click. But from components point of view there are only events whithout any order. So, the solutions is to add explicit order: Button depends on username and password. Other solutions might include automatic sorting based on their visual order, containment hierarchy, component type or even javascripting, but all seem to be partial solutions (which could be easily programmed) so the solution was not to specify any implicit ordering. Note that, this depends on is only meaningful in case of events havings the exactly same timestamp. Otherwise the events are processed in the order they occur. Regards, -- Sami Ekblad Oy IT Mill Ltd www.itmill.com From emile@iris-advies.nl Tue Mar 11 12:17:26 2003 Received: from amsfep14-int.chello.nl ([213.46.243.22]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18sgp4-0006DR-00 for ; Tue, 11 Mar 2003 12:17:26 +0200 Received: from iris-advies.nl ([213.93.99.224]) by amsfep14-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with SMTP id <20030311091724.NGZS643.amsfep14-int.chello.nl@iris-advies.nl> for ; Tue, 11 Mar 2003 10:17:24 +0100 Received: by iris-advies.nl (sSMTP sendmail emulation); Tue, 11 Mar 2003 10:17:24 +0100 From: Emiliano Date: Tue, 11 Mar 2003 10:17:24 +0100 To: users@millstone.org Subject: Re: [Users] Dependencies Message-ID: <20030311091724.GB3283@iris-advies.nl> References: <3E6B3CE3.8000406@iris-advies.nl> <3E6D9ECC.1030600@itmill.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E6D9ECC.1030600@itmill.com> User-Agent: Mutt/1.3.28i Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: On Tue, Mar 11, 2003 at 10:31:08AM +0200, Sami Ekblad wrote: > >If I have a menu with three entries, 'linking' to three separate panels, > >would I have to register a dependency from those menu entries to each > >and every control on these panels? I do not know up front how many > >controls, or what type even, will be on those panels. The user interface > >is decided upon at runtime, driven by an XML configuration file. > > Try to make a helper function for creating the components runtime, > which sets up the dependencies correctly, or alternatively > create the dependent components as last component and make > all other field dependant of this. That's what I was figuring... but I don't control the order of the components. I've decided that sibling dependencies are easy enough. But: > >Additionally, some of these controls will have immediate mode set; > >should I register a dependency on all sibling controls that are > >non-immediate? All sibling controls? What about controls on other panels? > > If the immediate mode is used in some control to commit data edited > in some other (possibly non-immediate) fields it should then depend on > these fields. > > Button is a good example of immediate component, which should depend > on all fields that are required to execute the button handler currectly. The problem (for me) is that form elements should be able to block the user from selecting another menu entry if one of the components on the 'current' page doesn't validate... so the way I see it, I would have to create a dependency from each menu entry to each and every component on *each* of the panes. Aside from the code involved, I worry about the performance when dealing with such a large number of dependencies (easily 5 * 100). I was thinking about using forms, which may complicate the sibling dependencies a bit but would probably make menu-entry -> components dependencies less of a nightmare. Still not clear on how flexible form elements are, but I'll be experimenting to find out. > Real-world example: > > Think of a form consisting of username and password and login button. > Typically there is a button handler to do username password > verification, and this requires that there are valid data in > these fields. > > OK, the button click triggers a page fetch, which sends three > events to server: username change , password change and the button > click itself - at the same time. In which order we should process > the fields events? None, in my case. I don't need the username and password change events. I just need them to have the values I typed in. I don't have handlers registered to them, either. The only event I need is the button click. If I need to undo the changes to the text fields, the original data is available in the database. Would that be possible? For components that don't have listeners, move them to the front of the dependency list and just update their values? > Note that, this depends on is only meaningful in case of events havings > the exactly same timestamp. Otherwise the events are processed in the > order they occur. Right, but the web env is the only one that matters to me. Plus, it's the only available adapter at this time. Emile From sami.ekblad@itmill.com Tue Mar 11 13:53:13 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18siJl-0006Nq-00 for ; Tue, 11 Mar 2003 13:53:13 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18shMU-0000sA-00 for ; Tue, 11 Mar 2003 12:51:58 +0200 Message-ID: <3E6DC02D.2030602@itmill.com> Date: Tue, 11 Mar 2003 12:53:33 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] Dependencies References: <3E6B3CE3.8000406@iris-advies.nl> <3E6D9ECC.1030600@itmill.com> <20030311091724.GB3283@iris-advies.nl> In-Reply-To: <20030311091724.GB3283@iris-advies.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Emiliano wrote: > The problem (for me) is that form elements should be able to block the > user from selecting another menu entry if one of the components on the > 'current' page doesn't validate... so the way I see it, I would have to > create a dependency from each menu entry to each and every component on > *each* of the panes. Aside from the code involved, I worry about the > performance when dealing with such a large number of dependencies > (easily 5 * 100). First, it is enough to make te menu (Tree) component dependant of other components, not single items. This dependency would mean something like "menu (change) events depend on other components events being already processed". > I was thinking about using forms, which may complicate the sibling > dependencies a bit but would probably make menu-entry -> components > dependencies less of a nightmare. Still not clear on how flexible form > elements are, but I'll be experimenting to find out. If the Form is not what you want, it is not so complicated to create your own "form" component having the properties relevant to you. What I mean is that it could simply be implemented as CustomComponent having some appropriate layout as composition root, and which assigns the dependencies (like the Form's addField-function does). Then it is adequete to make the menu dependent of these custom form components, and allow/disallow menu change based on the field values. >> OK, the button click triggers a page fetch, which sends three >> events to server: username change , password change and the button >> click itself - at the same time. In which order we should process >> the fields events? > > None, in my case. I don't need the username and password change events. > I just need them to have the values I typed in. I don't have handlers > registered to them, either. The only event I need is the button click. > If I need to undo the changes to the text fields, the original data is > available in the database. Yes you need. :) What I actually ment was: The change events sent by the _browser_ (not the events sent to handlers registered to components). To clarify: I was talking about different events: The change events the browser sends to component to change its value. Not the handler events sent to someone who listening the component changes. If you don't sort out these browser events, the values in the field may change after the button has been clicked. Certainly not the desired behaviour. > Would that be possible? For components that don't have listeners, move > them to the front of the dependency list and just update their values? So, you mean events to "passive" components are handled prior to events to "active" components? >>Note that, this depends on is only meaningful in case of events havings >>the exactly same timestamp. Otherwise the events are processed in the >>order they occur. > > Right, but the web env is the only one that matters to me. Plus, it's > the only available adapter at this time. Yes, and this case the dependencies are not required for components which are not accessible at the same time (i.e. they appear in different pages) and cannot send client events concurrently. Regards, -- Sami Ekblad Oy IT Mill Ltd www.itmill.com From emile@iris-advies.nl Tue Mar 11 15:18:05 2003 Received: from amsfep16-int.chello.nl ([213.46.243.26]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18sjdt-0006Wb-00 for ; Tue, 11 Mar 2003 15:18:05 +0200 Received: from iris-advies.nl ([213.93.99.224]) by amsfep16-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with SMTP id <20030311121803.SFNZ10275.amsfep16-int.chello.nl@iris-advies.nl> for ; Tue, 11 Mar 2003 13:18:03 +0100 Received: by iris-advies.nl (sSMTP sendmail emulation); Tue, 11 Mar 2003 13:18:03 +0100 From: Emiliano Date: Tue, 11 Mar 2003 13:18:03 +0100 To: users@millstone.org Subject: Re: [Users] Dependencies Message-ID: <20030311121803.GA3686@iris-advies.nl> References: <3E6B3CE3.8000406@iris-advies.nl> <3E6D9ECC.1030600@itmill.com> <20030311091724.GB3283@iris-advies.nl> <3E6DC02D.2030602@itmill.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E6DC02D.2030602@itmill.com> User-Agent: Mutt/1.3.28i Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: On Tue, Mar 11, 2003 at 12:53:33PM +0200, Sami Ekblad wrote: > >The problem (for me) is that form elements should be able to block the > >user from selecting another menu entry if one of the components on the > >'current' page doesn't validate... so the way I see it, I would have to > >create a dependency from each menu entry to each and every component on > >*each* of the panes. Aside from the code involved, I worry about the > >performance when dealing with such a large number of dependencies > >(easily 5 * 100). > > First, it is enough to make te menu (Tree) component dependant of > other components, not single items. This dependency would mean something > like "menu (change) events depend on other components events being > already processed". OK. > If the Form is not what you want, it is not so complicated to create > your own "form" component having the properties relevant to you. Oh no, not that slippery slope again :) This happens to me *every* *single* *time*. I need some tech to get a problem fixed, notice a few things I want different, bam, I'm on the dev list :) > What I mean is that it could simply be implemented as CustomComponent > having some appropriate layout as composition root, and which assigns > the dependencies (like the Form's addField-function does). Then it > is adequete to make the menu dependent of these custom form components, > and allow/disallow menu change based on the field values. So if I do something like this, what event will my CustomComponent get before the menu event fires? > >None, in my case. I don't need the username and password change events. > > I just need them to have the values I typed in. I don't have handlers > > registered to them, either. The only event I need is the button click. > > If I need to undo the changes to the text fields, the original data is > > available in the database. > > Yes you need. :) > What I actually ment was: The change events sent by the _browser_ > (not the events sent to handlers registered to components). > > To clarify: I was talking about different events: The change events the > browser sends to component to change its value. Not the handler events > sent to someone who listening the component changes. > > If you don't sort out these browser events, the values in the field may > change after the button has been clicked. Certainly not the desired > behaviour. > > >Would that be possible? For components that don't have listeners, move > >them to the front of the dependency list and just update their values? > > So, you mean events to "passive" components are handled prior to events > to "active" components? Right. That's how the other frameworks seem to handle it. I've experimented a little with Echo{point}, and it can handle these things without event ordering. I suppose that if you have a listener to the button *and* the textfield that falls on it's face. Hmm. Anyhow, I've got a pretty good start in Millstone and I'd prefer to keep it that way. BTW, is there a Millstone tutorial on authoring new components? Echo{point} has a collapsable thingy that's pretty neat. > >Right, but the web env is the only one that matters to me. Plus, it's > >the only available adapter at this time. > > Yes, and this case the dependencies are not required for components > which are not accessible at the same time (i.e. they appear in > different pages) and cannot send client events concurrently. Or in my case, are *potentially* accessible at the same time. Emile From emile@iris-advies.nl Thu Mar 13 17:58:47 2003 Received: from amsfep15-int.chello.nl ([213.46.243.28]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18tV6V-0002zW-00 for ; Thu, 13 Mar 2003 17:58:47 +0200 Received: from iris-advies.nl ([213.93.99.224]) by amsfep15-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with SMTP id <20030313145849.IVRJ2811.amsfep15-int.chello.nl@iris-advies.nl> for ; Thu, 13 Mar 2003 15:58:49 +0100 Received: by iris-advies.nl (sSMTP sendmail emulation); Thu, 13 Mar 2003 15:58:49 +0100 From: Emiliano Date: Thu, 13 Mar 2003 15:58:49 +0100 To: users@millstone.org Subject: Re: [Users] Dependencies Message-ID: <20030313145849.GA11868@iris-advies.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Again, excuses for the repost, but time is pressing, and if I don't have a demo soon I'll need to switch to echo, or worse, hand-generated IE pages :< On Tue, Mar 11, 2003 at 12:53:33PM +0200, Sami Ekblad wrote: > What I mean is that it could simply be implemented as CustomComponent > having some appropriate layout as composition root, and which assigns > the dependencies (like the Form's addField-function does). Then it > is adequete to make the menu dependent of these custom form > components, > and allow/disallow menu change based on the field values. So if I do something like this, what event will my CustomComponent get before the menu event fires? BTW, is there a Millstone tutorial on authoring new components? Echo{point} has a collapsable thingy that's pretty neat. > >Right, but the web env is the only one that matters to me. Plus, it's > >the only available adapter at this time. > > Yes, and this case the dependencies are not required for components > which are not accessible at the same time (i.e. they appear in > different pages) and cannot send client events concurrently. Or in my case, are *potentially* accessible at the same time. Emile From sami.ekblad@itmill.com Thu Mar 13 19:05:06 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18tW8g-00036I-00 for ; Thu, 13 Mar 2003 19:05:06 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18tVBI-0003z4-00 for ; Thu, 13 Mar 2003 18:03:44 +0200 Message-ID: <3E70AC5C.5020505@itmill.com> Date: Thu, 13 Mar 2003 18:05:48 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] Dependencies References: <20030313145849.GA11868@iris-advies.nl> In-Reply-To: <20030313145849.GA11868@iris-advies.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Emiliano wrote: >>What I mean is that it could simply be implemented as CustomComponent >>having some appropriate layout as composition root, and which assigns >>the dependencies (like the Form's addField-function does). Then it >>is adequete to make the menu dependent of these custom form >>components, >>and allow/disallow menu change based on the field values. > > So if I do something like this, what event will my CustomComponent ge > before the menu event fires? To clear out the "form" component I suggested, I wrote you a simple panel-like component, which depends on every component added to it using the provided addComponent-function: public class DependentPanel extends CustomComponent { private OrderedLayout layout = new OrderedLayout(); public DependentPanel() { setCompositionRoot(layout); } public void addComponent(Component c) { this.dependsOn(c); // Note this! layout.addComponent(c); } public void removeComponent(Component c) { layout.removeComponent(c); c.removeDirectDependency(this); // Note this! } } Now, all you have to do is something like: Tree menu = new Tree(); /* Add menuitems here */ DependentPanel dependentPanel = new DependentPanel(); menu.dependsOn(dependentPanel); // Note this! TextField text1,text2; dependentPanel.addComponent(text1 = new TextField("text1")); dependentPanel.addComponent(text2 = new TextField("text2")); And now you have yourself a dependency hierarchy of menu -> dependentPanel -> (text1 and text2). In practice this means that values in 'text1' and 'text2' are updated before any events are send to 'menu' (in case of when server receives all these changes at the same request). > BTW, is there a Millstone tutorial on authoring new components? > Echo{point} has a collapsable thingy that's pretty neat. Well, hopefully there will be soon. At this time no. > Or in my case, are *potentially* accessible at the same time. In case of potentially unspecified order of event handling, it is always good practice to set the dependencied by hand (or by using a component which automatically assigns them). Regards, -- Sami Ekblad IT Mill Ltd www.itmill.com From emile@iris-advies.nl Thu Mar 13 19:38:38 2003 Received: from amsfep16-int.chello.nl ([213.46.243.26]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18tWf8-0003A0-00 for ; Thu, 13 Mar 2003 19:38:38 +0200 Received: from iris-advies.nl ([213.93.99.224]) by amsfep16-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with SMTP id <20030313163841.JVYJ10275.amsfep16-int.chello.nl@iris-advies.nl> for ; Thu, 13 Mar 2003 17:38:41 +0100 Received: by iris-advies.nl (sSMTP sendmail emulation); Thu, 13 Mar 2003 17:38:40 +0100 From: Emiliano Date: Thu, 13 Mar 2003 17:38:40 +0100 To: users@millstone.org Subject: Re: [Users] Dependencies Message-ID: <20030313163840.GA12097@iris-advies.nl> References: <20030313145849.GA11868@iris-advies.nl> <3E70AC5C.5020505@itmill.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E70AC5C.5020505@itmill.com> User-Agent: Mutt/1.3.28i Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: On Thu, Mar 13, 2003 at 06:05:48PM +0200, Sami Ekblad wrote: > >So if I do something like this, what event will my CustomComponent ge > >before the menu event fires? > > To clear out the "form" component I suggested, I wrote you a > simple panel-like component, which depends on every component > added to it using the provided addComponent-function: > > public class DependentPanel extends CustomComponent { > > private OrderedLayout layout = new OrderedLayout(); > > public DependentPanel() { > setCompositionRoot(layout); > } > > public void addComponent(Component c) { > this.dependsOn(c); // Note this! > layout.addComponent(c); > } Ah, I see. So there's still an explicit ordering. But in my case, 3-5 panels with each some 20-100 components, won't that kill performance? That's quite a bit of ordering to do. > menu -> dependentPanel -> (text1 and text2). In practice this means > that values in 'text1' and 'text2' are updated before any events are > send to 'menu' (in case of when server receives all these changes at > the same request). And I could set a flag somewhere that there's a validation error that cancels out the menu change. Right? > >Or in my case, are *potentially* accessible at the same time. > > In case of potentially unspecified order of event handling, it > is always good practice to set the dependencied by hand (or by > using a component which automatically assigns them). No, I don't mean unspecified order, but something like this: *menu1 menu1-text1 menu2 menu1-text2 menu3 menu1-radio3 menu1-text4 The components on the panel on the right need to be validated, and if validation fails on any one of them the menu change should be nulled. But since you can change *to* any of the menu entries *from* any of them, you would need dependencies from menu -> depPane1, menu -> depPane2, menu -> depPane3, etc. Right? Which adds up to lots of dependencies. BTW, I assume that no events will be fired for controls that aren't visible. Correct? Emile From sami.ekblad@itmill.com Fri Mar 14 13:11:14 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18tn5m-0004rQ-00 for ; Fri, 14 Mar 2003 13:11:14 +0200 Received: from itmill3.utu.net ([193.94.103.35] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18tm8M-0007Wt-00 for ; Fri, 14 Mar 2003 12:09:50 +0200 Message-ID: <3E71AADF.8040409@itmill.com> Date: Fri, 14 Mar 2003 12:11:43 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] Dependencies References: <20030313145849.GA11868@iris-advies.nl> <3E70AC5C.5020505@itmill.com> <20030313163840.GA12097@iris-advies.nl> In-Reply-To: <20030313163840.GA12097@iris-advies.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Emiliano wrote: > Ah, I see. So there's still an explicit ordering. But in my case, 3-5 > panels with each some 20-100 components, won't that kill performance? > That's quite a bit of ordering to do. Only the events actually received are sorted, so the ordering performance is relative to the number of visible components. I assume that you don't have all 500 components visible at the same, as in this case also the performace of browser beacomes an issue. And yes, there is always explicit ordering. It would be possible to define some precedence in events (like in .NET for example) to handle the those most common situations. This can help people to get a simple job done without having to assign the dependencies. However, to cover all possible situations, I see that explicit ordering is required. >>menu -> dependentPanel -> (text1 and text2). In practice this means >>that values in 'text1' and 'text2' are updated before any events are >>send to 'menu' (in case of when server receives all these changes at >>the same request). > > And I could set a flag somewhere that there's a validation error that > cancels out the menu change. Right? Just create the a listener for Tree selection change and check the preconditions there. > But since you can change *to* any of the menu entries *from* any of > them, you would need dependencies from menu -> depPane1, menu -> > depPane2, menu -> depPane3, etc. Right? Which adds up to lots of > dependencies. Yes, but as I said earlier only the received events are sorted, so performance is not relative to number of dependencies, it is relative to number of concurrent events. (i.e. The number of concurrently visible components). > BTW, I assume that no events will be fired for controls that aren't > visible. Correct? In practice yes. (Actually, there are some situations where this might happen, but they are irrelevant here.) Regards, -- Sami Ekblad IT Mill Ltd www.itmill.com From emile@iris-advies.nl Fri Mar 14 13:34:43 2003 Received: from amsfep11-int.chello.nl ([213.46.243.20]) by hydra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18tnSV-0004uC-00 for ; Fri, 14 Mar 2003 13:34:43 +0200 Received: from iris-advies.nl ([213.93.99.224]) by amsfep11-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with SMTP id <20030314103446.BATR24098.amsfep11-int.chello.nl@iris-advies.nl> for ; Fri, 14 Mar 2003 11:34:46 +0100 Received: by iris-advies.nl (sSMTP sendmail emulation); Fri, 14 Mar 2003 11:34:46 +0100 From: Emiliano Date: Fri, 14 Mar 2003 11:34:46 +0100 To: users@millstone.org Subject: Re: [Users] Dependencies Message-ID: <20030314103446.GA14010@iris-advies.nl> References: <20030313145849.GA11868@iris-advies.nl> <3E70AC5C.5020505@itmill.com> <20030313163840.GA12097@iris-advies.nl> <3E71AADF.8040409@itmill.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E71AADF.8040409@itmill.com> User-Agent: Mutt/1.3.28i Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: On Fri, Mar 14, 2003 at 12:11:43PM +0200, Sami Ekblad wrote: > Emiliano wrote: > >Ah, I see. So there's still an explicit ordering. But in my case, 3-5 > >panels with each some 20-100 components, won't that kill performance? > >That's quite a bit of ordering to do. > > Only the events actually received are sorted, so the ordering > performance is relative to the number of visible components. > > I assume that you don't have all 500 components visible at the same, > as in this case also the performace of browser beacomes an issue. No, they'll only see one panel at a time, so 20 - 100. > And yes, there is always explicit ordering. It would be possible to > define some precedence in events (like in .NET for example) to handle > the those most common situations. This can help people to get a simple > job done without having to assign the dependencies. However, to cover > all possible situations, I see that explicit ordering is required. Understood, but having a working default for simple cases will help starting users (like me), and (bonus for you) reduce the number of 'but why?!' questions :) > >And I could set a flag somewhere that there's a validation error that > >cancels out the menu change. Right? > > Just create the a listener for Tree selection change and check the > preconditions there. Right! Emile From turin@fahrenheit.bluemars.de Thu Mar 20 15:40:56 2003 Received: from incubus.de ([213.83.44.44] helo=fahrenheit.bluemars.de) by hydra.intra.itmill.com with smtp (Exim 3.35 #1 (Debian)) id 18w0Hw-000213-00 for ; Thu, 20 Mar 2003 15:40:56 +0200 Received: (qmail 2050 invoked by uid 500); 20 Mar 2003 12:41:33 -0000 Date: Thu, 20 Mar 2003 13:41:33 +0100 From: Christian Bauer To: users@millstone.org Message-ID: <20030320124133.GF27763@fahrenheit.bluemars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.3.27i Subject: [Users] BeanItem and Table Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: I'm trying to do something that should be really simple: A Collection of MyBean objects should be displayed in a table, one row should be one MyBean instance from the Collection. Some of the MyBean properties (I'm talking about JavaBean properties with accessor methods) should be displayed, one property per column. I tried everything with BeanItem wrapping, Property/Item (this is really confusing without more documentation) setting and removing. I'm also puzzled by the way a Table is a Container, or at least a Container.Viewer, but accepts also a Container as a datasource. Another stone in my way is the addItem() stuff on Containers, very confusing. Can anyone give me some more examples on how exactly a Table can show a Container and what is required to put something in a Container? TIA! -- BLUE MARS - Gesellschaft für digitale Kommunikation mbH Christian Bauer mailto:christian.bauer@bluemars.de Technology Department http://www.bluemars.de Ebersheimstrasse 5 Tel: +49 (0)69 469973-00 60320 Frankfurt/M. Fax: +49 (0)69 469973-99 From henri.muurimaa@itmill.com Thu Mar 20 18:24:58 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.intra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18w2qg-0002Hp-00 for ; Thu, 20 Mar 2003 18:24:58 +0200 Received: from router.itmill.com ([194.251.129.79] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18w1su-0006ZR-00 for ; Thu, 20 Mar 2003 17:23:12 +0200 Message-ID: <3E79DDAE.9000703@itmill.com> Date: Thu, 20 Mar 2003 17:26:38 +0200 From: Henri Muurimaa User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] BeanItem and Table References: <20030320124133.GF27763@fahrenheit.bluemars.de> In-Reply-To: <20030320124133.GF27763@fahrenheit.bluemars.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: > A Collection of MyBean objects should be displayed in a table, one row > should be one MyBean instance from the Collection. Some of the MyBean > properties (I'm talking about JavaBean properties with accessor methods) > should be displayed, one property per column. Sounds straightforward enough... > I tried everything with BeanItem wrapping, Property/Item (this is really > confusing without more documentation) setting and removing. Yes, unfortunately the documentation is very thin on this and many other related subjects :( > I'm also puzzled by the way a Table is a Container, or at least a > Container.Viewer, but accepts also a Container as a datasource. If you take a closer look at the Container.Viewer interface you notice that it's not implemented by Container classes themselves, but actually classes (usually UI components) that wish to use a Container as a data source. Since Table implements only the Container.Viewer interface it is not a Container itself, but it can use an existing Container as a data source, namely to display its contents. > Another stone in my way is the addItem() stuff on Containers, very confusing. The problem here is that at the moment we don't have a Container implementation that supports addition of existing Items. The only way you can insert Items to the Containers in org.millstone.data.util is by letting the Container instantiate the Item using either of the addItem() methods in the Container interface. You first add a new Item into the Container and then you set the values of its Properties. Like this: Item item = somecontainer.addItem(new String("item ID")); item.getItemProperty("Prop1").setValue(new String("val1")); item.getItemProperty("Prop2").setValue(new Integer(42)); etc. Short of implementing your own Container this is the only way to insert Items into a Container. However, this issue has been raised before too, and a Container that allows addition of instantiated Items is in the works. > Can anyone give me some more examples on how exactly a Table can show a > Container and what is required to put something in a Container? Here is a short snippet I hope is helpful. Disclaimer, though: I didn't test if it compiles :) // First instantiate a new Container and specify the // Properties that Items in it have. IndexedContainer cont = new IndexedContainer(); cont.addContainerProperty("StrProp", String.class, ""); cont.addContainerProperty("IntProp", Integer.class, ""); // Next insert an Item into the new container Item item = cont.addItem(new String("item ID")); item.getItemProperty("StrProp").setValue(new String("val1")); item.getItemProperty("IntProp").setValue(new Integer(42)); // Then instantiate the Table and set it to display the property // names in the table header Table table = new Table("a Table"); table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_ID); // And finally bind our container into the table table.setContainerDataSource(cont); And that's it. When you put that table into a UI it should display the two properties of the Item. -- Henri Muurimaa - +358 400 474 778 - IT Mill Oy - www.itmill.com From adrian.dimulescu@free.fr Thu Mar 20 23:52:05 2003 Received: from postfix3-1.free.fr ([213.228.0.44]) by hydra.intra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18w7xF-0002nm-00 for ; Thu, 20 Mar 2003 23:52:05 +0200 Received: from imp2-1.free.fr (imp2-1.free.fr [213.228.0.22]) by postfix3-1.free.fr (Postfix) with ESMTP id 2D9BDC672 for ; Thu, 20 Mar 2003 21:52:50 +0100 (CET) Received: by imp2-1.free.fr (Postfix, from userid 33) id B8F6458044; Thu, 20 Mar 2003 21:51:58 +0100 (CET) To: users@millstone.org Message-ID: <1048193518.3e7a29ee6c961@imp.free.fr> Date: Thu, 20 Mar 2003 21:51:58 +0100 (CET) From: adrian.dimulescu@free.fr MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.6 X-Originating-IP: 64.12.96.43 Subject: [Users] using UIDL source files Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: hello, is it possible to use UIDL directly in order to build, say, a form? I would prefer to have an XML file which describes my interface rather than writing the code which builds it. also, is there any documentation on the UIDL used by millstone ? thank you, adrian. From jonmartin.solaas@mail.link.no Fri Mar 21 02:22:16 2003 Received: from [62.97.172.3] (helo=fatboy) by hydra.intra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18wAIa-00032a-00 for ; Fri, 21 Mar 2003 02:22:16 +0200 Received: from fatboy ([127.0.0.1]) by fatboy with Microsoft SMTPSVC(5.0.2195.5329); Fri, 21 Mar 2003 00:27:43 +0100 Message-ID: <000701c2ef38$4eae0670$fd01a8c0@fatboy> From: "Jon Martin Solaas" To: Date: Fri, 21 Mar 2003 00:27:43 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-OriginalArrivalTime: 20 Mar 2003 23:27:43.0718 (UTC) FILETIME=[4EB05060:01C2EF38] Subject: [Users] Tree control Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org X-Reply-To: "Jon Martin Solaas" List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: I want to have a tree populated with several "Items". So I've figured how I can populate the tree, but how can I have nodes with non-unique texts and still unique keys? I suppose I must use Items and Properties, but how? Basically I have a tree of node-value objects with "name" and "ID" attributes where names aren't unique and ID are. Can such a tree in some way act as a datasource for the Tree control and that way save me some lines of coding? At the moment my code looks sort of like this (please ignore the inefficient way the children are retrieved with successive recursive EJB-calls, ) private void updateView() { try { ThemeValue themeRootValue = eJBUtils.getSesCmsBean().getTheme("ROOT",1); themeTree.addItem(themeRootValue.getThemeName()); expandThemeNode("ROOT"); themeTree.setComponentError(null); } catch (Exception e) { themeTree.setComponentError(new SystemError(e)); } } private void expandThemeNode(String ID) { Item themeRootItem = themeTree.getItem(ID); try { ThemeValue themeRootValue = eJBUtils.getSesCmsBean().getTheme(ID,2); Iterator childIter = themeRootValue.getChildren().iterator(); while (childIter.hasNext()) { ThemeValue child = (ThemeValue) childIter.next(); themeTree.addItem(child.getThemeName()); themeTree.setParent(child.getThemeName(), themeRootValue.getThemeName()); expandThemeNode(child.getThemeID()); } themeTree.setComponentError(null); } catch (Exception e) { themeTree.setComponentError(new SystemError(e)); } } The reason for this is to have a site-map in a web on the following form root art music contemporary classical painting contemporary classical news abroad local breaking ... -- jonmartin.solaas@mail.link.no From jonmartin.solaas@mail.link.no Fri Mar 21 02:58:09 2003 Received: from [62.97.172.3] (helo=fatboy) by hydra.intra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18wArJ-00036m-00 for ; Fri, 21 Mar 2003 02:58:09 +0200 Received: from fatboy ([127.0.0.1]) by fatboy with Microsoft SMTPSVC(5.0.2195.5329); Fri, 21 Mar 2003 01:03:36 +0100 Message-ID: <001b01c2ef3d$51f54ff0$fd01a8c0@fatboy> From: "Jon Martin Solaas" To: References: <000701c2ef38$4eae0670$fd01a8c0@fatboy> Subject: Re: [Users] Tree control Date: Fri, 21 Mar 2003 01:03:35 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-OriginalArrivalTime: 21 Mar 2003 00:03:36.0703 (UTC) FILETIME=[51F7C0F0:01C2EF3D] Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org X-Reply-To: "Jon Martin Solaas" List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Oups, how could I miss the setItemCaption method? Beats me ... Sorry for the disturbance. -- jonmartin.solaas@mail.link.no ----- Original Message ----- From: "Jon Martin Solaas" To: Sent: Friday, March 21, 2003 12:27 AM Subject: [Users] Tree control > I want to have a tree populated with several "Items". So I've figured how I > can populate the tree, but how can I have nodes with non-unique texts and > still unique keys? I suppose I must use Items and Properties, but how? > Basically I have a tree of node-value objects with "name" and "ID" > attributes where names aren't unique and ID are. Can such a tree in some way > act as a datasource for the Tree control and that way save me some lines of > coding? > > At the moment my code looks sort of like this (please ignore the inefficient > way the children are retrieved with successive recursive EJB-calls, ) > > private void updateView() { > > try { > ThemeValue themeRootValue = > eJBUtils.getSesCmsBean().getTheme("ROOT",1); > themeTree.addItem(themeRootValue.getThemeName()); > expandThemeNode("ROOT"); > themeTree.setComponentError(null); > } catch (Exception e) { > themeTree.setComponentError(new SystemError(e)); > } > > } > > private void expandThemeNode(String ID) { > Item themeRootItem = themeTree.getItem(ID); > try { > ThemeValue themeRootValue = eJBUtils.getSesCmsBean().getTheme(ID,2); > Iterator childIter = themeRootValue.getChildren().iterator(); > while (childIter.hasNext()) { > ThemeValue child = (ThemeValue) childIter.next(); > themeTree.addItem(child.getThemeName()); > themeTree.setParent(child.getThemeName(), > themeRootValue.getThemeName()); > expandThemeNode(child.getThemeID()); > } > themeTree.setComponentError(null); > } catch (Exception e) { > themeTree.setComponentError(new SystemError(e)); > } > } > > The reason for this is to have a site-map in a web on the following form > > root > art > music > contemporary > classical > painting > contemporary > classical > news > abroad > local > breaking > ... > > -- > jonmartin.solaas@mail.link.no > > > _______________________________________________ > Users mailing list > Users@millstone.org > http://community.millstone.org/mailman/listinfo/users From sami.ekblad@itmill.com Mon Mar 24 11:00:02 2003 Received: from itmill.utu.net ([193.94.103.32] helo=edge.intra.itmill.com) by hydra.intra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18xNoI-0002Ha-00 for ; Mon, 24 Mar 2003 11:00:02 +0200 Received: from router.itmill.com ([194.251.129.79] helo=itmill.com) by edge.intra.itmill.com with asmtp (Exim 3.33 #1 (Debian)) id 18xMqL-0004jH-00 for ; Mon, 24 Mar 2003 09:58:05 +0200 Message-ID: <3E7EBB2A.8030108@itmill.com> Date: Mon, 24 Mar 2003 10:00:42 +0200 From: Sami Ekblad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@millstone.org Subject: Re: [Users] using UIDL source files References: <1048193518.3e7a29ee6c961@imp.free.fr> In-Reply-To: <1048193518.3e7a29ee6c961@imp.free.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: adrian.dimulescu@free.fr wrote: > is it possible to use UIDL directly in order to build, say, a form? I would > prefer to have an XML file which describes my interface rather than writing the > code which builds it. This would be interesting feature. To serialize (or deserialize) components from UIDL file. Actually, we have kept this in mind, but so far it has been postponed. This will probably become concrete when the serialization and visual form designer will be. Anyway, currently it is not possible. > also, is there any documentation on the UIDL used by millstone ? docs/specification includes the DTD for the UIDL. It contains lots of explanatory comments . -- Sami Ekblad Oy IT Mill Ltd www.itmill.com From eric_b_remer@yahoo.com Tue Mar 25 05:07:10 2003 Received: from web20708.mail.yahoo.com ([216.136.226.181]) by hydra.intra.itmill.com with smtp (Exim 3.35 #1 (Debian)) id 18xemM-0004CC-00 for ; Tue, 25 Mar 2003 05:07:10 +0200 Message-ID: <20030325020746.19028.qmail@web20708.mail.yahoo.com> Received: from [134.134.136.4] by web20708.mail.yahoo.com via HTTP; Mon, 24 Mar 2003 18:07:45 PST Date: Mon, 24 Mar 2003 18:07:45 -0800 (PST) From: Eric Remer Subject: Re: [Users] sorting a container To: users@millstone.org In-Reply-To: <3E6C6E0B.4080309@itmill.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1738410164-1048558065=:18299" Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: --0-1738410164-1048558065=:18299 Content-Type: text/plain; charset=us-ascii Are you suggesting that there is a way to sort data in the IndexedContainer? I looked at the code and I wasn't sure how that would be done. Thanks. Sami Ekblad wrote: Adrian Petru Dimulescu wrote: > Hello, > > does anybody happen to have some examples of sorting a simple container? > (like a Select containing String's, but even more complicated are welcome) There are at least couple of ways to do this. The easiest way to get sorted Select entries is to construct the Select using a sorted collection of items (strings in the simplest case) and use the utilities provided by java.util.Collections to sort the collections. The basic data interfaces do include sorting functions, but implementing your own SortedContainer (backed up by some collection) with sorting capabilities should be straight-forward. Take a look for example IndexedContainer in org.millstone.base.data.util package. Regards, -- Sami Ekblad Oy IT Mill Ltd www.itmill.com _______________________________________________ Users mailing list Users@millstone.org http://community.millstone.org/mailman/listinfo/users --------------------------------- Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! --0-1738410164-1048558065=:18299 Content-Type: text/html; charset=us-ascii

Are you suggesting that there is a way to sort data in the IndexedContainer? I looked at the code and I wasn't sure how that would be done.

Thanks.

 Sami Ekblad <sami.ekblad@itmill.com> wrote:



Adrian Petru Dimulescu wrote:
> Hello,
>
> does anybody happen to have some examples of sorting a simple container?
> (like a Select containing String's, but even more complicated are welcome)

There are at least couple of ways to do this.

The easiest way to get sorted Select entries is to construct the Select
using a sorted collection of items (strings in the simplest case) and
use the utilities provided by java.util.Collections to sort the
collections.

The basic data interfaces do include sorting functions, but implementing
your own SortedContainer (backed up by some collection) with sorting
capabilities should be straight-forward. Take a look for example
IndexedContainer in org.millstone.base.data.util package.


Regards,

-- Sami Ekblad
Oy IT Mill Ltd
www.itmill.com



_______________________________________________
Users mailing list
Users@millstone.org
http://community.millstone.org/mailman/listinfo/users



Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! --0-1738410164-1048558065=:18299-- From scollins@fastmail.fm Wed Mar 26 01:05:54 2003 Received: from www.fastmail.fm ([66.111.4.2]) by hydra.intra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18xxUQ-00066W-00 for ; Wed, 26 Mar 2003 01:05:54 +0200 Received: from smtp.us2.messagingengine.com (server2.internal [10.202.2.133]) by localhost.localdomain (Postfix) with ESMTP id F2D282C719 for ; Tue, 25 Mar 2003 17:06:43 -0500 (EST) Received: from 127.0.0.1 ([127.0.0.1] helo=smtp.us2.messagingengine.com) by fastmail.fm with SMTP; Tue, 25 Mar 2003 17:06:44 -0500 Received: by smtp.us2.messagingengine.com (Postfix, from userid 99) id 2359D51898; Tue, 25 Mar 2003 17:06:44 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.2 (F2.71; T1.001; A1.51; B2.12; Q2.03) From: "Simon Collins" To: users@millstone.org Date: Tue, 25 Mar 2003 23:06:44 +0100 X-Epoch: 1048630004 X-Sasl-enc: LIL8RQKfoupTpsZbNC+WiA Message-Id: <20030325220644.2359D51898@smtp.us2.messagingengine.com> Subject: [Users] Newbie event handling question Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hi, I'm new to Millstone and I am having a little trouble with event handling mechanisms. I have a form that has a multiselect Select on it, a dropdown Select and an "Add" Button. I want to have the currently selected item in the dropdown Select added to the multiselect Select whenever the user clicks on the "Add" Button. This is one part of a bigger form. To achieve this I have tried simply adding a Button.ClickListener to the form and having the listener code grab the current item value from the dropdown Select and add it to multiselect. However I am finding that when my handler code for the button click gets called sometimes the current value I pull from the dropdown has not yet been updated with the new value I selected. So sometimes the code works and sometimes it doesn't. Also I noticed that if I have a Property.ValueChangeListener on the dropdown Select as well that the order in which the two event handler methods is called varies each time so I cant use a combination of those two listeners reliably to detect if the value has changed. My question is, is there a better way of doing this, or of somehow guaranteeing that the current value of the Select will have updated by the time that the button click listener is called? I suspect I may be doing something really wrong here so any help would be greatly appreciated. An example snippet of the code I've tried is: public class MyForm extends OrderedLayout implements Button.ClickListener { private Select mDropDownSelect; // dropdown Select containing items to add private Select mMultiSelect; // multiselect Select to add items to when Add button // is clicked private Button mAddButton; public MyForm() { mButton = new Button("Add", this); mDropDownSelect = Select(); mMultiSelect = new Select(); mMultiSelect.setMultiSelect(true); // setting up drop down Select mDropDownSelect.addItem("Item 1"); mDropDownSelect.addItem("Item 2"); mDropDownSelect.addItem("Item 3"); } // implementation of Button.ClickListener public void buttonClick(Button.ClickEvent e) { if(e.getButton() == mButton) { // this code does not work sometimes because the value returned // from getValue() is not updated before the listener is called // even if the value has changed Object currentItem = mDropDownSelect.getValue(); mMultiSelect.addItem(currentItem); } } } Thanks in advance, Simon From emile@iris-advies.nl Wed Mar 26 08:03:26 2003 Received: from amsfep12-int.chello.nl ([213.46.243.18]) by hydra.intra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18y40U-0006p0-00 for ; Wed, 26 Mar 2003 08:03:26 +0200 Received: from iris-advies.nl ([213.93.99.224]) by amsfep12-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with SMTP id <20030326050349.DTNT12952.amsfep12-int.chello.nl@iris-advies.nl> for ; Wed, 26 Mar 2003 06:03:49 +0100 Received: by iris-advies.nl (sSMTP sendmail emulation); Wed, 26 Mar 2003 06:03:49 +0100 From: Emiliano Date: Wed, 26 Mar 2003 06:03:49 +0100 To: users@millstone.org Subject: Re: [Users] Newbie event handling question Message-ID: <20030326050349.GA16277@iris-advies.nl> References: <20030325220644.2359D51898@smtp.us2.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030325220644.2359D51898@smtp.us2.messagingengine.com> User-Agent: Mutt/1.3.28i Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: On Tue, Mar 25, 2003 at 11:06:44PM +0100, Simon Collins wrote: > I'm new to Millstone and I am having a little trouble with event handling > mechanisms. > > I have a form that has a multiselect Select on it, a dropdown Select and > an "Add" Button. I want to have the currently selected item in the > dropdown Select added to the multiselect Select whenever the user clicks > on the "Add" Button. This is one part of a bigger form. > > To achieve this I have tried simply adding a Button.ClickListener to the > form and having the listener code grab the current item value from the > dropdown Select and add it to multiselect. However I am finding that when > my handler code for the button click gets called sometimes the current > value I pull from the dropdown has not yet been updated with the new > value I selected. So sometimes the code works and sometimes it doesn't. You must set a dependsOn relationship. Can be pretty confusing when starting out. With a button.dependsOn(select); button.dependsOn(multiselect); you make sure that the event handler for the button runs after those of the selects. If the selects run last, the data they get may 'reset' the selects to the 'new data' they've been sent by the form, even if the button handler added stuff earlier. Emile From scollins@fastmail.fm Thu Mar 27 15:50:58 2003 Received: from ny3.fastmail.fm ([66.111.4.4] helo=smtp.us.messagingengine.com) by hydra.intra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 18yXmU-0001Mp-00 for ; Thu, 27 Mar 2003 15:50:58 +0200 Received: from smtp.us2.messagingengine.com (server2.internal [10.202.2.133]) by fastmail.fm (Postfix) with ESMTP id 165AC455D5 for ; Thu, 27 Mar 2003 07:51:53 -0500 (EST) Received: from 127.0.0.1 ([127.0.0.1] helo=smtp.us2.messagingengine.com) by messagingengine.com with SMTP; Thu, 27 Mar 2003 07:51:52 -0500 Received: by smtp.us2.messagingengine.com (Postfix, from userid 99) id 961624DABD; Thu, 27 Mar 2003 07:51:52 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.2 (F2.71; T1.001; A1.51; B2.12; Q2.03) From: "Simon Collins" To: users@millstone.org Date: Thu, 27 Mar 2003 13:51:52 +0100 X-Epoch: 1048769512 X-Sasl-enc: GBT7KMfWvox0EevRUslLrA Subject: Re: [Users] Newbie event handling question References: <20030325220644.2359D51898@smtp.us2.messagingengine.com> <20030326050349.GA16277@iris-advies.nl> In-Reply-To: <20030326050349.GA16277@iris-advies.nl> Message-Id: <20030327125152.961624DABD@smtp.us2.messagingengine.com> Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: On Wed, 26 Mar 2003 06:03:49 +0100, "Emiliano" said: > > You must set a dependsOn relationship. Can be pretty confusing when > starting out. With a button.dependsOn(select); > button.dependsOn(multiselect); you make sure that the event handler for > the button runs after those of the selects. If the selects run last, the > data they get may 'reset' the selects to the 'new data' they've been > sent by the form, even if the button handler added stuff earlier. > > Emile > Excellent! Thanks very much Emiliano. That fixed it. Cheers, Simon From scollins@fastmail.fm Tue Apr 08 00:33:48 2003 Received: from ny3.fastmail.fm ([66.111.4.4] helo=smtp.us.messagingengine.com) by hydra.intra.itmill.com with esmtp (Exim 3.35 #1 (Debian)) id 192eFP-00029q-00 for ; Tue, 08 Apr 2003 00:33:47 +0300 Received: from smtp.us2.messagingengine.com (server2.internal [10.202.2.133]) by server3.messagingengine.com (Postfix) with ESMTP id 9A83650881 for ; Mon, 7 Apr 2003 16:34:53 -0400 (EDT) Received: from 127.0.0.1 ([127.0.0.1] helo=smtp.us2.messagingengine.com) by messagingengine.com with SMTP; Mon, 07 Apr 2003 16:34:52 -0400 Received: by smtp.us2.messagingengine.com (Postfix, from userid 99) id 9AC2751F5A; Mon, 7 Apr 2003 16:34:52 -0400 (EDT) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.2 (F2.71; T1.001; A1.51; B2.12; Q2.03) From: "Simon Collins" To: users@millstone.org Date: Mon, 07 Apr 2003 21:34:52 +0100 X-Epoch: 1049747692 X-Sasl-enc: eiGPTACZV8XffaMs275klA Message-Id: <20030407203452.9AC2751F5A@smtp.us2.messagingengine.com> Subject: [Users] Potential Macintosh Error Sender: users-admin@millstone.org Errors-To: users-admin@millstone.org X-BeenThere: users@millstone.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: users@millstone.org List-Help: List-Post: List-Subscribe: , List-Id: Mailing list for application developers using Millstone. List-Unsubscribe: , List-Archive: Hi all, I have a weird problem with my Millstone based application which I think is being caused by it being viewed on a Macintosh. My application works fine when viewed on PC's but there is a servlet exception when viewed on a Mac. I may be jumping to conclusions but looking through the stack trace (see below) it seems that the WebApplicationServlet is failing when it tries to create the application URL which leads me to think that something funny is being sent by the Mac Browser that is causing that call to fail - The root error is a MalformedURLException. I'm going to do some more investigation but I was curious to see if anyone had had this problem before on Macs. Sorry I dont have specific browser version info at the moment but I'll try and find that out. Any help greatly appreciated. Thanks, Simon ===== Start of output from Tomcat ===== Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error ------------------