A patch from Nicolas Malin "Add LookupPortalPage on common components" https://issues.apache.org/jira/browse/OFBIZ-4260

To test :

    * apply patch
    * apply patch from OFBiz-4262
    * load seed
    * Go to example and add examplePortlet2 to an example pagePortal
    * Edit examplePortlet2

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1096290 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2011-04-24 09:35:28 +00:00
parent 5bb2f3a420
commit 849f4016e5
7 changed files with 82 additions and 1 deletions
@@ -38,6 +38,16 @@ under the License.
<field name="updateButton"><submit/></field>
</form>
<form name="ExamplePortlet2Edit" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
<field name="nextPortalPageId">
<lookup target-form-name="LookupPortalPage"/>
</field>
<field name="nextParentPortalPageId">
<lookup target-form-name="LookupPortalPage"/>
</field>
<field name="updateButton"><submit/></field>
</form>
<form name="ExamplePortlet3Edit" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
<field name="SpecificTitle">
<text/>
@@ -47,10 +47,30 @@ under the License.
<screen name="ExamplePortlet2">
<section>
<actions>
<property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
<set field="nextPortalPageId" from-field="nextPortalPageId" default-value=""/>
<set field="nextParentPortalPageId" from-field="nextParentPortalPageId" default-value="EXAMPLE"/>
</actions>
<widgets>
<screenlet title="${uiLabelMap.ExamplePortletSecond}">
<section>
<condition><not><if-empty field="nextPortalPageId"/></not></condition>
<widgets>
<link target="showPortalPage" text="${uiLabelMap.ExamplePortletGoToConfiguredPortalPage} : ${nextPortalPageId} ${uiLabelMap.CommonOf} ${nextParentPortalPageId}" >
<parameter param-name="portalPageId" from-field="nextPortalPageId"/>
<parameter param-name="parentPortalPageId" from-field="nextParentPortalPageId"/>
<image src="${iconsLocation}/application_go.png"/>
</link>
</widgets>
<fail-widgets>
<link target="editPortalPortletAttributes" text="${uiLabelMap.ExamplePortletAttributNeedToBeDefineClickHere}" >
<parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
<parameter param-name="portalPortletId" value="EXAMPLE_2"/>
<parameter param-name="portletSeqId" value="00001"/>
<image src="${iconsLocation}/wrench_orange.png"/>
</link>
</fail-widgets>
</section>
</screenlet>
</widgets>
</section>