You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by er...@apache.org on 2012/10/23 21:51:49 UTC
svn commit: r1401420 - in
/ofbiz/branches/20120329_portletWidget/framework/widget:
dtd/widget-menu.xsd dtd/widget-screen.xsd
src/org/ofbiz/widget/screen/ModelScreenWidget.java
Author: erwan
Date: Tue Oct 23 19:51:48 2012
New Revision: 1401420
URL: http://svn.apache.org/viewvc?rev=1401420&view=rev
Log:
- Add portletSeqId for areaDivId and subAreaDivId to be able to use same portlet twice in a portalPage
- In menuItem, it's possible to have multiple show-portlet, so correction on xsd
Modified:
ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-menu.xsd
ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-screen.xsd
ofbiz/branches/20120329_portletWidget/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
Modified: ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-menu.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-menu.xsd?rev=1401420&r1=1401419&r2=1401420&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-menu.xsd (original)
+++ ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-menu.xsd Tue Oct 23 19:51:48 2012
@@ -96,7 +96,7 @@ under the License.
<xs:element minOccurs="0" ref="condition"/>
<xs:element minOccurs="0" ref="actions"/>
<xs:element minOccurs="0" ref="link"/>
- <xs:element minOccurs="0" ref="show-portlet"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="show-portlet"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="menu-item"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.menu-item"/>
Modified: ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-screen.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-screen.xsd?rev=1401420&r1=1401419&r2=1401420&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-screen.xsd (original)
+++ ofbiz/branches/20120329_portletWidget/framework/widget/dtd/widget-screen.xsd Tue Oct 23 19:51:48 2012
@@ -1093,8 +1093,7 @@ under the License.
<xs:attribute name="share-scope" default="false">
<xs:simpleType>
<xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
+ <xs:pattern value="\$\{[a-zA-Z_]{1}[a-zA-Z0-9_\-.]+\}|true|false" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
@@ -1146,8 +1145,7 @@ under the License.
<xs:attribute name="xml-escape" default="false">
<xs:simpleType>
<xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
+ <xs:pattern value="\$\{[a-zA-Z_]{1}[a-zA-Z0-9_\-.]+\}|true|false" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Modified: ofbiz/branches/20120329_portletWidget/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?rev=1401420&r1=1401419&r2=1401420&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java Tue Oct 23 19:51:48 2012
@@ -1959,11 +1959,11 @@ public abstract class ModelScreenWidget
}
//if (UtilValidate.isEmpty(context.get("areaDivId"))) context.put("areaDivId", "PP_" + portalPageId + portalPortletId + portletSeqId); with id build with portalPageId portalPortletId portletSeqId, it seem, it's no more necessary because always unique
- if (UtilValidate.isEmpty(context.get("editAreaDivId"))) context.put("editAreaDivId", portletLongId + "_EditArea");
+ if (UtilValidate.isEmpty(context.get("editAreaDivId"))) context.put("editAreaDivId", portletLongId + "_EditArea" + portletSeqId);
if (UtilValidate.isEmpty(context.get("entity"))) context.put("entity", portletLongId);
if (UtilValidate.isEmpty(context.get("helpName"))) context.put("helpName", "HELP_" + portalPortletId);
- if (UtilValidate.isEmpty(context.get("subAreaDivId"))) context.put("subAreaDivId", portletLongId + "_SubArea");
- if (UtilValidate.isEmpty(context.get("titleLabel"))) context.put("titleLabel", "PageTitle"+portletLongId);
+ if (UtilValidate.isEmpty(context.get("subAreaDivId"))) context.put("subAreaDivId", portletLongId + "_SubArea" + portletSeqId);
+ if (UtilValidate.isEmpty(context.get("titleLabel"))) context.put("titleLabel", "PageTitle" + portletLongId);
if (UtilValidate.isNotEmpty(portletValue) && UtilValidate.isNotEmpty(portletValue.get("menuName")) ){
context.put("menuName", portletValue.get("menuName"));