Author: sascharodekamp
Date: Thu Jan 12 10:21:36 2012 New Revision: 1230474 URL: http://svn.apache.org/viewvc?rev=1230474&view=rev Log: Example Application Is Badly Broken (https://issues.apache.org/jira/browse/OFBIZ-4619). A Bug reported by Adrian Crum: Go to https://localhost:8443/example/control/main Click the New Example button. In the popup window, click Create. You are taken to the Find Example screen and it contains an error message. Look at the current URL. Try navigating to it: https://localhost:8443/example/control/createExample The Find Example screen is displayed with an error message. Click your browser's Back button. The popup dialog appears again. In summary: There is no way to correct an invalid entry. I added a required flag for the mandatory fields. Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleForms.xml?rev=1230474&r1=1230473&r2=1230474&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Thu Jan 12 10:21:36 2012 @@ -104,7 +104,7 @@ under the License. <field use-when="example!=null" name="exampleId" title="${uiLabelMap.ExampleExampleId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field> <field use-when="example==null @and exampleId==null" name="exampleId" title="${uiLabelMap.ExampleExampleId}"><ignored/></field> <field use-when="example==null @and exampleId!=null" name="exampleId" title="${uiLabelMap.ExampleExampleId}"><display description="${uiLabelMap.CommonCannotBeFound}: [${exampleId}]" also-hidden="false"/></field> - <field name="exampleTypeId" title="${uiLabelMap.CommonType}" id-name="exampleTypeId"> + <field name="exampleTypeId" title="${uiLabelMap.CommonType}" id-name="exampleTypeId" widget-style="required"> <drop-down allow-empty="false"> <!-- this is a neat feature, but not good for the type because the user would have to know the possible types in order to enter at least the first letter, so leaving it out by default; just uncomment to enable: <auto-complete/> --> <entity-options entity-name="ExampleType" description="${description}"> @@ -112,18 +112,19 @@ under the License. </entity-options> </drop-down> </field> - <field name="statusId" use-when="example==null" title="${uiLabelMap.CommonStatus}"> + <field name="statusId" use-when="example==null" title="${uiLabelMap.CommonStatus}" widget-style="required"> <drop-down allow-empty="false"> <entity-options entity-name="ExampleStatusItem" description="${description}"/> </drop-down> </field> - <field name="statusId" use-when="example!=null" title="${uiLabelMap.CommonStatus}"> + <field name="statusId" use-when="example!=null" title="${uiLabelMap.CommonStatus}" widget-style="required"> <drop-down allow-empty="false" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" env-name="example.statusId"/> </entity-options> </drop-down> </field> + <field name="exampleName" required-field="true" widget-style="required"></field> <field name="description" title="${uiLabelMap.CommonDescription}"/> <field name="longDescription" title="${uiLabelMap.ExampleLongDescription}"/> <field name="anotherText"> |
Free forum by Nabble | Edit this page |