|
[ https://issues.apache.org/jira/browse/OFBIZ-4472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13655504#comment-13655504 ] Jacques Le Roux commented on OFBIZ-4472: ---------------------------------------- Hi Nicolas, I tried it and it works well. I did not completely review yet and I'd like more people involved before committing. Please test, review if you want, and vote. From now I'd like this process to be used for not trivial patches (and maybe even trivial looking ones, as OFBIZ-5192 suggests), thanks in advance for your help! To quickly test, as Nicolas suggested, apply this snippet (part of the OFBIZ-4472.patch 12/Nov/12 11:43 version) {code} Index: specialpurpose/example/widget/example/ExampleForms.xml =================================================================== --- specialpurpose/example/widget/example/ExampleForms.xml (révision 1408116) +++ specialpurpose/example/widget/example/ExampleForms.xml (copie de travail) @@ -200,7 +200,7 @@ </form> <!-- ExampleFeatureAppl --> - <form name="ListExampleFeatureAppls" type="list" list-name="exampleFeatureAppls" target="example_updateExampleFeatureAppl"> + <form name="ListExampleFeatureAppls" type="list" list-name="exampleFeatureAppls" target="example_updateExampleFeatureAppl" default-entity-name="ExampleFeatureAppl"> <actions> <entity-condition entity-name="ExampleFeatureAppl"> <condition-expr field-name="exampleId" from-field="exampleId"/> @@ -226,10 +226,8 @@ </field> <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> <field name="deleteLink" title=" " widget-style="buttontext"> - <hyperlink target="example_deleteExampleFeatureAppl" description="${uiLabelMap.CommonDelete}" also-hidden="false" image-location="${iconsLocation}/delete.png"> - <parameter param-name="exampleId"/> - <parameter param-name="exampleFeatureId"/> - <parameter param-name="fromDate"/> + <hyperlink target="example_deleteExampleFeatureAppl" description="${uiLabelMap.CommonDelete}" also-hidden="false" > + <auto-parameters-entity/> </hyperlink> </field> </form> {code} You will then see a difference: the delete (no entry) icon will not appears but it will still continue to work the same: feature will be deleted. Also in HTML source you will see the input hidden fields like {code} <input type="hidden" name="exampleId" value="EX01" id="ListExampleFeatureAppls_exampleId_o_0"/> {code} > New elements auto-parameters-[entity/service] for link/hyperlink > ---------------------------------------------------------------- > > Key: OFBIZ-4472 > URL: https://issues.apache.org/jira/browse/OFBIZ-4472 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: Screen Widget Redesign, SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: OFBIZ-4472.patch, OFBIZ-4472.patch, OFBIZ-4472.patch, OFBIZ-4472.patch, OFBIZ-4472.patch > > > When you want edit/remove an entity from link call it's needed to give all pk on parameter element as like : > {quote} <field name="deleteLink"> > <hyperlink target="example_deleteExampleFeatureAppl"> > <parameter param-name="exampleId"/> > <parameter param-name="exampleFeatureId"/> > <parameter param-name="fromDate"/> > <hyperlink/> > </field> > {quote} > To simplify, I introduce auto-parameters-entity like this : > {quote} > <field name="deleteLink"> > <hyperlink target="example_deleteExampleFeatureAppl"> > <auto-parameters-entity entity-name="ExampleFeatureAppl"/> > <hyperlink/> > </field> > {quote} > or > {quote} > <form name="ListExampleFeatureAppls" type="list" default-entity-name="ExampleFeatureAppl"> > <field name="deleteLink"> > <hyperlink target="example_deleteExampleFeatureAppl"> > <auto-parameters-entity/> > <hyperlink/> > </field> > {quote} > This method is inspired from auto-fields-entity and I homogenized on widget renderer screen (link), menu (link) and form (hyperlink, sub-link) > Any comments are welcome -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Free forum by Nabble | Edit this page |
