Hi Bruno,
I agree with you, uiLabelDecorator and showPortletUiLabelDecorator
aren't reason to exists. For my point of view, a portlet is a single
screen but dependant to a component and we will don't define all uilabel
that a portlet depend. I prefere define a uiLabelDecorator or
portletDecorator that load component label on component's
CommonScreen.xml file that will be herite to uiLabelDecorator or
main-portlet-decorator from common component:
eg for accounting portlet :
accounting portlet :
<screen name="FinAccountPortlets">
<section>
<actions>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap"
global="true"/>
</actions>
<widgets>
<decorator-screen name="portletDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-form name="ListFinAccounts"
location="component://accounting/widget/FinAccountForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
accounting CommonScreen.xml :
<screen name="portletDecorator">
<section>
<actions>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap"
global="true"/>
</actions>
<widgets>
<decorator-screen name="main-portlet-decorator"
location="component://common/widget/CommonScreen.xml">
<decorator-section name="body">
<include-decorator-section name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
common CommonScreen.xml :
<screen name="main-portlet-decorator">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap"
global="true"/>
</actions>
<widgets>
<include-decorator-section name="body"/>
</widgets>
</section>
</screen>
With this example, we have a portlet in relation with her component,
without labels or other definition global to her components and useable
with standard showPortal screen.
Nicolas
Le 11/09/2010 09:34, Bruno Busco a écrit :
Hi Erwan,
I am looking into the PortalPortlet system and in the MyPortal application.
What I am trying to do is to have a complete independence of MyPortal from
applications.
Doing this I have faced this uiLabelDecorator that has been created in
several applications.
I think we should eliminate this pattern and have each portlet include its
own resource files. But before stepping over with this change I would like
to hear if this is a problem for anybody.
I think this pattern complicates the things and generate portlets grouping
that are not needed. Generally a portlet is a single screen unit that should
be independent as much as possible.
I have seen also that a showPortletUiLabelDecorator has been added. Are we
sure we need this?
Please could anybody explain if there is a real need for all this?
Thank you,
-Bruno
2010/5/18<[email protected]>
Author: erwan
Date: Tue May 18 16:10:10 2010
New Revision: 945728
URL: http://svn.apache.org/viewvc?rev=945728&view=rev
Log:
Missing screen when using the portal admin in webtools
Modified:
ofbiz/trunk/framework/webtools/widget/CommonScreens.xml
Modified: ofbiz/trunk/framework/webtools/widget/CommonScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/CommonScreens.xml?rev=945728&r1=945727&r2=945728&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/webtools/widget/CommonScreens.xml Tue May 18
16:10:10 2010
@@ -283,4 +283,17 @@ under the License.
</widgets>
</section>
</screen>
+
+<screen name="uiLabelDecorator">
+<section>
+<actions>
+<property-map resource="TemporalExpressionUiLabels"
map-name="uiLabelMap" global="true"/>
+<property-map resource="WebtoolsUiLabels"
map-name="uiLabelMap" global="true"/>
+<property-map resource="CommonUiLabels"
map-name="uiLabelMap" global="true"/>
+</actions>
+<widgets>
+<decorator-section-include name="body"/>
+</widgets>
+</section>
+</screen>
</screens>
--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/