Author: adrianc
Date: Tue May 6 11:12:46 2008 New Revision: 653865 URL: http://svn.apache.org/viewvc?rev=653865&view=rev Log: UI work in the Example and ExampleExt components. Fixed minor layout issues, tested with Firefox and IE7, formatted the screen widget XML files so they have consistent line spacing, and added some comments to help new users. Modified: ofbiz/trunk/framework/example/widget/example/CommonScreens.xml ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml ofbiz/trunk/framework/example/widget/example/ExampleForms.xml ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml ofbiz/trunk/framework/images/webapp/images/maincss.css Modified: ofbiz/trunk/framework/example/widget/example/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/CommonScreens.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/CommonScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/CommonScreens.xml Tue May 6 11:12:46 2008 @@ -20,13 +20,19 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + <screen name="main-decorator"> + <!-- The main-decorator screen 'wraps' or 'decorates' all of the screens in the + Example component. It is also decorated - by the GlobalDecorator screen. --> <section> <actions> - <!-- base/top/specific map first, then more common map added for shared labels --> + <!-- base/top/most specific map first, then more common map added for shared labels. + Setting things up this way enables a component to redefine the more common + UI labels. --> <property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> - + <!-- The layoutSettings field is a Map that is used to pass variables and layout + information to the GlobalDecorator and any templates that it uses. --> <set field="layoutSettings.companyName" from-field="uiLabelMap.ExampleCompanyName" global="true"/> <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.ExampleCompanySubtitle" global="true"/> <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set, @@ -45,10 +51,14 @@ </screen> <screen name="CommonExampleDecorator"> + <!-- The CommonExampleDecorator screen decorates a small group of screens that all have + something in common. It is decorated by the main-decorator screen. To see how the + various decorators are combined to build a screen, view the page source of any + Example component screen. HTML comments indicate the start and end points of each + screen and decorator. --> <section> <actions> <set field="headerItem" value="Example"/> - <set field="exampleId" from-field="parameters.exampleId"/> <entity-one entity-name="Example" value-name="example"/> </actions> @@ -79,11 +89,13 @@ <not><if-empty field-name="example"/></not> </condition> <widgets> - <container style="h1"><label>${uiLabelMap.${titleProperty}} ${uiLabelMap.CommonFor} "${example.exampleName}" [${exampleId}]</label></container> + <container style="h1"><label>${uiLabelMap.${titleProperty}} ${uiLabelMap.CommonFor} ${example.exampleName} [${exampleId}]</label></container> <container style="button-bar"><link target="EditExample" text="${uiLabelMap.ExampleNewExample}" style="buttontext"/></container> </widgets> + <fail-widgets> + <container style="h1"><label>${uiLabelMap.ExampleNewExample}</label></container> + </fail-widgets> </section> - <decorator-section-include name="body"/> </widgets> <fail-widgets> @@ -95,11 +107,11 @@ </widgets> </section> </screen> + <screen name="CommonExampleFeatureDecorator"> <section> <actions> <set field="headerItem" value="ExampleFeature"/> - <set field="exampleFeatureId" from-field="parameters.exampleFeatureId"/> <entity-one entity-name="ExampleFeature" value-name="exampleFeature"/> </actions> @@ -131,14 +143,16 @@ </condition> <widgets> <container style="h1"> - <label>${uiLabelMap.${titleProperty}} ${uiLabelMap.CommonFor} "${exampleFeature.description}" [${exampleFeatureId}]</label> + <label>${uiLabelMap.${titleProperty}} ${uiLabelMap.CommonFor} ${exampleFeature.description} [${exampleFeatureId}]</label> </container> <container style="button-bar"> <link target="EditExampleFeature" text="${uiLabelMap.ExampleNewExampleFeature}" style="buttontext"/> </container> </widgets> + <fail-widgets> + <container style="h1"><label>${uiLabelMap.ExampleNewExampleFeature}</label></container> + </fail-widgets> </section> - <decorator-section-include name="body"/> </widgets> <fail-widgets> @@ -150,30 +164,28 @@ </widgets> </section> </screen> - - + <screen name="main"> + <!-- This is the screen for the Main page in the Example component. A common pattern + in OFBiz is to have each component include a Main page as a starting point for + the user. --> <section> <widgets> <decorator-screen name="main-decorator"> <decorator-section name="body"> - <container style="screenlet"> - <container style="screenlet-header"> - <label style="boxhead" text="${uiLabelMap.ExampleMainPage}"/> - </container> - <container style="screenlet-body"> - <section> - <condition><if-empty field-name="userLogin"/></condition> - <widgets> - <container><label text="${uiLabelMap.ExampleMessage}"/></container> - </widgets> - </section> - <container><label text="${uiLabelMap.ExampleWelcome}"/></container> - </container> - </container> + <screenlet title="${uiLabelMap.ExampleMainPage}"> + <section> + <condition><if-empty field-name="userLogin"/></condition> + <widgets> + <container><label text="${uiLabelMap.ExampleMessage}"/></container> + </widgets> + </section> + <label text="${uiLabelMap.ExampleWelcome}"/> + </screenlet> </decorator-section> </decorator-screen> </widgets> </section> </screen> + </screens> Modified: ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleAjaxScreens.xml Tue May 6 11:12:46 2008 @@ -26,7 +26,6 @@ <actions> <set field="headerItem" value="AjaxExample"/> <set field="titleProperty" value="PageTitleFindExample"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/prototype.js" global="true"/> </actions> <widgets> @@ -37,10 +36,11 @@ <if-has-permission permission="EXAMPLE" action="_VIEW"/> </condition> <widgets> - <container><label style="h1">${uiLabelMap.${titleProperty}}</label></container> + <container style="h1"><label>${uiLabelMap.${titleProperty}}</label></container> <container id="ListExamplesAutoUpdate" auto-update-target="ListExampleFormOnly"> <include-screen name="ListExampleFormOnly"/> </container> + <container style="h2"><label>${uiLabelMap.ExampleNewExample}</label></container> <include-screen name="CreateExampleFormOnly"/> </widgets> <fail-widgets> @@ -65,6 +65,7 @@ </widgets> </section> </screen> + <screen name="CreateExampleFormOnly"> <section> <actions> @@ -77,4 +78,5 @@ </widgets> </section> </screen> + </screens> Modified: ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml Tue May 6 11:12:46 2008 @@ -20,6 +20,7 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> + <form name="ListExampleFeatures" type="list" list-name="examples" paginate-target="FindExampleFeature"> <actions> @@ -27,12 +28,12 @@ <order-by field-name="description"/> </entity-condition> </actions> - <field name="exampleFeatureId" title="${uiLabelMap.ExampleExampleFeatureId}" widget-style="buttontext"> <hyperlink also-hidden="false" description="${exampleFeatureId}" target="EditExampleFeature?exampleFeatureId=${exampleFeatureId}"/> </field> <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field> </form> + <form name="EditExampleFeature" type="single" target="updateExampleFeature" title="" default-map-name="exampleFeature"> <actions> <entity-one entity-name="StatusItem" value-name="currentStatus" auto-field-map="false"> @@ -41,11 +42,9 @@ </actions> <alt-target use-when="exampleFeature==null" target="createExampleFeature"/> <auto-fields-service service-name="updateExampleFeature"/> - <field use-when="exampleFeature!=null" name="exampleFeatureId" title="${uiLabelMap.ExampleExampleFeatureId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field> <field use-when="exampleFeature==null&&exampleFeatureId==null" name="exampleFeatureId" title="${uiLabelMap.ExampleExampleFeatureId}"><ignored/></field> <field use-when="exampleFeature==null&&exampleFeatureId!=null" name="exampleFeatureId" title="${uiLabelMap.ExampleExampleFeatureId}"><display description="${uiLabelMap.CommonCannotBeFound}: [${exampleFeatureId}]" also-hidden="false"/></field> - <field name="description" title="${uiLabelMap.CommonDescription}"/> <field name="featureSourceEnumId" title="${uiLabelMap.ExampleFeatureSource}"> <drop-down allow-empty="false"> @@ -68,7 +67,6 @@ </entity-condition> </actions> <auto-fields-service service-name="updateExampleFeatureAppl"/> - <field name="exampleId" title="${uiLabelMap.ExampleExample}"> <display-entity entity-name="Example" description="${exampleName}"> <sub-hyperlink target="EditExample?exampleId=${exampleId}" description="${exampleId}" link-style="buttontext"/> @@ -83,16 +81,15 @@ </entity-options> </drop-down> </field> - <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> <field name="deleteLink" title="" widget-style="buttontext"> <hyperlink target="feature_deleteExampleFeatureAppl?exampleId=${exampleId}&exampleFeatureId=${exampleFeatureId}&fromDate=${fromDate}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/> </field> </form> + <form name="AddExampleFeatureAppl" type="single" target="feature_createExampleFeatureAppl" title=""> <auto-fields-service service-name="createExampleFeatureAppl"/> - <field name="exampleId" title="${uiLabelMap.ExampleExample}"> <drop-down allow-empty="false"> <entity-options entity-name="Example" description="${exampleName} [${exampleId}]"> @@ -126,6 +123,7 @@ <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <field name="submitButton" title="${uiLabelMap.CommonLookup}"><submit button-type="button"/></field> </form> + <form name="LookupListExampleFeature" list-name="listIt" title="" type="list" paginate-target="LookupExampleFeature"> <actions> @@ -144,4 +142,5 @@ </field> <field name="description" title="${uiLabelMap.CommonDescription}"><display also-hidden="false"/></field> </form> + </forms> Modified: ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml Tue May 6 11:12:46 2008 @@ -20,6 +20,7 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + <screen name="FindExampleFeature"> <section> <actions> @@ -55,7 +56,6 @@ <actions> <set field="titleProperty" value="PageTitleEditExampleFeature"/> <set field="tabButtonItem" value="EditExampleFeature"/> - <set field="exampleFeatureId" from-field="parameters.exampleFeatureId"/> <entity-one entity-name="ExampleFeature" value-name="exampleFeature"/> </actions> @@ -68,6 +68,7 @@ </widgets> </section> </screen> + <screen name="EditExampleFeatureExampleAppls"> <section> <actions> @@ -109,4 +110,5 @@ </widgets> </section> </screen> + </screens> Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleForms.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Tue May 6 11:12:46 2008 @@ -20,11 +20,11 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> + <form name="ListExamples" type="list" list-name="examples" paginate-target="FindExample"> <actions> <entity-condition entity-name="Example"><order-by field-name="exampleName"/></entity-condition> </actions> - <field name="exampleId" title="${uiLabelMap.ExampleExampleId}" widget-style="buttontext"> <hyperlink also-hidden="false" description="${exampleId}" target="EditExample?exampleId=${exampleId}"/> </field> @@ -33,7 +33,7 @@ <field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem"/></field> <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field> </form> - + <form name="EditExample" type="single" target="updateExample" title="" default-map-name="example"> <actions> <entity-one entity-name="StatusItem" value-name="currentStatus" auto-field-map="false"> @@ -42,11 +42,9 @@ </actions> <alt-target use-when="example==null" target="createExample"/> <auto-fields-service service-name="updateExample"/> - <field use-when="example!=null" name="exampleId" title="${uiLabelMap.ExampleExampleId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field> <field use-when="example==null&&exampleId==null" name="exampleId" title="${uiLabelMap.ExampleExampleId}"><ignored/></field> <field use-when="example==null&&exampleId!=null" name="exampleId" title="${uiLabelMap.ExampleExampleId}"><display description="${uiLabelMap.CommonCannotBeFound}: [${exampleId}]" also-hidden="false"/></field> - <field name="exampleTypeId" title="${uiLabelMap.CommonType}"> <drop-down allow-empty="false"> <entity-options entity-name="ExampleType" description="${description}"> @@ -70,9 +68,7 @@ </entity-options> </drop-down> </field> - <field name="description" title="${uiLabelMap.CommonDescription}"/> - <field name="anotherText"> <drop-down allow-empty="true"> <option key="Explicit Option" description="${uiLabelMap.ExampleExplicitOption}"/> @@ -84,10 +80,10 @@ <field name="displayAnotherText" use-when="example!=null&&example.get("anotherText")!=null"> <display description="${example.anotherText}"/> </field> - <field name="submitButton" use-when="example==null" title="${uiLabelMap.CommonCreate}"><submit button-type="button"/></field> <field name="submitButton" use-when="example!=null" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> </form> + <form name="EditExampleBackgroundSubmit" extends="EditExample"> <field name="submitButton" use-when="example==null" title="${uiLabelMap.CommonCreate}"><submit button-type="button" background-submit-refresh-target="CreateExampleFormOnly"/></field> <field name="submitButton" use-when="example!=null" title="${uiLabelMap.CommonUpdate}"><submit button-type="button" background-submit-refresh-target="CreateExampleFormOnly"/></field> @@ -102,7 +98,6 @@ </entity-condition> </actions> <auto-fields-service service-name="updateExampleItem"/> - <field name="exampleId"><hidden/></field> <field name="exampleItemSeqId" title="${uiLabelMap.CommonItem}"><display/></field> <field name="description"><text size="30"/></field> @@ -114,16 +109,15 @@ </entity-options> </drop-down> </field> - <field name="deleteLink" title="" widget-style="buttontext"> <hyperlink target="deleteExampleItem?exampleId=${exampleId}&exampleItemSeqId=${exampleItemSeqId}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/> </field> <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> </form> + <form name="AddExampleItem" type="single" target="createExampleItem" title=""> <auto-fields-service service-name="createExampleItem"/> - <field name="exampleId"><hidden/></field> <field name="exampleItemSeqId"><ignored/><!-- this will be auto-sequenced --></field> <field name="amountUomId" title="${uiLabelMap.CommonUom}"> @@ -146,7 +140,6 @@ </entity-condition> </actions> <auto-fields-service service-name="updateExampleFeatureAppl"/> - <field name="exampleId"><hidden/></field> <field name="exampleFeatureId" title="${uiLabelMap.ExampleFeature}"> <display-entity entity-name="ExampleFeature" description="${description}"> @@ -161,16 +154,15 @@ </entity-options> </drop-down> </field> - <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> <field name="deleteLink" title="" widget-style="buttontext"> <hyperlink target="example_deleteExampleFeatureAppl?exampleId=${exampleId}&exampleFeatureId=${exampleFeatureId}&fromDate=${fromDate}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/> </field> </form> + <form name="AddExampleFeatureAppl" type="single" target="example_createExampleFeatureAppl" title=""> <auto-fields-service service-name="createExampleFeatureAppl"/> - <field name="exampleId"><hidden/></field> <field name="exampleFeatureId" title="${uiLabelMap.ExampleFeature}"><lookup target-form-name="LookupExampleFeature"/></field> <field name="exampleFeatureApplTypeId" title="${uiLabelMap.CommonType}"> @@ -182,4 +174,5 @@ </field> <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> </form> + </forms> Modified: ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml Tue May 6 11:12:46 2008 @@ -50,6 +50,7 @@ <link target="EditExampleFeatureAppls?exampleId=${exampleId}"/> </menu-item> </menu> + <menu name="EditExampleFeature" default-selected-style="selected" type="simple" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="tabButtonItem"> <menu-item name="EditExampleFeature" title="${uiLabelMap.ExampleFeature}"> @@ -59,4 +60,5 @@ <link target="EditExampleFeatureExampleAppls?exampleFeatureId=${exampleFeatureId}"/> </menu-item> </menu> + </menus> Modified: ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml Tue May 6 11:12:46 2008 @@ -20,6 +20,7 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + <screen name="FindExample"> <section> <actions> @@ -34,7 +35,7 @@ <if-has-permission permission="EXAMPLE" action="_VIEW"/> </condition> <widgets> - <container><label style="h1">${uiLabelMap.${titleProperty}}</label></container> + <container style="h1"><label>${uiLabelMap.${titleProperty}}</label></container> <container style="button-bar"><link target="EditExample" text="${uiLabelMap.ExampleNewExample}" style="buttontext"/></container> <include-form name="ListExamples" location="component://example/widget/example/ExampleForms.xml"/> </widgets> @@ -53,7 +54,6 @@ <actions> <set field="titleProperty" value="PageTitleEditExample"/> <set field="tabButtonItem" value="EditExample"/> - <set field="exampleId" from-field="parameters.exampleId"/> <entity-one entity-name="Example" value-name="example"/> </actions> @@ -66,12 +66,12 @@ </widgets> </section> </screen> + <screen name="EditExampleItems"> <section> <actions> <set field="titleProperty" value="PageTitleEditExampleItems"/> <set field="tabButtonItem" value="EditExampleItems"/> - <set field="exampleId" from-field="parameters.exampleId"/> </actions> <widgets> @@ -84,12 +84,12 @@ </widgets> </section> </screen> + <screen name="EditExampleFeatureAppls"> <section> <actions> <set field="titleProperty" value="PageTitleEditExampleFeatureAppls"/> <set field="tabButtonItem" value="EditExampleFeatureAppls"/> - <set field="exampleId" from-field="parameters.exampleId"/> </actions> <widgets> @@ -102,4 +102,5 @@ </widgets> </section> </screen> + </screens> Modified: ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml Tue May 6 11:12:46 2008 @@ -20,6 +20,7 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + <screen name="FormWidgetExamples"> <section> <actions> @@ -63,4 +64,5 @@ </widgets> </section> </screen> + </screens> Modified: ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml (original) +++ ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml Tue May 6 11:12:46 2008 @@ -20,7 +20,7 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> - <!-- Decorator Screens Copied from CatalogCommonScreens.xml, since the mainDecoratorLocation now points here --> + <screen name="main-decorator"> <section> <actions> @@ -36,7 +36,6 @@ <section> <actions> <set field="headerItem" value="Example"/> - <set field="exampleId" from-field="parameters.exampleId"/> <entity-one entity-name="Example" value-name="example"/> </actions> @@ -71,7 +70,6 @@ <container style="button-bar"><link target="EditExample" text="${uiLabelMap.ExampleNewExample}" style="buttontext"/></container> </widgets> </section> - <decorator-section-include name="body"/> </widgets> <fail-widgets> @@ -83,6 +81,7 @@ </widgets> </section> </screen> + <screen name="CommonExampleFeatureDecorator"> <section> <widgets> @@ -90,4 +89,5 @@ </widgets> </section> </screen> + </screens> Modified: ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml (original) +++ ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml Tue May 6 11:12:46 2008 @@ -19,17 +19,18 @@ --> <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> - <form name="EditExampleExt" type="single" - target="updateExample" title="" default-map-name="example" default-entity-name="Example" - extends-resource="component://example/widget/example/ExampleForms.xml" extends="EditExample"> + <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 need to hide and then override these, or use the sort-order element which doesn't work well when we want to allow changes in the extended form; so here it is --> + <!-- 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> + </forms> Modified: ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml (original) +++ ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml Tue May 6 11:12:46 2008 @@ -18,10 +18,12 @@ under the License. --> -<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> +<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> + <menu name="EditExample" extends="EditExample" extends-resource="component://example/widget/example/ExampleMenus.xml"> <menu-item name="EditExampleOriginal" title="${uiLabelMap.ExampleOriginalExample}"> <link target="/example/control/EditExample?exampleId=${exampleId}" url-mode="inter-app"/> </menu-item> </menu> + </menus> Modified: ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml (original) +++ ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml Tue May 6 11:12:46 2008 @@ -27,7 +27,6 @@ <set field="titleProperty" value="PageTitleEditExample"/> <set field="tabButtonItem" value="EditExample"/> <set field="labelTitleProperty" value="ExampleExample"/> - <set field="exampleId" from-field="parameters.exampleId"/> <entity-one entity-name="Example" value-name="example"/> </actions> @@ -40,4 +39,5 @@ </widgets> </section> </screen> + </screens> Modified: ofbiz/trunk/framework/images/webapp/images/maincss.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/maincss.css?rev=653865&r1=653864&r2=653865&view=diff ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/maincss.css (original) +++ ofbiz/trunk/framework/images/webapp/images/maincss.css Tue May 6 11:12:46 2008 @@ -1793,6 +1793,10 @@ /* ===== Form Styles ===== */ /* ======================== */ +.basic-form { +margin-bottom: 1em; +} + .basic-form table { width: 100%; } @@ -1880,6 +1884,10 @@ width: auto; } +.form-widget-table { +margin-bottom: 1em; +} + /* Pager */ .nav-pager { |
Free forum by Nabble | Edit this page |