You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(37) |
Jun
(141) |
Jul
(111) |
Aug
(91) |
Sep
(79) |
Oct
(151) |
Nov
(161) |
Dec
(93) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(40) |
Feb
(60) |
Mar
(43) |
Apr
(90) |
May
(31) |
Jun
(114) |
Jul
(35) |
Aug
(112) |
Sep
(305) |
Oct
(151) |
Nov
(122) |
Dec
(103) |
2006 |
Jan
(65) |
Feb
(57) |
Mar
(475) |
Apr
(276) |
May
(482) |
Jun
(134) |
Jul
(127) |
Aug
(188) |
Sep
(271) |
Oct
(220) |
Nov
(74) |
Dec
(41) |
2007 |
Jan
(121) |
Feb
(50) |
Mar
(36) |
Apr
(11) |
May
(31) |
Jun
(12) |
Jul
(73) |
Aug
(41) |
Sep
(59) |
Oct
(33) |
Nov
(60) |
Dec
(111) |
2008 |
Jan
(139) |
Feb
(49) |
Mar
(87) |
Apr
(43) |
May
(10) |
Jun
(25) |
Jul
(114) |
Aug
(17) |
Sep
(25) |
Oct
(199) |
Nov
(94) |
Dec
(45) |
2009 |
Jan
(36) |
Feb
(14) |
Mar
(29) |
Apr
(32) |
May
(49) |
Jun
(18) |
Jul
(68) |
Aug
(34) |
Sep
(34) |
Oct
(11) |
Nov
(10) |
Dec
(14) |
2010 |
Jan
(35) |
Feb
(12) |
Mar
(23) |
Apr
(17) |
May
(4) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
|
Nov
(10) |
Dec
|
2011 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2012 |
Jan
(2) |
Feb
(1) |
Mar
(8) |
Apr
(3) |
May
|
Jun
|
Jul
(4) |
Aug
(3) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(8) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
(4) |
2014 |
Jan
(2) |
Feb
(2) |
Mar
(3) |
Apr
(1) |
May
(5) |
Jun
(1) |
Jul
(13) |
Aug
(2) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(15) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <af...@so...> - 2004-06-15 09:06:18
|
Keith, Thanks, It seems to working fine. Also i was able to get JGoodiesBeanForm*.formBuilder and add my combo box. There is one little issue as the data model for combo box changes and combo box needs to know about the changes so I can refresh Model. I guess there are few things I can do, 1. AS this list of beans is also represented as a Tree and may be I can listen to TreeModel changes and update combobox model.. 2. Ideally I would like to have ApplicationListener and listen for created. modified and deleted event and refresh. The problem is it is Panel like OwnerGeneralPanel and doesn't have empty constructor so I can't list it in view-context. 3. Create the combo box every time on onAboutToShow(..) Any suggestions Amad ----- Original Message ----- From: Keith Donald <kd...@cs...> Date: Monday, June 14, 2004 5:16 am Subject: RE: [Springframework-rcp-dev] Bug in new validation code... > Amad, > > Everything should be checked in; I committed my last change last night > (about 6 hrs ago - it's 8:15 EST here.) > > Keith > > -----Original Message----- > From: spr...@li... > [spr...@li...] On Behalf Of > af...@so... > Sent: Monday, June 14, 2004 3:27 AM > To: spr...@li... > Subject: [Springframework-rcp-dev] Bug in new validation code... > > Thanks Keith, would you be checking in your changes sometime today? > > Amad > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > >From Windows to Linux, servers to mobile, InstallShield X is the > one installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the > one installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > |
From: Eduardo I. I. <zi...@su...> - 2004-06-14 21:38:00
|
> Now, as far as I can see, there is no reason at all for this > to be implemented as part of the ORM solution. Indeed, it > makes much more sense for this to be simply wrapper abound JDBC. The > wrapper would do transparent batching of INSERT/UPDATE/DELETEs and > provide pluggable client/server remotability strategies (RMI/SOAP/etc), > delegating to a server-side connection pool. It could even be used > outside of Hibernate. > > Does anyone know of an existing project like this? If not, should we > start one, under the aegis of hibernate.org? Is anyone interested in > starting work on this. I'm convinced it is not at all difficult to > implement. > > Have I gone insane? > RmiJdbc : Client/Server JDBC Driver Based on Java RMI http://rmijdbc.objectweb.org/ -- <Eduardo Issao Ito/> <Summa Technologies/> “The ideal project is one where people don't have meetings, they have lunch.” — Bill Joy |
From: Andrew - D. <at....@ds...> - 2004-06-14 18:09:40
|
Hi Keith, I understand what you're saying now. So, my next question is, is there a way to associate toolbar buttons with a view? Take this example case that I've made up to try: 1: User starts application, summary view is displayed 2: User clicks 'Show Timesheet' button on the toolbar; the an empty timesheet view is displayed & a 'Search Timesheet' button is displayed on the toolbar. 3: User clicks 'Search Timesheet' button; another view is displayed that lets the user search for old timesheets & a 'Return' button is displayed to move the user back to the previous view when clicked. So, that is an easy flow I guess - one thing I'm thinking of, but probably shouldn't ask because I haven't researched in Spring RCP yet is - how do I pass the data from view to view - say Step 3 returns a populated bean to the view to be displayed when 'Return' is clicked. Thanks, Andrew Say, for example I have this timesheet view displayed nicely, On Thu, 2004-06-10 at 15:15, Keith Donald wrote: > Andrew, > > > > You should just be able to add an instance of the ShowViewAction to > your toolbar, you don’t need a “TimeSheet” action if all it’s going to > do is display your TimeSheet view, for example. > > > > Just configure the ShowViewAction instance in your view-context.xml > with the view you wish it to load; it encapsulates the behaivior > required to open a new view in the page area. Like this: > > > > <bean id=”showTimeSheetView” > class=”org.springframework.rcp.action.support.ShowViewAction”/> > > <constructor-arg index=”0”> > > <ref bean=”timesheetView”/> > > </constructor-arg> > > </bean> > > > > … add that definition to your toolbar. When the button is clicked, > the timeSheetView should be displayed. > > > > Keith > > > > > ______________________________________________________________________ > > From:spr...@li... > [mailto:spr...@li...] On Behalf > Of Andrew - Development > Sent: Wednesday, June 09, 2004 3:57 PM > To: Spring Framework Rich Client Platform > Subject: [Springframework-rcp-dev] Replacing view in perspective > question > > > > > Had a bit more time to play around tonight which is good. So, I have a > toolbar action, which I want to launch a new 'view' in the current > perspective (I think this is how it works). > So, I have this: > public class TimeSheet implements ActionHandler { > private Log logger = LogFactory.getLog(getClass()); > > /* (non-Javadoc) > * @see > org.springframework.rcp.action.ActionHandler#performAction(java.lang.String) > */ > public void performAction(String actionId) { > logger.debug("Performing action on: " + actionId); > > // Replace the current view in the perspective with a TimesheetView > // But what do I put here? > > } > } > > But I'm just completely lost on what should exist to make the view > appear and replace the view that already exists there.? > I was thinking that I define a new view in the view-context and pass > that to this action, but that seems wrong. > A little help? > > Thanks. > > > > Andrew - DEV > > > Andrew - DEV |
From: Keith D. <kd...@cs...> - 2004-06-14 17:52:09
|
Amad, Everything should be checked in; I committed my last change last night (about 6 hrs ago - it's 8:15 EST here.) Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of af...@so... Sent: Monday, June 14, 2004 3:27 AM To: spr...@li... Subject: [Springframework-rcp-dev] Bug in new validation code... Thanks Keith, would you be checking in your changes sometime today? Amad ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Springframework-rcp-dev mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev |
From: Keith D. <kd...@cs...> - 2004-06-14 16:41:48
|
I recently committed support for "CompoundFormModels" for the rich client form / data binding / validation framework, where a CompoundFormModel is a FormModel that aggregate other form models. The use cases / requirements addressed by this capability are: - A wizard or other multi-page dialog contains multiple logical "pages", where each page (generally) displays a form for editing. Thus: o It should be possible for form validation listeners to subscribe only to a single page's form fields, for local results reporting on that page. o It should be easy to commit all edits on all forms models to the domain layer on a single bulk "submit" - e.g calling commit on the parent, compound form model should trigger commits on all child page models. o It should be impossible to submit unless all aggregated page models are free of validation errors. o It should be easy to commit or revert a single page's edits. o It should be easy to reuse the same compound form instance with a different backing form object of the same type. So the general cardinality of these objects for a wizard would be: o One CompoundFormModel per wizard o One to many MutableFormModels, one for each wizard page I believe what I just checked in accomplishes these goals. I've updated the sample app to illustrate (as always.) I've also renamed a few framework classes to better document the separation between a "CompoundForm", and a single "FormPage." Very best regards, Keith |
From: Keith D. <kd...@cs...> - 2004-06-14 13:48:08
|
fyi -----Original Message----- From: Jeff Boring [mailto:jb...@DS...] Sent: Monday, June 14, 2004 9:40 AM To: Keith Donald Subject: FW: [Hibernate] New subproject proposal: a batching, client/server JDBC layer Keith: I just saw this and thought you would be interested. Jeff Boring Impulse Point jb...@im... 863.255.9777 -----Original Message----- From: hib...@li... [mailto:hib...@li...] On Behalf Of Gavin King Sent: Monday, June 14, 2004 8:44 AM To: hibernate-devel Subject: [Hibernate] New subproject proposal: a batching, client/server JDBC layer I've been thinking about the problem of users who ask for "lazy fetching from the client". As we keep explaining, this is an incredibly bad idea, since transaction demarcation and caching (and probably also dirty checking) should take place in the same tier as lazy fetching. However, many of these users are writing Swing or rich client applications and I think perhaps the reason they ask for this is that they are forced to run Hibernate in the server tier since they are not allowed to open a JDBC connection from the client, and Hibernate is tied to the JDBC connection pool. After thinking about this, I think I've decided that there is nothing at all wrong with doing data access via a remote "gateway", so that Hibernate would run in the client tier and act as a remote client of a server-side JDBC connection pool. This would enable transaction demarcation, caching, dirty checking and lazy fetching to be done on the client, but the actual database access would take place on the server. Now, as far as I can see, there is no reason at all for this to be implemented as part of the ORM solution. Indeed, it makes much more sense for this to be simply wrapper abound JDBC. The wrapper would do transparent batching of INSERT/UPDATE/DELETEs and provide pluggable client/server remotability strategies (RMI/SOAP/etc), delegating to a server-side connection pool. It could even be used outside of Hibernate. Does anyone know of an existing project like this? If not, should we start one, under the aegis of hibernate.org? Is anyone interested in starting work on this. I'm convinced it is not at all difficult to implement. Have I gone insane? -- Gavin King +61 41 053 4454 +1 404 822 8349 Hibernate ga...@hi... http://hibernate.org JBoss Inc gav...@jb... http://jboss.com ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: <af...@so...> - 2004-06-14 07:27:14
|
Thanks Keith, would you be checking in your changes sometime today? Amad |
From: Keith D. <kd...@cs...> - 2004-06-14 01:13:35
|
Amad, Indeed a bug I introduced this afternoon; good catch, I just incorporated a fix. I also committed the getDefaultFormBuilder() accessor on the JGoodiesFormBuilder* classes, allowing access to the wrapped jgoodies builder. Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of af...@so... Sent: Sunday, June 13, 2004 7:45 PM To: spr...@li... Subject: [Springframework-rcp-dev] Bug in new validation code... I think there is little problem in new validation code, i.e Finish button is not enabled on a form unless you enter bad values and correct them otherwise it doesn't get enabled the first time. Here is how you can reproduce it, 1. Run the petclinic sample, 2. Add new Owner 3. Type in Fist Name, dont' make any mistake just type "First" 4. Same thing for last name, just enter "Last" Now at this point Finish button should be enabled but it is not, you can enter some spaces for any of the fields and then fix them and "Finish" is enabled. Thanks Amad ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Springframework-rcp-dev mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev |
From: <af...@so...> - 2004-06-13 23:44:34
|
I think there is little problem in new validation code, i.e Finish button is not enabled on a form unless you enter bad values and correct them otherwise it doesn't get enabled the first time. Here is how you can reproduce it, 1. Run the petclinic sample, 2. Add new Owner 3. Type in Fist Name, dont' make any mistake just type "First" 4. Same thing for last name, just enter "Last" Now at this point Finish button should be enabled but it is not, you can enter some spaces for any of the fields and then fix them and "Finish" is enabled. Thanks Amad |
From: Keith D. <kd...@cs...> - 2004-06-13 23:35:33
|
Amad, Good point. The form builder abstractions around JGoodies' DefaultFormBuilder, while simplify things considerably for text fields, are still very new and aren't yet complete. I can go ahead and create an accessor to get the wrapped JGoodies DefaultFormBuilder, which provides interfaces for adding any component. We will continue to enhance upon our form builder abstractions to provide first-class support for bound controls such as ComboBoxes as I mentioned in my earlier email. I'll commit the change promptly. Regards, Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of af...@so... Sent: Sunday, June 13, 2004 3:27 PM To: spr...@li... Subject: Re: RE: [Springframework-rcp-dev] List of values for InputApplicationDialog Thanks Keith, I have looked at ComponentFactory.createComboBox* and I was planning to use that. But I am not sure how to use this combobox with JGoodiesBeanFormBuilder to add it to form, as rest of the properties are added through JGoodiesBeanFormBuilder. For example Owner's first name, last name are added through JGoodiesBeanFormBuilder as it takes care of binding and validation. So FormLayout layout = new FormLayout("left:pref, 5dlu, pref:grow"); BeanFormBuilder formBuilder = new JGoodiesBeanFormBuilder(formMode(), layout); formBuilder.add("firstName"); formBuilder.add("lastName"); /** Some where here I would create ComboBox using ComponentFactory myComboBox = ComponentFactory.createComboBox(dataAccessFunction, "favoritePet"); myComboBox.setActionListener(myListener); // selects the property on the domain model. **/ return formBuilder.getForm(); So how do I add this combo box to form? as I can't get formBuilder as it is private and there are no methods just to add a labelKey, component on JGoodiesBeanFormBuilder... I hope I am making some sense..... Amad ----- Original Message ----- From: Keith Donald <kd...@cs...> Date: Sunday, June 13, 2004 9:10 am Subject: RE: [Springframework-rcp-dev] List of values for InputApplicationDialog > I've found ComboBox values generally map well to enumerations, so > what I > often do is populate my list of selectable values from a list of > finiteenums; this also works nicely when you're using type-safe > enums in your > domain model. > > The framework provides some support for this now; for example, if you > implement the CodedEnum interface and provide a EnumResolver to the > ComponentFactory (which by default, uses a StaticEnumResolver > which is a > global singleton registry of statically declared CodedEnum's you have > registered.) There not yet a sample illustrating this in > petclinic but I > can add one. > > Beyond that, any arbitrary collection of values also makes sense; for > example may you want to take the owner's list of Pets and make one > of his > pets the "favorite pet." The "Favorite Pet" property's ComboBox's > possiblevalues would come from the contents of the List of all > possible pets; and > the box selector would need to trigger a setFavoritePet() with the > selectedproperty. There is not yet support in the framework for > this, but certainly > sounds like a good idea. > > I think for now I would recommend just rolling your own specific > combo box > that pulls a list of bean values from a getter() on your domain > model, has > an attached render that renders them like you want, and then sets some > property on an action event selection. Checkout ComponentFactory's > createComboBox* methods for helping you with this; particularly > take a look > at the one that takes a Function object callback for retrieving a > List of > possible values (you would want to implement the Function > interface and have > the return value of evaluate() return your list of beans.) > > Hope this helps - > Keith > > -----Original Message----- > From: spr...@li... > [spr...@li...] On Behalf Of > af...@so... > Sent: Saturday, June 12, 2004 10:06 PM > To: spr...@li... > Subject: [Springframework-rcp-dev] List of values for > InputApplicationDialog > I want to provide user with possible input values, while inserting > a bean. I > am using JGoodiesBeanFormBuilder to build the form. Question is > how do add a > combo box to this form for one of the bean property possible > values? Problem > is in bean this property is just a reference to another bean, and > I wanted a > combo box of all possible? How do handle this, any ideas any one > .... > > Or in general how should we handle list of values for a input > form? > > Amad > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > >From Windows to Linux, servers to mobile, InstallShield X is the > one installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the > one installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Springframework-rcp-dev mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev |
From: <af...@so...> - 2004-06-13 20:01:32
|
Thanks Keith, I have looked at ComponentFactory.createComboBox* and I was planning to use that. But I am not sure how to use this combobox with JGoodiesBeanFormBuilder to add it to form, as rest of the properties are added through JGoodiesBeanFormBuilder. For example Owner's first name, last name are added through JGoodiesBeanFormBuilder as it takes care of binding and validation. So FormLayout layout = new FormLayout("left:pref, 5dlu, pref:grow"); BeanFormBuilder formBuilder = new JGoodiesBeanFormBuilder(formMode(), layout); formBuilder.add("firstName"); formBuilder.add("lastName"); /** Some where here I would create ComboBox using ComponentFactory myComboBox = ComponentFactory.createComboBox(dataAccessFunction, "favoritePet"); myComboBox.setActionListener(myListener); // selects the property on the domain model. **/ return formBuilder.getForm(); So how do I add this combo box to form? as I can't get formBuilder as it is private and there are no methods just to add a labelKey, component on JGoodiesBeanFormBuilder... I hope I am making some sense..... Amad ----- Original Message ----- From: Keith Donald <kd...@cs...> Date: Sunday, June 13, 2004 9:10 am Subject: RE: [Springframework-rcp-dev] List of values for InputApplicationDialog > I've found ComboBox values generally map well to enumerations, so > what I > often do is populate my list of selectable values from a list of > finiteenums; this also works nicely when you're using type-safe > enums in your > domain model. > > The framework provides some support for this now; for example, if you > implement the CodedEnum interface and provide a EnumResolver to the > ComponentFactory (which by default, uses a StaticEnumResolver > which is a > global singleton registry of statically declared CodedEnum's you have > registered.) There not yet a sample illustrating this in > petclinic but I > can add one. > > Beyond that, any arbitrary collection of values also makes sense; for > example may you want to take the owner's list of Pets and make one > of his > pets the "favorite pet." The "Favorite Pet" property's ComboBox's > possiblevalues would come from the contents of the List of all > possible pets; and > the box selector would need to trigger a setFavoritePet() with the > selectedproperty. There is not yet support in the framework for > this, but certainly > sounds like a good idea. > > I think for now I would recommend just rolling your own specific > combo box > that pulls a list of bean values from a getter() on your domain > model, has > an attached render that renders them like you want, and then sets some > property on an action event selection. Checkout ComponentFactory's > createComboBox* methods for helping you with this; particularly > take a look > at the one that takes a Function object callback for retrieving a > List of > possible values (you would want to implement the Function > interface and have > the return value of evaluate() return your list of beans.) > > Hope this helps - > Keith > > -----Original Message----- > From: spr...@li... > [spr...@li...] On Behalf Of > af...@so... > Sent: Saturday, June 12, 2004 10:06 PM > To: spr...@li... > Subject: [Springframework-rcp-dev] List of values for > InputApplicationDialog > I want to provide user with possible input values, while inserting > a bean. I > am using JGoodiesBeanFormBuilder to build the form. Question is > how do add a > combo box to this form for one of the bean property possible > values? Problem > is in bean this property is just a reference to another bean, and > I wanted a > combo box of all possible? How do handle this, any ideas any one > .... > > Or in general how should we handle list of values for a input > form? > > Amad > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > >From Windows to Linux, servers to mobile, InstallShield X is the > one installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the > one installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > |
From: Keith D. <kd...@cs...> - 2004-06-13 17:35:23
|
Rich client gang: I've refactored and substantially enhanced our rich client form data binding and validation framework over the last several days to meet the objectives/requirements outlined below. Thanks to Ben, Ronald, Francois, and Andy for offering their suggestions & helping evolve the design. I'm quite liking it now, and I'd probably still be arguing with myself still had it not been for your help. Specifically: - There is a "FormModel" mediator layer that sits between the GUI controls and the domain model layer, which provides a model for buffering form edits and performing form validation and results reporting. This layer makes heavy use of the ValueModel pattern, pointed to me by Ben as an elegant solution to this problem. This means the following happens when you edit a form: - GUI Control edits are captured by the form model. Validation is applied on each form model update, with results reported to validation listeners in real-time (for example, one listener might be a message pane attached to an application dialog title area). What validation to perform is determined by the declarative rules associated with the properties of the form-backing domain object. These rules are centrally configured and accessed by our RulesSource interface (part of the declarative validation system.) - The text-field edit commit policy is now configurable. You may choose to have the form model updated on each character event (as-you-type), on a focus lost event, or only on form submission. The as-you-type "ValueCommitPolicy" is the default. - A Guard (ValidationListener) enables the form for submission when there are no errors, and disables it when there are errors. Thus we only allow submission when the form has no errors, protecting domain model invariants. Note also the guard triggers on the result of the evaluation of business-tier rules associated with domain object properties that are presentation independent; thus the same rules could be applied in a web-app environment, for example. In a rich client, a guard implementation typically has the responsibility of enabling/disabling the "OK", "Finish", or "Apply" button on a form's dialog. - A submit event (what we call a "finish" event) commits changes to the backing domain layer, a cancel event triggers no action. The API has changed a bit (to be expected); however, some of this change is mitigated by existing framework superclasses. Checkout the rc-petclinic sample for illustration of the new API. Here is a quick peek: The AbstractCommandEditor (framework class) - illustrated below is code to set the backing form object. // initialize the backing form object (domain object) public void setCommand(Object command) { if (commandHolder == null) { // wrapping the command in a value holder allows clients to subscribe to notifications when the value changes....this allows us to reuse the same form model for different instances of the command object. this.commandHolder = new ValueHolder(command); } else { this.commandHolder.set(command); } } // OwnerGeneralPanel form subclass - illustrated below is code to create the Form model for the backing domain object with an attached ValidationListener. In this example, the listener implementation maintains a message area pane to report errors messages, and acts as a guard for controlling the enabled/disabled state of the dialog submit button.) Below that is code to build the form controls against the form model, using a FormBuilder: protected JComponent createControl() { FormLayout layout = new FormLayout("left:pref, 5dlu, pref:grow"); setFormModel(SwingFormModel.newForm(getCommandHolder(), validationReporter)); BeanFormBuilder formBuilder = new JGoodiesBeanFormBuilder(getFormModel(), layout); formBuilder.add("firstName"); formBuilder.add("lastName"); return formBuilder.getForm(); } The output is a basic form with two labels and two textfields, with as-you-type validation enforcing the declarative rules associated with those properties. The reporter automatically displays validation error messages with zero code required (there is quite an sophisticated bit of logic going on to generate error messages for you from the rule structures.) The reporter also automatically enables the guarded control at the appropriate times, again with zero coding required. This design is a million times better than before, but we're not done yet! As always, we very much value your feedback - from code / design review critique to help flushing out new features that meet your requirements. Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Keith Donald Sent: Wednesday, June 09, 2004 6:50 PM To: spr...@li... Subject: RE: [Springframework-rcp-dev] Change request for InputApplicationDialog Ben, Great email, thanks. I think we're in agreement then! We want: - As you type validation with real-time results reporting. Currently our forms support rendering as-you-type results with configurable severity levels on message panes (generally located in the title area of a dialog, similar to eclipse-style dialogs). Obviously decorated JTextField components would be a very nice enhancement. - On validation, appropriate enforcement of "guards" that control the enabled/disabled state of a form based on validation results. We support this now through our Guarded interface, which the Guards interact with to control state (see the Petclinic sample for an illustration.)) - A mediator for taking proposed property values and validating them against a set of declarative (and potentially externalized) validation rules BEFORE COMMITTING THEM TO THE UNDERLYING BEAN. These rules may need additional context (for example, rules may vary based on use-case, some rules may require validation against another property on the form.) I completely agree we want a framework that makes it easy to write a domain model that is rich in behavior and not one that consists of dumb-downed data holders. It's nice to see that well articulated, thank you for that! Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Ben Alex Sent: Wednesday, June 09, 2004 6:24 PM To: spr...@li... Subject: RE: [Springframework-rcp-dev] Change request for InputApplicationDialog > So with that said, the modes I think we need are: > > 1 - as you type validation with a real-time results reporting > pane on the dialog, and binding occurring on submit only. > The validation framework has to be able to handle proposed > property changes and validate them against some context (at a > minimum existing property of the bean, but we probably need > to support other variables as well.) > > 2 - validation / binding occur together on submit only > > 3 - is as you type binding + validation (what we have now) an > option we want? Or does the copy issue just rule it out completely? > > - anything else I missed? On the as-you-type validation issue, why are we building rich GUIs? In my case it's to provide end users with an extremely positive experience by being as easy-to-use as possible, highly responsive and flexible enough to support advanced features. As-you-type validation fits in very well with this goal. When done right you can also decorate JTextFields etc with small icons to indicate errors, warnings etc. If people would like to see an excellent repository of validation styles for rich clients, visit http://www.jgoodies.com/downloads/index.html and run the validation demo. Whilst on the subject of bindings, JGoodies use a ValueModel approach. If you speak German, check out http://www.jgoodies.com/articles/. If you would an English overview, check out http://c2.com/ppr/vmodels.html for instance. A few extra requirements we've found helpful in our Swing app: - As-you-type validation should disable the OK and/or apply buttons until the form is correct. - OK and apply hook to a doApply() method. For our login use case we have a SessionDetails JavaBean, which is fronted by a SessionDetailsModule. The latter performs validation and provides ValueModels for the LoginDialog. LoginDialog updates SessionDetailsModule. Upon clicking OK, the action delegates to doApply(). If login is successful, the SessionDetailsModule has its trigger channel fired. This writes the changes through to the SessionDetails bean. If login failed, an appropriate error is displayed but the trigger channel not fired. As such the user can chose to refine their entry details, or click cancel. Note that an invalid object state never gets to SessionDetails unless login is correct. This is especially desirable because we have PropertyChangeListeners listening for updates to SessionDetails properties so they can modify the displayed toolbar buttons, pull down menus and views. I think this whole acceptance of invalid object states stems from entity bean days. Anemic domain objects (or any object that by design allows invalid property states) breaks OO design principles. Use a ValueModel or some mediator to prevent invalid objects from being created in the first place. Thus you can take advantage of OO features, such as property listeners. Best regards Ben ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ Springframework-rcp-dev mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ Springframework-rcp-dev mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev |
From: Keith D. <kd...@cs...> - 2004-06-13 16:10:53
|
I've found ComboBox values generally map well to enumerations, so what I often do is populate my list of selectable values from a list of finite enums; this also works nicely when you're using type-safe enums in your domain model. The framework provides some support for this now; for example, if you implement the CodedEnum interface and provide a EnumResolver to the ComponentFactory (which by default, uses a StaticEnumResolver which is a global singleton registry of statically declared CodedEnum's you have registered.) There not yet a sample illustrating this in petclinic but I can add one. Beyond that, any arbitrary collection of values also makes sense; for example may you want to take the owner's list of Pets and make one of his pets the "favorite pet." The "Favorite Pet" property's ComboBox's possible values would come from the contents of the List of all possible pets; and the box selector would need to trigger a setFavoritePet() with the selected property. There is not yet support in the framework for this, but certainly sounds like a good idea. I think for now I would recommend just rolling your own specific combo box that pulls a list of bean values from a getter() on your domain model, has an attached render that renders them like you want, and then sets some property on an action event selection. Checkout ComponentFactory's createComboBox* methods for helping you with this; particularly take a look at the one that takes a Function object callback for retrieving a List of possible values (you would want to implement the Function interface and have the return value of evaluate() return your list of beans.) Hope this helps - Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of af...@so... Sent: Saturday, June 12, 2004 10:06 PM To: spr...@li... Subject: [Springframework-rcp-dev] List of values for InputApplicationDialog I want to provide user with possible input values, while inserting a bean. I am using JGoodiesBeanFormBuilder to build the form. Question is how do add a combo box to this form for one of the bean property possible values? Problem is in bean this property is just a reference to another bean, and I wanted a combo box of all possible? How do handle this, any ideas any one .... Or in general how should we handle list of values for a input form? Amad ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Springframework-rcp-dev mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev |
From: <af...@so...> - 2004-06-13 02:06:28
|
I want to provide user with possible input values, while inserting a bean. I am using JGoodiesBeanFormBuilder to build the form. Question is how do add a combo box to this form for one of the bean property possible values? Problem is in bean this property is just a reference to another bean, and I wanted a combo box of all possible? How do handle this, any ideas any one .... Or in general how should we handle list of values for a input form? Amad |
From: Keith D. <kd...@cs...> - 2004-06-11 18:37:25
|
Thomas, I found that one myself! I integrated a fix a few days ago, applied to = the PatchedJFormattedTextField class (as you can tell by the name, there are several jformatted textfield 'issues' addressed in here...) Basically the fix is: the insert key toggles the overwrite mode on the attached formatter. Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of Achleitner Thomas Sent: Friday, June 11, 2004 3:15 AM To: spr...@li... Subject: AW: [Springframework-rcp-dev] Strange TextField behaviour Keith, Have a look at: http://forum.java.sun.com/thread.jsp?thread=3D473447&forum=3D57&message=3D= 2194 588 thomas=20 > -----Urspr=FCngliche Nachricht----- > Von: Keith Donald [mailto:kd...@cs...]=20 > Gesendet: Mittwoch, 9. Juni 2004 16:06 > An: spr...@li... > Betreff: RE: [Springframework-rcp-dev] Strange TextField behaviour >=20 > Thomas, >=20 > Isn't this weird? setOverwriteMode(true) is the default. =20 > I've changed it to false, but then it's ALWAYS in overwrite=20 > mode, INSERT doesn't toggle it. > Do you know if this is a bug in JFormattedTextField? I=20 > already have a PatchedJFormattedTextField to correct one bug,=20 > if this is another I'll likely need to add in a INS key=20 > binding to toggle the overwrite on the formatter. Any other ideas? >=20 > Keith >=20 >=20 > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]=20 > On Behalf Of Achleitner Thomas > Sent: Wednesday, June 09, 2004 2:24 AM > To: spr...@li... > Subject: [Springframework-rcp-dev] Strange TextField behaviour >=20 > Hi! >=20 > Running the rcp petclinic sample app (and in my applications,=20 > too) i am observing strange behaviour of the text fields.=20 > They are always in overwrite mode. It seems that this occurs=20 > with the DefaultFormatter passed to the TextField.=20 >=20 > thomas >=20 > Thomas Achleitner > Abteilung IT - Entwicklung > ECOLOG Logistiksysteme GmbH > Bauernstra=DFe 11, A-4600 Wels > Tel ++43/7242/66200 > Fax ++43/7242/66200-200 > mailto:ac...@ec... > http://www.ecolog.at =20 > =20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: GNOME Foundation Hackers=20 > Unite! GUADEC: The world's #1 Open Source Desktop Event. > GNOME Users and Developers European Conference, 28-30th June=20 > in Norway http://2004/guadec.org=20 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: GNOME Foundation Hackers=20 > Unite! GUADEC: The world's #1 Open Source Desktop Event. > GNOME Users and Developers European Conference, 28-30th June=20 > in Norway http://2004/guadec.org=20 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev >=20 >=20 ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Springframework-rcp-dev mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev |
From: Achleitner T. <ac...@ec...> - 2004-06-11 07:09:37
|
Keith, Have a look at: http://forum.java.sun.com/thread.jsp?thread=3D473447&forum=3D57&message=3D= 2194 588 thomas=20 > -----Urspr=FCngliche Nachricht----- > Von: Keith Donald [mailto:kd...@cs...]=20 > Gesendet: Mittwoch, 9. Juni 2004 16:06 > An: spr...@li... > Betreff: RE: [Springframework-rcp-dev] Strange TextField behaviour >=20 > Thomas, >=20 > Isn't this weird? setOverwriteMode(true) is the default. =20 > I've changed it to false, but then it's ALWAYS in overwrite=20 > mode, INSERT doesn't toggle it. > Do you know if this is a bug in JFormattedTextField? I=20 > already have a PatchedJFormattedTextField to correct one bug,=20 > if this is another I'll likely need to add in a INS key=20 > binding to toggle the overwrite on the formatter. Any other ideas? >=20 > Keith >=20 >=20 > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]=20 > On Behalf Of Achleitner Thomas > Sent: Wednesday, June 09, 2004 2:24 AM > To: spr...@li... > Subject: [Springframework-rcp-dev] Strange TextField behaviour >=20 > Hi! >=20 > Running the rcp petclinic sample app (and in my applications,=20 > too) i am observing strange behaviour of the text fields.=20 > They are always in overwrite mode. It seems that this occurs=20 > with the DefaultFormatter passed to the TextField.=20 >=20 > thomas >=20 > Thomas Achleitner > Abteilung IT - Entwicklung > ECOLOG Logistiksysteme GmbH > Bauernstra=DFe 11, A-4600 Wels > Tel ++43/7242/66200 > Fax ++43/7242/66200-200 > mailto:ac...@ec... > http://www.ecolog.at =20 > =20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: GNOME Foundation Hackers=20 > Unite! GUADEC: The world's #1 Open Source Desktop Event. > GNOME Users and Developers European Conference, 28-30th June=20 > in Norway http://2004/guadec.org=20 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: GNOME Foundation Hackers=20 > Unite! GUADEC: The world's #1 Open Source Desktop Event. > GNOME Users and Developers European Conference, 28-30th June=20 > in Norway http://2004/guadec.org=20 > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev >=20 >=20 |
From: <af...@so...> - 2004-06-11 05:11:47
|
Has anyone work with Bright Side Remoting Framework and if yes how does it compare with Spring Remoting? Amad |
From: <af...@so...> - 2004-06-10 18:39:15
|
test as i was having problem posting. Amad |
From: Keith D. <kd...@cs...> - 2004-06-10 14:15:20
|
Andrew, You should just be able to add an instance of the ShowViewAction to your toolbar, you don't need a "TimeSheet" action if all it's going to do is display your TimeSheet view, for example. Just configure the ShowViewAction instance in your view-context.xml with the view you wish it to load; it encapsulates the behaivior required to open a new view in the page area. Like this: <bean id="showTimeSheetView" class="org.springframework.rcp.action.support.ShowViewAction"/> <constructor-arg index="0"> <ref bean="timesheetView"/> </constructor-arg> </bean> . add that definition to your toolbar. When the button is clicked, the timeSheetView should be displayed. Keith _____ From: spr...@li... [mailto:spr...@li...] On Behalf Of Andrew - Development Sent: Wednesday, June 09, 2004 3:57 PM To: Spring Framework Rich Client Platform Subject: [Springframework-rcp-dev] Replacing view in perspective question Had a bit more time to play around tonight which is good. So, I have a toolbar action, which I want to launch a new 'view' in the current perspective (I think this is how it works). So, I have this: public class TimeSheet implements ActionHandler { private Log logger = LogFactory.getLog(getClass()); /* (non-Javadoc) * @see org.springframework.rcp.action.ActionHandler#performAction(java.lang.String) */ public void performAction(String actionId) { logger.debug("Performing action on: " + actionId); // Replace the current view in the perspective with a TimesheetView // But what do I put here? } } But I'm just completely lost on what should exist to make the view appear and replace the view that already exists there.? I was thinking that I define a new view in the view-context and pass that to this action, but that seems wrong. A little help? Thanks. Andrew - DEV |
From: Keith D. <kd...@cs...> - 2004-06-09 22:50:54
|
Ben, Great email, thanks. I think we're in agreement then! We want: - As you type validation with real-time results reporting. Currently our forms support rendering as-you-type results with configurable severity levels on message panes (generally located in the title area of a dialog, similar to eclipse-style dialogs). Obviously decorated JTextField components would be a very nice enhancement. - On validation, appropriate enforcement of "guards" that control the enabled/disabled state of a form based on validation results. We support this now through our Guarded interface, which the Guards interact with to control state (see the Petclinic sample for an illustration.)) - A mediator for taking proposed property values and validating them against a set of declarative (and potentially externalized) validation rules BEFORE COMMITTING THEM TO THE UNDERLYING BEAN. These rules may need additional context (for example, rules may vary based on use-case, some rules may require validation against another property on the form.) I completely agree we want a framework that makes it easy to write a domain model that is rich in behavior and not one that consists of dumb-downed data holders. It's nice to see that well articulated, thank you for that! Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Ben Alex Sent: Wednesday, June 09, 2004 6:24 PM To: spr...@li... Subject: RE: [Springframework-rcp-dev] Change request for InputApplicationDialog > So with that said, the modes I think we need are: > > 1 - as you type validation with a real-time results reporting > pane on the dialog, and binding occurring on submit only. > The validation framework has to be able to handle proposed > property changes and validate them against some context (at a > minimum existing property of the bean, but we probably need > to support other variables as well.) > > 2 - validation / binding occur together on submit only > > 3 - is as you type binding + validation (what we have now) an > option we want? Or does the copy issue just rule it out completely? > > - anything else I missed? On the as-you-type validation issue, why are we building rich GUIs? In my case it's to provide end users with an extremely positive experience by being as easy-to-use as possible, highly responsive and flexible enough to support advanced features. As-you-type validation fits in very well with this goal. When done right you can also decorate JTextFields etc with small icons to indicate errors, warnings etc. If people would like to see an excellent repository of validation styles for rich clients, visit http://www.jgoodies.com/downloads/index.html and run the validation demo. Whilst on the subject of bindings, JGoodies use a ValueModel approach. If you speak German, check out http://www.jgoodies.com/articles/. If you would an English overview, check out http://c2.com/ppr/vmodels.html for instance. A few extra requirements we've found helpful in our Swing app: - As-you-type validation should disable the OK and/or apply buttons until the form is correct. - OK and apply hook to a doApply() method. For our login use case we have a SessionDetails JavaBean, which is fronted by a SessionDetailsModule. The latter performs validation and provides ValueModels for the LoginDialog. LoginDialog updates SessionDetailsModule. Upon clicking OK, the action delegates to doApply(). If login is successful, the SessionDetailsModule has its trigger channel fired. This writes the changes through to the SessionDetails bean. If login failed, an appropriate error is displayed but the trigger channel not fired. As such the user can chose to refine their entry details, or click cancel. Note that an invalid object state never gets to SessionDetails unless login is correct. This is especially desirable because we have PropertyChangeListeners listening for updates to SessionDetails properties so they can modify the displayed toolbar buttons, pull down menus and views. I think this whole acceptance of invalid object states stems from entity bean days. Anemic domain objects (or any object that by design allows invalid property states) breaks OO design principles. Use a ValueModel or some mediator to prevent invalid objects from being created in the first place. Thus you can take advantage of OO features, such as property listeners. Best regards Ben ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ Springframework-rcp-dev mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev |
From: Ben A. <ben...@ac...> - 2004-06-09 22:23:17
|
> So with that said, the modes I think we need are: > > 1 - as you type validation with a real-time results reporting > pane on the dialog, and binding occurring on submit only. > The validation framework has to be able to handle proposed > property changes and validate them against some context (at a > minimum existing property of the bean, but we probably need > to support other variables as well.) > > 2 - validation / binding occur together on submit only > > 3 - is as you type binding + validation (what we have now) an > option we want? Or does the copy issue just rule it out completely? > > - anything else I missed? On the as-you-type validation issue, why are we building rich GUIs? In my case it's to provide end users with an extremely positive experience by being as easy-to-use as possible, highly responsive and flexible enough to support advanced features. As-you-type validation fits in very well with this goal. When done right you can also decorate JTextFields etc with small icons to indicate errors, warnings etc. If people would like to see an excellent repository of validation styles for rich clients, visit http://www.jgoodies.com/downloads/index.html and run the validation demo. Whilst on the subject of bindings, JGoodies use a ValueModel approach. If you speak German, check out http://www.jgoodies.com/articles/. If you would an English overview, check out http://c2.com/ppr/vmodels.html for instance. A few extra requirements we've found helpful in our Swing app: - As-you-type validation should disable the OK and/or apply buttons until the form is correct. - OK and apply hook to a doApply() method. For our login use case we have a SessionDetails JavaBean, which is fronted by a SessionDetailsModule. The latter performs validation and provides ValueModels for the LoginDialog. LoginDialog updates SessionDetailsModule. Upon clicking OK, the action delegates to doApply(). If login is successful, the SessionDetailsModule has its trigger channel fired. This writes the changes through to the SessionDetails bean. If login failed, an appropriate error is displayed but the trigger channel not fired. As such the user can chose to refine their entry details, or click cancel. Note that an invalid object state never gets to SessionDetails unless login is correct. This is especially desirable because we have PropertyChangeListeners listening for updates to SessionDetails properties so they can modify the displayed toolbar buttons, pull down menus and views. I think this whole acceptance of invalid object states stems from entity bean days. Anemic domain objects (or any object that by design allows invalid property states) breaks OO design principles. Use a ValueModel or some mediator to prevent invalid objects from being created in the first place. Thus you can take advantage of OO features, such as property listeners. Best regards Ben |
From: Keith D. <kd...@cs...> - 2004-06-09 22:02:05
|
Andrew, If what you're trying to do is setup multiple, switchable "views" - where each view is right now the internal frame component that is the page area with the title bar gradient, simply do the following: Define a perspective (page template) for the view. In the future, each page template will support defining multiple views per page, but we're not there yet. :-) For example: <bean id="petPerspective" class="org.springframework.rcp.application.Perspective"> <property name="view"><value>petManagerView</value></property> </bean> Define the view class. <bean id="petManagerView" class="org.springframework.rcp.samples.petclinic.ui.petManagerView"> <property name="clinic"><ref bean="clinic"/></property> </bean> Ensure the "show view" menu is part of your application window menu bar: <bean id="windowMenu" class="org.springframework.rcp.action.contribution.Menu" singleton="false"> <property name="items"> <list> <ref bean="showViewMenu"/> </list> </property> </bean> <bean id="showViewMenu" class="org.springframework.rcp.action.contribution.support.ShowViewMenu" singleton="false"> </bean> Then when you load up the application, you can switch between views by accessing the "Show View" menu and selecting the view. The page will automatically switch internal frame components for you. If you'd like to develop your own action that will display a particular view, use the ShowViewAction class in action.support. Hope this helps! This part of the framework is still quite new, so expect changes as we get it ready for primetime (e.g support for configurable page templates with policies for how views should be layed out, and then support for dockable/stackable view configurations.) Keith _____ From: spr...@li... [mailto:spr...@li...] On Behalf Of Andrew - Development Sent: Wednesday, June 09, 2004 5:00 PM To: Spring Framework Rich Client Platform Subject: [Springframework-rcp-dev] View Work Again Ok, I had a look around, and I've come up with a way to do it, not sure if it is the right way, but this is what I've done. I'd appreciate if you could let me know if this is a valid way, but I feel like a hack doing it? Thanks Used this: public void performAction(String actionId) { logger.debug("Performing action on: " + actionId); // Replace the current view in the perspective with a TimesheetView Application.locator().getActiveWindow().showViewOnPage(view); } I defined this in view-context.xml <!-- Here is the code!!! --> <bean id="newTimeSheetAction" class="org.springframework.rcp.action.DefaultVisualAction"> <property name="actionHandler"> <ref bean="newTimeSheet"/> </property> </bean> <bean id="newTimeSheet" class="org.ats.hrm.ui.TimeSheet"> <property name="view"> <ref bean="timesheetview"/> </property> </bean> <bean id="timesheetview" class="org.ats.hrm.ui.TimesheetView"/> Andrew - DEV |
From: Ronald H. <ro...@co...> - 2004-06-09 21:13:51
|
Keith Donald wrote: >I agree the framework should support different modes of validating / >binding.... > >I've favored the "as you type" mode because it is the most impressive >looking IMO, but it should be quite possible to fire validation on an "OK" >click for example, as a typical command pattern type submit. In that case, >an error dialog would need to popup showing the validation errors that >occurred, and binding would occur as part of the submit, onCancel() would do >nothing as you said. > >So with that said, the modes I think we need are: >1 - as you type validation with a real-time results reporting pane on the >dialog, and binding occurring on submit only. The validation framework has >to be able to handle proposed property changes and validate them against >some context (at a minimum existing property of the bean, but we probably >need to support other variables as well.) > > Yes, perhaps you could provide a template hook back to the object that created the input in the first place, since this is most likely the object that has to know something about context of the field. This would provide us with some general rules that must always be true, and some probably programmatic rules (or sophisticated rules system) to define that certain rules are only true when other situations occur. >2 - validation / binding occur together on submit only > > This is how I know it, but I come from a web world, so we dont have as you type validation, which I think is very powerfull. >3 - is as you type binding + validation (what we have now) an option we >want? Or does the copy issue just rule it out completely? > > Not completely, I think andy's idea of the property editors sounds as a solution as well. >- anything else I missed? > > back to (programmatic defined) validation's as now used in the spring framework, but that would be the onSubmit option. >Ronald - can you or someone else give me an example of different rules on >the same object based on some context (or use case?)? For example, insert >vs. update rules? I'm pretty sure that is a necessary requirement for the >validation framework, I'll just like a concrete example to work a test case >off of. Thanks - Keith > > For instance, when inserting an object, where you want a field to be unique and not rely on the database to ensure this. If you are inserting then its not allowed that this field with this value already exists in the database. If you are updating it can be alright, if this object is the same object. E.g. person with an id, name, firstname and lastname and a login name. You want the login name to be unique, but dont want to rely on the database to ensure this. When inserting if the check of the name yields no results, then we can insert it. When updating, if the check yields a record with the same name, then it could be ok if the found id is the same as the previous id. This means that the name hasnt changed. If however the name is found with a different id, then it isnt allowed. Another testcase is updating a master-detail relation, where it is not allowed to update the master in anyway when there are details. However this is allowed when there are no child relations. So for a simple update scheme the context should be known, and the rules should have knowledge not only about this object but also about child relations, or references without relations to this object. I've ran into situations like these, when there are MD5 hash keys defined on the objects but also on the childs. Changing the child, or the master in anyway would result in different MD5 keys. Ronald > >-----Original Message----- >From: spr...@li... >[mailto:spr...@li...] On Behalf Of >Andy Depue >Sent: Wednesday, June 09, 2004 12:29 PM >To: spr...@li... >Subject: Re: [Springframework-rcp-dev] Change request for >InputApplicationDialog > >I've run into a similar situation as well. I am using something modelled >after "Service Data Objects" in my code and because of time constraints >wrote >my own input dialog since SDOs use a different style of property access. >However, I have found that I can still use PropertyEditors with my SDOs >(PropertyEditors are pretty independent of any actual property access >scheme). Since PropertyEditors can store a property's value independent of >the property, I use PropertyEditors to store the property value while >editing >and tie everything to the PropertyEditor instead of the actual property. If > >the user hits Cancel, I simply do nothing. If they hit OK, I copy the value > >from the PropertyEditor to the actual property. I haven't looked at the >binder and validation code enough to know if this approach even makes sense >for them, but I thought I'd throw it out. > > >On Wednesday 09 June 2004 06:48 am, Keith Donald wrote: > > >>I've been wresting with this issue myself. >> >>I think the larger question is what is the correct behavior for the bean >>binder + validation framework here? >> >>To support the as-you-type-validation, the binder is updating the property >>on each keystroke. This then triggers revalidation of the declarative >>validation rules associated with this property. The rules validate the >>bean object as a whole, which allows validation of the new property value >>in the context of other bean properties (for example, that firstName is >> >> >not > > >>equal to lastName, or whatever.) So basically, the reason the binder >> >> >binds > > >>to the bean, is because the validation system evaluates the bean as a >>whole, not just the property value along with a passed in, unmodified >>reference to the bean. >> >>But I completely see the point it, especially in a client side >> >> >environment, > > >>not to modify the bean (even transiently) until a "finish" commit has been >>invoked. So the issue to figure out is how to best support this. >> >>Should we: >> >>Enhance the validation system to take a new "proposed" property value and >>an unmodified instance of the bean as a context variable to use to support >>validation against other properties (or possibly other objects?) Maybe it >>doesn't seem wise to assume validating the bean as a whole is good >>enough... (though it is simpler.) In this case, the binder won't actually >>do any binding, but will just do validation & reporting. The binding will >>need to happen on a commit, which will be on the finish button. >> >>Or >> >>Continue the behavior is, but have the dialog class make a copy, and >>restore it on cancel? This seems, like you said, easy to forget. >> >>Hmm... >> >>In the meantime I can add a setter to the field. No problem. >> >>Keith >> >> > > >------------------------------------------------------- >This SF.Net email is sponsored by: GNOME Foundation >Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. >GNOME Users and Developers European Conference, 28-30th June in Norway >http://2004/guadec.org >_______________________________________________ >Springframework-rcp-dev mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: GNOME Foundation >Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. >GNOME Users and Developers European Conference, 28-30th June in Norway >http://2004/guadec.org >_______________________________________________ >Springframework-rcp-dev mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > > |
From: Andrew - D. <at....@ds...> - 2004-06-09 20:59:35
|
Ok, I had a look around, and I've come up with a way to do it, not sure if it is the right way, but this is what I've done. I'd appreciate if you could let me know if this is a valid way, but I feel like a hack doing it? Thanks Used this: public void performAction(String actionId) { logger.debug("Performing action on: " + actionId); // Replace the current view in the perspective with a TimesheetView Application.locator().getActiveWindow().showViewOnPage(view); } I defined this in view-context.xml <!-- Here is the code!!! --> <bean id="newTimeSheetAction" class="org.springframework.rcp.action.DefaultVisualAction"> <property name="actionHandler"> <ref bean="newTimeSheet"/> </property> </bean> <bean id="newTimeSheet" class="org.ats.hrm.ui.TimeSheet"> <property name="view"> <ref bean="timesheetview"/> </property> </bean> <bean id="timesheetview" class="org.ats.hrm.ui.TimesheetView"/> Andrew - DEV |
From: Andrew - D. <at....@ds...> - 2004-06-09 19:57:12
|
Had a bit more time to play around tonight which is good. So, I have a toolbar action, which I want to launch a new 'view' in the current perspective (I think this is how it works). So, I have this: public class TimeSheet implements ActionHandler { private Log logger = LogFactory.getLog(getClass()); /* (non-Javadoc) * @see org.springframework.rcp.action.ActionHandler#performAction(java.lang.String) */ public void performAction(String actionId) { logger.debug("Performing action on: " + actionId); // Replace the current view in the perspective with a TimesheetView // But what do I put here? } } But I'm just completely lost on what should exist to make the view appear and replace the view that already exists there.? I was thinking that I define a new view in the view-context and pass that to this action, but that seems wrong. A little help? Thanks. Andrew - DEV |