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 <[EMAIL PROTECTED]> wrote:From: Adrian Crum <[EMAIL PROTECTED]>Subject: Re: Adding actions instead of replacing them in extended formsTo: [EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> wrote:From: Bruno Busco <[EMAIL PROTECTED]> Subject: Re: Adding actions instead of replacing themin extended formsTo: [EMAIL PROTECTED] Date: Sunday, August 31, 2008, 9:43 AM Adrian, this pattern is not flexible enough why do not try togetextends-resource="component://example/widget/example/ ExampleForms.xml">it more powerfull? In the example application you can find: <form name="EditExampleExt" extends="EditExample"<!-- NOTE: add new fields for theEditExampleform here --> <field name="exampleText"><display description="This example text means we are in the extendedform."/></field><!-- In order for these to be at the bottomofthe form, we need to hide the buttons from the original form, and then create new ones.Wecould use the sort-order element, but that doesn't work well when we want toallowchanges 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 systemneedto be improved for the field adding also. -Bruno 2008/8/31 Adrian Crum <[EMAIL PROTECTED]>I don't like that idea. The pattern in otherthings like this is somethinglike "I want all of this widget'sactions,plus I want to add theseactions." -Adrian --- On Sun, 8/31/08, Bruno Busco<[EMAIL PROTECTED]> wrote:From: Bruno Busco<[EMAIL PROTECTED]>Subject: Re: Adding actions instead ofreplacingthem in extended formsTo: [EMAIL PROTECTED],[EMAIL PROTECTED]Date: Sunday, August 31, 2008, 9:23 AM I would suggest to implement something likea tag(i.e.<call-parent-actions>) that will lettocall theparent 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 formactionsexecutedbefore or after the child actions. It will be also possibletohave themNOT executed if the <call-parent-actions> tag is notincluded.-Bruno 2008/8/31 Adrian Crum<[EMAIL PROTECTED]>That's interesting - the menuwidgetextendsactions, but the form widgetreplaces them. Having the form widget extend actionswouldbe asimple change to make.Any objections? -Adrian --- On Sun, 8/31/08, Bruno Busco<[EMAIL PROTECTED]> wrote:From: Bruno Busco<[EMAIL PROTECTED]>Subject: Adding actions instead ofreplacing themin extended formsTo: [EMAIL PROTECTED] Date: Sunday, August 31, 2008,2:08 AMHi, when extending a form is there away toADDactions to theones defined in the original form? What I see now is that actionsdefinedin theoriginal formare completely replaced by the actions defined intheextendedform.Thank you, -Bruno
smime.p7s
Description: S/MIME cryptographic signature
