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.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@653865 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -20,13 +20,19 @@ under the License.
|
||||
|
||||
<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 @@ under the License.
|
||||
</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 @@ under the License.
|
||||
<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 @@ under the License.
|
||||
</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 @@ under the License.
|
||||
</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 @@ under the License.
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user