Forwarding this to the dev list for comment...
--- On Sun, 8/31/08, Adrian Crum <[hidden email]> wrote: > From: Adrian Crum <[hidden email]> > Subject: Re: Adding actions instead of replacing them in extended forms > To: [hidden email] > Date: Sunday, August 31, 2008, 10:01 AM > I can make the change now to have the form widget simply > extend the parent form's actions. (It seems to me this > is what was intended, but somehow it got overlooked in the > java code.) > > If you would like to see additional abilities added to the > form widget, then we will have to wait for others to offer > their comments. > > -Adrian > > > --- On Sun, 8/31/08, Bruno Busco > <[hidden email]> wrote: > > > From: Bruno Busco <[hidden email]> > > Subject: Re: Adding actions instead of replacing them > in extended forms > > To: [hidden email] > > Date: Sunday, August 31, 2008, 9:43 AM > > Adrian, > > this pattern is not flexible enough why do not try to > get > > it more powerfull? > > In the example application you can find: > > > > <form name="EditExampleExt" > > extends="EditExample" > > > > > extends-resource="component://example/widget/example/ExampleForms.xml"> > > <!-- NOTE: add new fields for the > EditExample > > form here --> > > <field > > name="exampleText"><display > > description="This example text > > means we are in the extended > form."/></field> > > <!-- In order for these to be at the bottom > of > > the form, we need to > > hide the buttons from the > > original form, and then create new ones. > We > > could use the > > sort-order element, but that > > doesn't work well when we want to > allow > > changes in the original > > form. --> > > <field name="submitButton" > > > use-when="example!=null"><hidden/></field> > > <field name="submitButton" > > > use-when="example==null"><hidden/></field> > > <field name="submitButtonOvrd" > > title="${uiLabelMap.CommonCreate}" > > use-when="example==null" > > widget-style="smallSubmit"><submit > > button-type="button"/></field> > > <field name="submitButtonOvrd" > > title="${uiLabelMap.CommonUpdate}" > > use-when="example!=null" > > widget-style="smallSubmit"><submit > > button-type="button"/></field> > > </form> > > > > From the comment I can see that the extending system > need > > to be improved for > > the field adding also. > > -Bruno > > > > 2008/8/31 Adrian Crum <[hidden email]> > > > > > I don't like that idea. The pattern in other > > things like this is something > > > like "I want all of this widget's > actions, > > plus I want to add these > > > actions." > > > > > > -Adrian > > > > > > --- On Sun, 8/31/08, Bruno Busco > > <[hidden email]> wrote: > > > > > > > From: Bruno Busco > <[hidden email]> > > > > Subject: Re: Adding actions instead of > replacing > > them in extended forms > > > > To: [hidden email], > [hidden email] > > > > Date: Sunday, August 31, 2008, 9:23 AM > > > > I would suggest to implement something like > a tag > > (i.e. > > > > <call-parent-actions>) that will let > to > > call the > > > > parent actions like this: > > > > <form name"formP"> > > > > <actions> > > > > <action1> > > > > <action2> > > > > </actions> > > > > </form> > > > > > > > > <form name"formC" > > > > extends="formP"> > > > > <actions> > > > > <actionA> > > > > <call-parent-actions> > > > > <actionB> > > > > </actions> > > > > </form> > > > > > > > > In this way the user can have parent form > actions > > executed > > > > before or after > > > > the child actions. It will be also possible > to > > have them > > > > NOT executed if the > > > > <call-parent-actions> tag is not > included. > > > > -Bruno > > > > > > > > 2008/8/31 Adrian Crum > > <[hidden email]> > > > > > > > > > That's interesting - the menu > widget > > extends > > > > actions, but the form widget > > > > > replaces them. > > > > > > > > > > Having the form widget extend actions > would > > be a > > > > simple change to make. > > > > > > > > > > Any objections? > > > > > > > > > > -Adrian > > > > > > > > > > > > > > > --- On Sun, 8/31/08, Bruno Busco > > > > <[hidden email]> wrote: > > > > > > > > > > > From: Bruno Busco > > <[hidden email]> > > > > > > Subject: Adding actions instead of > > replacing them > > > > in extended forms > > > > > > To: [hidden email] > > > > > > Date: Sunday, August 31, 2008, > 2:08 AM > > > > > > Hi, > > > > > > when extending a form is there a > way to > > ADD > > > > actions to the > > > > > > ones defined in > > > > > > the original form? > > > > > > What I see now is that actions > defined > > in the > > > > original form > > > > > > are completely > > > > > > replaced by the actions defined in > the > > extended > > > > form. > > > > > > > > > > > > Thank you, > > > > > > -Bruno > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
Adrian,
if we go this route, we have to check if there are existing forms (that extend another form) that could be affected by this change. Cheers Jacopo On Aug 31, 2008, at 10:44 PM, Adrian Crum wrote: > Forwarding this to the dev list for comment... > > > --- On Sun, 8/31/08, Adrian Crum <[hidden email]> wrote: > >> From: Adrian Crum <[hidden email]> >> Subject: Re: Adding actions instead of replacing them in extended >> forms >> To: [hidden email] >> Date: Sunday, August 31, 2008, 10:01 AM >> I can make the change now to have the form widget simply >> extend the parent form's actions. (It seems to me this >> is what was intended, but somehow it got overlooked in the >> java code.) >> >> If you would like to see additional abilities added to the >> form widget, then we will have to wait for others to offer >> their comments. >> >> -Adrian >> >> >> --- On Sun, 8/31/08, Bruno Busco >> <[hidden email]> wrote: >> >>> From: Bruno Busco <[hidden email]> >>> Subject: Re: Adding actions instead of replacing them >> in extended forms >>> To: [hidden email] >>> Date: Sunday, August 31, 2008, 9:43 AM >>> Adrian, >>> this pattern is not flexible enough why do not try to >> get >>> it more powerfull? >>> In the example application you can find: >>> >>> <form name="EditExampleExt" >>> extends="EditExample" >>> >>> >> extends-resource="component://example/widget/example/ >> ExampleForms.xml"> >>> <!-- NOTE: add new fields for the >> EditExample >>> form here --> >>> <field >>> name="exampleText"><display >>> description="This example text >>> means we are in the extended >> form."/></field> >>> <!-- In order for these to be at the bottom >> of >>> the form, we need to >>> hide the buttons from the >>> original form, and then create new ones. >> We >>> could use the >>> sort-order element, but that >>> doesn't work well when we want to >> allow >>> changes in the original >>> form. --> >>> <field name="submitButton" >>> >> use-when="example!=null"><hidden/></field> >>> <field name="submitButton" >>> >> use-when="example==null"><hidden/></field> >>> <field name="submitButtonOvrd" >>> title="${uiLabelMap.CommonCreate}" >>> use-when="example==null" >>> widget-style="smallSubmit"><submit >>> button-type="button"/></field> >>> <field name="submitButtonOvrd" >>> title="${uiLabelMap.CommonUpdate}" >>> use-when="example!=null" >>> widget-style="smallSubmit"><submit >>> button-type="button"/></field> >>> </form> >>> >>> From the comment I can see that the extending system >> need >>> to be improved for >>> the field adding also. >>> -Bruno >>> >>> 2008/8/31 Adrian Crum <[hidden email]> >>> >>>> I don't like that idea. The pattern in other >>> things like this is something >>>> like "I want all of this widget's >> actions, >>> plus I want to add these >>>> actions." >>>> >>>> -Adrian >>>> >>>> --- On Sun, 8/31/08, Bruno Busco >>> <[hidden email]> wrote: >>>> >>>>> From: Bruno Busco >> <[hidden email]> >>>>> Subject: Re: Adding actions instead of >> replacing >>> them in extended forms >>>>> To: [hidden email], >> [hidden email] >>>>> Date: Sunday, August 31, 2008, 9:23 AM >>>>> I would suggest to implement something like >> a tag >>> (i.e. >>>>> <call-parent-actions>) that will let >> to >>> call the >>>>> parent actions like this: >>>>> <form name"formP"> >>>>> <actions> >>>>> <action1> >>>>> <action2> >>>>> </actions> >>>>> </form> >>>>> >>>>> <form name"formC" >>>>> extends="formP"> >>>>> <actions> >>>>> <actionA> >>>>> <call-parent-actions> >>>>> <actionB> >>>>> </actions> >>>>> </form> >>>>> >>>>> In this way the user can have parent form >> actions >>> executed >>>>> before or after >>>>> the child actions. It will be also possible >> to >>> have them >>>>> NOT executed if the >>>>> <call-parent-actions> tag is not >> included. >>>>> -Bruno >>>>> >>>>> 2008/8/31 Adrian Crum >>> <[hidden email]> >>>>> >>>>>> That's interesting - the menu >> widget >>> extends >>>>> actions, but the form widget >>>>>> replaces them. >>>>>> >>>>>> Having the form widget extend actions >> would >>> be a >>>>> simple change to make. >>>>>> >>>>>> Any objections? >>>>>> >>>>>> -Adrian >>>>>> >>>>>> >>>>>> --- On Sun, 8/31/08, Bruno Busco >>>>> <[hidden email]> wrote: >>>>>> >>>>>>> From: Bruno Busco >>> <[hidden email]> >>>>>>> Subject: Adding actions instead of >>> replacing them >>>>> in extended forms >>>>>>> To: [hidden email] >>>>>>> Date: Sunday, August 31, 2008, >> 2:08 AM >>>>>>> Hi, >>>>>>> when extending a form is there a >> way to >>> ADD >>>>> actions to the >>>>>>> ones defined in >>>>>>> the original form? >>>>>>> What I see now is that actions >> defined >>> in the >>>>> original form >>>>>>> are completely >>>>>>> replaced by the actions defined in >> the >>> extended >>>>> form. >>>>>>> >>>>>>> Thank you, >>>>>>> -Bruno >>>>>> >>>>>> >>>>>> >>>>>> >>>> >>>> >>>> >>>> > > > smime.p7s (3K) Download Attachment |
Jacopo,
Right now an extended form widget will use the parent form's actions, and if the extended form has actions, those actions *replace* the parent form's actions. I can see where that behavior might be expected or wanted, but I can also see where you would want the extended form's actions *added* to the parent form's actions. So, I guess we need to decide what is the correct behavior with extending form widget actions. -Adrian --- On Sun, 8/31/08, Jacopo Cappellato <[hidden email]> wrote: > From: Jacopo Cappellato <[hidden email]> > Subject: Re: Adding actions instead of replacing them in extended forms > To: [hidden email] > Date: Sunday, August 31, 2008, 10:26 AM > Adrian, > > if we go this route, we have to check if there are existing > forms > (that extend another form) that could be affected by this > change. > > Cheers > > Jacopo > > > On Aug 31, 2008, at 10:44 PM, Adrian Crum wrote: > > > Forwarding this to the dev list for comment... > > > > > > --- On Sun, 8/31/08, Adrian Crum > <[hidden email]> wrote: > > > >> From: Adrian Crum <[hidden email]> > >> Subject: Re: Adding actions instead of replacing > them in extended > >> forms > >> To: [hidden email] > >> Date: Sunday, August 31, 2008, 10:01 AM > >> I can make the change now to have the form widget > simply > >> extend the parent form's actions. (It seems to > me this > >> is what was intended, but somehow it got > overlooked in the > >> java code.) > >> > >> If you would like to see additional abilities > added to the > >> form widget, then we will have to wait for others > to offer > >> their comments. > >> > >> -Adrian > >> > >> > >> --- On Sun, 8/31/08, Bruno Busco > >> <[hidden email]> wrote: > >> > >>> From: Bruno Busco > <[hidden email]> > >>> Subject: Re: Adding actions instead of > replacing them > >> in extended forms > >>> To: [hidden email] > >>> Date: Sunday, August 31, 2008, 9:43 AM > >>> Adrian, > >>> this pattern is not flexible enough why do not > try to > >> get > >>> it more powerfull? > >>> In the example application you can find: > >>> > >>> <form name="EditExampleExt" > >>> extends="EditExample" > >>> > >>> > >> > extends-resource="component://example/widget/example/ > >> ExampleForms.xml"> > >>> <!-- NOTE: add new fields for the > >> EditExample > >>> form here --> > >>> <field > >>> name="exampleText"><display > >>> description="This example text > >>> means we are in the extended > >> form."/></field> > >>> <!-- In order for these to be at the > bottom > >> of > >>> the form, we need to > >>> hide the buttons from the > >>> original form, and then create new > ones. > >> We > >>> could use the > >>> sort-order element, but that > >>> doesn't work well when we want > to > >> allow > >>> changes in the original > >>> form. --> > >>> <field name="submitButton" > >>> > >> > use-when="example!=null"><hidden/></field> > >>> <field name="submitButton" > >>> > >> > use-when="example==null"><hidden/></field> > >>> <field > name="submitButtonOvrd" > >>> title="${uiLabelMap.CommonCreate}" > >>> use-when="example==null" > >>> > widget-style="smallSubmit"><submit > >>> > button-type="button"/></field> > >>> <field > name="submitButtonOvrd" > >>> title="${uiLabelMap.CommonUpdate}" > >>> use-when="example!=null" > >>> > widget-style="smallSubmit"><submit > >>> > button-type="button"/></field> > >>> </form> > >>> > >>> From the comment I can see that the extending > system > >> need > >>> to be improved for > >>> the field adding also. > >>> -Bruno > >>> > >>> 2008/8/31 Adrian Crum > <[hidden email]> > >>> > >>>> I don't like that idea. The pattern in > other > >>> things like this is something > >>>> like "I want all of this widget's > >> actions, > >>> plus I want to add these > >>>> actions." > >>>> > >>>> -Adrian > >>>> > >>>> --- On Sun, 8/31/08, Bruno Busco > >>> <[hidden email]> wrote: > >>>> > >>>>> From: Bruno Busco > >> <[hidden email]> > >>>>> Subject: Re: Adding actions instead of > >> replacing > >>> them in extended forms > >>>>> To: [hidden email], > >> [hidden email] > >>>>> Date: Sunday, August 31, 2008, 9:23 AM > >>>>> I would suggest to implement something > like > >> a tag > >>> (i.e. > >>>>> <call-parent-actions>) that will > let > >> to > >>> call the > >>>>> parent actions like this: > >>>>> <form name"formP"> > >>>>> <actions> > >>>>> <action1> > >>>>> <action2> > >>>>> </actions> > >>>>> </form> > >>>>> > >>>>> <form name"formC" > >>>>> extends="formP"> > >>>>> <actions> > >>>>> <actionA> > >>>>> <call-parent-actions> > >>>>> <actionB> > >>>>> </actions> > >>>>> </form> > >>>>> > >>>>> In this way the user can have parent > form > >> actions > >>> executed > >>>>> before or after > >>>>> the child actions. It will be also > possible > >> to > >>> have them > >>>>> NOT executed if the > >>>>> <call-parent-actions> tag is not > >> included. > >>>>> -Bruno > >>>>> > >>>>> 2008/8/31 Adrian Crum > >>> <[hidden email]> > >>>>> > >>>>>> That's interesting - the menu > >> widget > >>> extends > >>>>> actions, but the form widget > >>>>>> replaces them. > >>>>>> > >>>>>> Having the form widget extend > actions > >> would > >>> be a > >>>>> simple change to make. > >>>>>> > >>>>>> Any objections? > >>>>>> > >>>>>> -Adrian > >>>>>> > >>>>>> > >>>>>> --- On Sun, 8/31/08, Bruno Busco > >>>>> <[hidden email]> wrote: > >>>>>> > >>>>>>> From: Bruno Busco > >>> <[hidden email]> > >>>>>>> Subject: Adding actions > instead of > >>> replacing them > >>>>> in extended forms > >>>>>>> To: [hidden email] > >>>>>>> Date: Sunday, August 31, 2008, > >> 2:08 AM > >>>>>>> Hi, > >>>>>>> when extending a form is there > a > >> way to > >>> ADD > >>>>> actions to the > >>>>>>> ones defined in > >>>>>>> the original form? > >>>>>>> What I see now is that actions > >> defined > >>> in the > >>>>> original form > >>>>>>> are completely > >>>>>>> replaced by the actions > defined in > >> the > >>> extended > >>>>> form. > >>>>>>> > >>>>>>> Thank you, > >>>>>>> -Bruno > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>> > >>>> > >>>> > >>>> > > > > > > |
Agreed. But if we change the behavior, before we do it we have to
verify if existing form will be affected because they were implemented based on the old way. This is the meaning of my last message. Jacopo On Aug 31, 2008, at 11:12 PM, Adrian Crum wrote: > Jacopo, > > Right now an extended form widget will use the parent form's > actions, and if the extended form has actions, those actions > *replace* the parent form's actions. > > I can see where that behavior might be expected or wanted, but I can > also see where you would want the extended form's actions *added* to > the parent form's actions. > > So, I guess we need to decide what is the correct behavior with > extending form widget actions. > > -Adrian > > > --- On Sun, 8/31/08, Jacopo Cappellato <[hidden email]> > wrote: > >> From: Jacopo Cappellato <[hidden email]> >> Subject: Re: Adding actions instead of replacing them in extended >> forms >> To: [hidden email] >> Date: Sunday, August 31, 2008, 10:26 AM >> Adrian, >> >> if we go this route, we have to check if there are existing >> forms >> (that extend another form) that could be affected by this >> change. >> >> Cheers >> >> Jacopo >> >> >> On Aug 31, 2008, at 10:44 PM, Adrian Crum wrote: >> >>> Forwarding this to the dev list for comment... >>> >>> >>> --- On Sun, 8/31/08, Adrian Crum >> <[hidden email]> wrote: >>> >>>> From: Adrian Crum <[hidden email]> >>>> Subject: Re: Adding actions instead of replacing >> them in extended >>>> forms >>>> To: [hidden email] >>>> Date: Sunday, August 31, 2008, 10:01 AM >>>> I can make the change now to have the form widget >> simply >>>> extend the parent form's actions. (It seems to >> me this >>>> is what was intended, but somehow it got >> overlooked in the >>>> java code.) >>>> >>>> If you would like to see additional abilities >> added to the >>>> form widget, then we will have to wait for others >> to offer >>>> their comments. >>>> >>>> -Adrian >>>> >>>> >>>> --- On Sun, 8/31/08, Bruno Busco >>>> <[hidden email]> wrote: >>>> >>>>> From: Bruno Busco >> <[hidden email]> >>>>> Subject: Re: Adding actions instead of >> replacing them >>>> in extended forms >>>>> To: [hidden email] >>>>> Date: Sunday, August 31, 2008, 9:43 AM >>>>> Adrian, >>>>> this pattern is not flexible enough why do not >> try to >>>> get >>>>> it more powerfull? >>>>> In the example application you can find: >>>>> >>>>> <form name="EditExampleExt" >>>>> extends="EditExample" >>>>> >>>>> >>>> >> extends-resource="component://example/widget/example/ >>>> ExampleForms.xml"> >>>>> <!-- NOTE: add new fields for the >>>> EditExample >>>>> form here --> >>>>> <field >>>>> name="exampleText"><display >>>>> description="This example text >>>>> means we are in the extended >>>> form."/></field> >>>>> <!-- In order for these to be at the >> bottom >>>> of >>>>> the form, we need to >>>>> hide the buttons from the >>>>> original form, and then create new >> ones. >>>> We >>>>> could use the >>>>> sort-order element, but that >>>>> doesn't work well when we want >> to >>>> allow >>>>> changes in the original >>>>> form. --> >>>>> <field name="submitButton" >>>>> >>>> >> use-when="example!=null"><hidden/></field> >>>>> <field name="submitButton" >>>>> >>>> >> use-when="example==null"><hidden/></field> >>>>> <field >> name="submitButtonOvrd" >>>>> title="${uiLabelMap.CommonCreate}" >>>>> use-when="example==null" >>>>> >> widget-style="smallSubmit"><submit >>>>> >> button-type="button"/></field> >>>>> <field >> name="submitButtonOvrd" >>>>> title="${uiLabelMap.CommonUpdate}" >>>>> use-when="example!=null" >>>>> >> widget-style="smallSubmit"><submit >>>>> >> button-type="button"/></field> >>>>> </form> >>>>> >>>>> From the comment I can see that the extending >> system >>>> need >>>>> to be improved for >>>>> the field adding also. >>>>> -Bruno >>>>> >>>>> 2008/8/31 Adrian Crum >> <[hidden email]> >>>>> >>>>>> I don't like that idea. The pattern in >> other >>>>> things like this is something >>>>>> like "I want all of this widget's >>>> actions, >>>>> plus I want to add these >>>>>> actions." >>>>>> >>>>>> -Adrian >>>>>> >>>>>> --- On Sun, 8/31/08, Bruno Busco >>>>> <[hidden email]> wrote: >>>>>> >>>>>>> From: Bruno Busco >>>> <[hidden email]> >>>>>>> Subject: Re: Adding actions instead of >>>> replacing >>>>> them in extended forms >>>>>>> To: [hidden email], >>>> [hidden email] >>>>>>> Date: Sunday, August 31, 2008, 9:23 AM >>>>>>> I would suggest to implement something >> like >>>> a tag >>>>> (i.e. >>>>>>> <call-parent-actions>) that will >> let >>>> to >>>>> call the >>>>>>> parent actions like this: >>>>>>> <form name"formP"> >>>>>>> <actions> >>>>>>> <action1> >>>>>>> <action2> >>>>>>> </actions> >>>>>>> </form> >>>>>>> >>>>>>> <form name"formC" >>>>>>> extends="formP"> >>>>>>> <actions> >>>>>>> <actionA> >>>>>>> <call-parent-actions> >>>>>>> <actionB> >>>>>>> </actions> >>>>>>> </form> >>>>>>> >>>>>>> In this way the user can have parent >> form >>>> actions >>>>> executed >>>>>>> before or after >>>>>>> the child actions. It will be also >> possible >>>> to >>>>> have them >>>>>>> NOT executed if the >>>>>>> <call-parent-actions> tag is not >>>> included. >>>>>>> -Bruno >>>>>>> >>>>>>> 2008/8/31 Adrian Crum >>>>> <[hidden email]> >>>>>>> >>>>>>>> That's interesting - the menu >>>> widget >>>>> extends >>>>>>> actions, but the form widget >>>>>>>> replaces them. >>>>>>>> >>>>>>>> Having the form widget extend >> actions >>>> would >>>>> be a >>>>>>> simple change to make. >>>>>>>> >>>>>>>> Any objections? >>>>>>>> >>>>>>>> -Adrian >>>>>>>> >>>>>>>> >>>>>>>> --- On Sun, 8/31/08, Bruno Busco >>>>>>> <[hidden email]> wrote: >>>>>>>> >>>>>>>>> From: Bruno Busco >>>>> <[hidden email]> >>>>>>>>> Subject: Adding actions >> instead of >>>>> replacing them >>>>>>> in extended forms >>>>>>>>> To: [hidden email] >>>>>>>>> Date: Sunday, August 31, 2008, >>>> 2:08 AM >>>>>>>>> Hi, >>>>>>>>> when extending a form is there >> a >>>> way to >>>>> ADD >>>>>>> actions to the >>>>>>>>> ones defined in >>>>>>>>> the original form? >>>>>>>>> What I see now is that actions >>>> defined >>>>> in the >>>>>>> original form >>>>>>>>> are completely >>>>>>>>> replaced by the actions >> defined in >>>> the >>>>> extended >>>>>>> form. >>>>>>>>> >>>>>>>>> Thank you, >>>>>>>>> -Bruno >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>> >>> >>> > > > smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |