action list in form inheritance
------------------------------- Key: OFBIZ-2889 URL: https://issues.apache.org/jira/browse/OFBIZ-2889 Project: OFBiz Issue Type: Improvement Reporter: Harmeet Bedi Fix For: SVN trunk Attachments: ModelForm.java.diff, widget-form.xsd.diff Purpose: make inheritance options more flexible and document them better for end user consumption. Following XSD attributes <xs:attribute name="extends-actions" default="override"> <xs:annotation> <xs:documentation>If form derives from parent, form actions may override existing parent form actions, append to parent form actions or ignore parent form actions</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="append"> <xs:annotation> <xs:documentation>append form actions to list of parent form actions</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="prepend"> <xs:annotation> <xs:documentation>prepend form actions to list of parent form actions</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="override"> <xs:annotation> <xs:documentation>If action block exists, ignore parent action list. If action block does not exist use the parent action list </xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="ignore"> <xs:annotation> <xs:documentation>Ignore parent form actions. Same as override with no actions specified in actions block. </xs:documentation> </xs:annotation> </xs:enumeration> </xs:restriction> </xs:simpleType> </xs:attribute> same for <xs:attribute name="extends-row-actions" default="override"> .... </xs:attribute> Attaching patches for xsd and ModelForm -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Harmeet Bedi updated OFBIZ-2889: -------------------------------- Attachment: widget-form.xsd.diff ModelForm.java.diff > action list in form inheritance > ------------------------------- > > Key: OFBIZ-2889 > URL: https://issues.apache.org/jira/browse/OFBIZ-2889 > Project: OFBiz > Issue Type: Improvement > Reporter: Harmeet Bedi > Fix For: SVN trunk > > Attachments: ModelForm.java.diff, widget-form.xsd.diff > > > Purpose: make inheritance options more flexible and document them better for end user consumption. > Following XSD attributes > <xs:attribute name="extends-actions" default="override"> > <xs:annotation> > <xs:documentation>If form derives from parent, form actions may > override existing parent form actions, append to parent form actions or ignore > parent form actions</xs:documentation> > </xs:annotation> > <xs:simpleType> > <xs:restriction base="xs:token"> > <xs:enumeration value="append"> > <xs:annotation> > <xs:documentation>append form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="prepend"> > <xs:annotation> > <xs:documentation>prepend form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="override"> > <xs:annotation> > <xs:documentation>If action block exists, ignore parent action list. > If action block does not exist use the parent action list > </xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="ignore"> > <xs:annotation> > <xs:documentation>Ignore parent form actions. > Same as override with no actions specified in actions block. > </xs:documentation> > </xs:annotation> > </xs:enumeration> > </xs:restriction> > </xs:simpleType> > </xs:attribute> > same for > <xs:attribute name="extends-row-actions" default="override"> > .... > </xs:attribute> > Attaching patches for xsd and ModelForm -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750569#action_12750569 ] Adrian Crum commented on OFBIZ-2889: ------------------------------------ As I mentioned on the mailing list, I think this would be handled better by an element: {code} <actions> <run-parent-actions/> <!-- Child actions --> </actions> {code} Instead of attributes specifying where to run parent actions, just put the element where you want them to run. > action list in form inheritance > ------------------------------- > > Key: OFBIZ-2889 > URL: https://issues.apache.org/jira/browse/OFBIZ-2889 > Project: OFBiz > Issue Type: Improvement > Reporter: Harmeet Bedi > Fix For: SVN trunk > > Attachments: ModelForm.java.diff, widget-form.xsd.diff > > > Purpose: make inheritance options more flexible and document them better for end user consumption. > Following XSD attributes > <xs:attribute name="extends-actions" default="override"> > <xs:annotation> > <xs:documentation>If form derives from parent, form actions may > override existing parent form actions, append to parent form actions or ignore > parent form actions</xs:documentation> > </xs:annotation> > <xs:simpleType> > <xs:restriction base="xs:token"> > <xs:enumeration value="append"> > <xs:annotation> > <xs:documentation>append form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="prepend"> > <xs:annotation> > <xs:documentation>prepend form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="override"> > <xs:annotation> > <xs:documentation>If action block exists, ignore parent action list. > If action block does not exist use the parent action list > </xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="ignore"> > <xs:annotation> > <xs:documentation>Ignore parent form actions. > Same as override with no actions specified in actions block. > </xs:documentation> > </xs:annotation> > </xs:enumeration> > </xs:restriction> > </xs:simpleType> > </xs:attribute> > same for > <xs:attribute name="extends-row-actions" default="override"> > .... > </xs:attribute> > Attaching patches for xsd and ModelForm -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750598#action_12750598 ] Harmeet Bedi commented on OFBIZ-2889: ------------------------------------- I assume if there is no actions block, it would be same as implicit 'run-parent-actions' i.e. current default behavior. Is run-parent-actions the consensus with you and David ? I assume you want run-actions in place of attributes, not as potential add on to these attributes, if someone needs it at a later date. > action list in form inheritance > ------------------------------- > > Key: OFBIZ-2889 > URL: https://issues.apache.org/jira/browse/OFBIZ-2889 > Project: OFBiz > Issue Type: Improvement > Reporter: Harmeet Bedi > Fix For: SVN trunk > > Attachments: ModelForm.java.diff, widget-form.xsd.diff > > > Purpose: make inheritance options more flexible and document them better for end user consumption. > Following XSD attributes > <xs:attribute name="extends-actions" default="override"> > <xs:annotation> > <xs:documentation>If form derives from parent, form actions may > override existing parent form actions, append to parent form actions or ignore > parent form actions</xs:documentation> > </xs:annotation> > <xs:simpleType> > <xs:restriction base="xs:token"> > <xs:enumeration value="append"> > <xs:annotation> > <xs:documentation>append form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="prepend"> > <xs:annotation> > <xs:documentation>prepend form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="override"> > <xs:annotation> > <xs:documentation>If action block exists, ignore parent action list. > If action block does not exist use the parent action list > </xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="ignore"> > <xs:annotation> > <xs:documentation>Ignore parent form actions. > Same as override with no actions specified in actions block. > </xs:documentation> > </xs:annotation> > </xs:enumeration> > </xs:restriction> > </xs:simpleType> > </xs:attribute> > same for > <xs:attribute name="extends-row-actions" default="override"> > .... > </xs:attribute> > Attaching patches for xsd and ModelForm -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750609#action_12750609 ] Adrian Crum commented on OFBIZ-2889: ------------------------------------ The current form behavior is preserved: if child actions exist, they REPLACE parent actions - the parent actions are not run. If you want to run the parent actions, then insert a <run-parent-actions> element in the child's <actions> element. No additional attributes are needed. No additional documentation is needed - the element tag explains what it does. > action list in form inheritance > ------------------------------- > > Key: OFBIZ-2889 > URL: https://issues.apache.org/jira/browse/OFBIZ-2889 > Project: OFBiz > Issue Type: Improvement > Reporter: Harmeet Bedi > Fix For: SVN trunk > > Attachments: ModelForm.java.diff, widget-form.xsd.diff > > > Purpose: make inheritance options more flexible and document them better for end user consumption. > Following XSD attributes > <xs:attribute name="extends-actions" default="override"> > <xs:annotation> > <xs:documentation>If form derives from parent, form actions may > override existing parent form actions, append to parent form actions or ignore > parent form actions</xs:documentation> > </xs:annotation> > <xs:simpleType> > <xs:restriction base="xs:token"> > <xs:enumeration value="append"> > <xs:annotation> > <xs:documentation>append form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="prepend"> > <xs:annotation> > <xs:documentation>prepend form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="override"> > <xs:annotation> > <xs:documentation>If action block exists, ignore parent action list. > If action block does not exist use the parent action list > </xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="ignore"> > <xs:annotation> > <xs:documentation>Ignore parent form actions. > Same as override with no actions specified in actions block. > </xs:documentation> > </xs:annotation> > </xs:enumeration> > </xs:restriction> > </xs:simpleType> > </xs:attribute> > same for > <xs:attribute name="extends-row-actions" default="override"> > .... > </xs:attribute> > Attaching patches for xsd and ModelForm -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750618#action_12750618 ] David E. Jones commented on OFBIZ-2889: --------------------------------------- The run-parent-actions element would have the advantage of making it possible to specify when the parent actions run, ie you could have stuff run before and/or after the parent actions. That is a big advantage... > action list in form inheritance > ------------------------------- > > Key: OFBIZ-2889 > URL: https://issues.apache.org/jira/browse/OFBIZ-2889 > Project: OFBiz > Issue Type: Improvement > Reporter: Harmeet Bedi > Fix For: SVN trunk > > Attachments: ModelForm.java.diff, widget-form.xsd.diff > > > Purpose: make inheritance options more flexible and document them better for end user consumption. > Following XSD attributes > <xs:attribute name="extends-actions" default="override"> > <xs:annotation> > <xs:documentation>If form derives from parent, form actions may > override existing parent form actions, append to parent form actions or ignore > parent form actions</xs:documentation> > </xs:annotation> > <xs:simpleType> > <xs:restriction base="xs:token"> > <xs:enumeration value="append"> > <xs:annotation> > <xs:documentation>append form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="prepend"> > <xs:annotation> > <xs:documentation>prepend form actions to list of parent form actions</xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="override"> > <xs:annotation> > <xs:documentation>If action block exists, ignore parent action list. > If action block does not exist use the parent action list > </xs:documentation> > </xs:annotation> > </xs:enumeration> > <xs:enumeration value="ignore"> > <xs:annotation> > <xs:documentation>Ignore parent form actions. > Same as override with no actions specified in actions block. > </xs:documentation> > </xs:annotation> > </xs:enumeration> > </xs:restriction> > </xs:simpleType> > </xs:attribute> > same for > <xs:attribute name="extends-row-actions" default="override"> > .... > </xs:attribute> > Attaching patches for xsd and ModelForm -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |