[OFBiz] SVN: r6996 - in trunk/applications/content: src/org/ofbiz/content/view webapp/content/WEB-INF widget/compdoc

byersa@svn.ofbiz.org byersa at svn.ofbiz.org
Wed Mar 15 15:41:23 CST 2006


Author: byersa
Date: 2006-03-15 15:41:16 -0600 (Wed, 15 Mar 2006)
New Revision: 6996

Modified:
   trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
   trunk/applications/content/webapp/content/WEB-INF/controller.xml
   trunk/applications/content/widget/compdoc/CompDocForms.xml
   trunk/applications/content/widget/compdoc/CompDocScreens.xml
Log:
Going thru fixing links and titles.



Modified: trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
===================================================================
--- trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java	2006-03-15 19:05:07 UTC (rev 6995)
+++ trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java	2006-03-15 21:41:16 UTC (rev 6996)
@@ -96,7 +96,7 @@
         }
     	try {
             Debug.logInfo("SCVH(0a)- dataResourceId:" + dataResourceId, module);
-GenericDelegator delegator = (GenericDelegator)request.getAttribute("delegator");
+            GenericDelegator delegator = (GenericDelegator)request.getAttribute("delegator");
             if (UtilValidate.isEmpty(dataResourceId)) {
                 if (UtilValidate.isEmpty(contentRevisionSeqId)) {
                    GenericValue content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentId));

Modified: trunk/applications/content/webapp/content/WEB-INF/controller.xml
===================================================================
--- trunk/applications/content/webapp/content/WEB-INF/controller.xml	2006-03-15 19:05:07 UTC (rev 6995)
+++ trunk/applications/content/webapp/content/WEB-INF/controller.xml	2006-03-15 21:41:16 UTC (rev 6996)
@@ -928,14 +928,14 @@
     <request-map uri="createContentApproval">
         <security auth="true" https="true"/>
         <event invoke="createContentApproval" path="" type="service"/>
-        <response name="success" type="view" value="EditContentApproval"/>
-        <response name="error" type="view" value="EditContentApproval"/>
+        <response name="success" type="view" value="ListContentApproval"/>
+        <response name="error" type="view" value="ListContentApproval"/>
     </request-map>
     <request-map uri="updateContentApproval">
         <security auth="true" https="true"/>
         <event invoke="updateContentApproval" path="" type="service"/>
-        <response name="success" type="view" value="EditContentApproval"/>
-        <response name="error" type="view" value="EditContentApproval"/>
+        <response name="success" type="view" value="ListContentApproval"/>
+        <response name="error" type="view" value="ListContentApproval"/>
     </request-map>
     <request-map uri="updateContentApprovalStatus">
         <security auth="true" https="true"/>
@@ -952,8 +952,8 @@
     <request-map uri="removeContentApproval">
         <security auth="true" https="true"/>
         <event invoke="removeContentApproval" path="" type="service"/>
-        <response name="success" type="view" value="EditContentApproval"/>
-        <response name="error" type="view" value="EditContentApproval"/>
+        <response name="success" type="view" value="ListContentApproval"/>
+        <response name="error" type="view" value="ListContentApproval"/>
     </request-map>
 
     <request-map uri="prepForApproval">

Modified: trunk/applications/content/widget/compdoc/CompDocForms.xml
===================================================================
--- trunk/applications/content/widget/compdoc/CompDocForms.xml	2006-03-15 19:05:07 UTC (rev 6995)
+++ trunk/applications/content/widget/compdoc/CompDocForms.xml	2006-03-15 21:41:16 UTC (rev 6996)
@@ -94,6 +94,8 @@
         <alt-target target="createContentRevision" use-when="contentRevision==null"/>
         <auto-fields-entity entity-name="ContentRevision"/>
         
+        <field name="rootContentId" map-name="empty" widget-style="buttontext"><hidden/></field>
+        <field name="rootContentRevisionSeqId"  map-name="empty" title="" widget-style="buttontext"><hidden/></field>
         <field name="contentId" title="" widget-style="buttontext"><lookup target-form-name="LookupContent"/></field>
         <field name="contentRevisionSeqId" title="" widget-style="inputBox"><text/></field>
 <!--         <field name="contentRevisionSeqId">
@@ -139,6 +141,8 @@
         <alt-target target="createContentRevisionItem" use-when="contentRevisionItem==null"/>
         <auto-fields-entity entity-name="ContentRevisionItem"/>
         
+        <field name="rootContentId" map-name="empty" widget-style="buttontext"><hidden/></field>
+        <field name="rootContentRevisionSeqId"  map-name="empty" title="" widget-style="buttontext"><hidden/></field>
         <field name="contentId" title="" widget-style="buttontext"><lookup target-form-name="LookupContent"/></field>
         <field name="contentRevisionSeqId" title="" widget-style="inputBox"><text/></field>
         <field name="itemContentId" title="" widget-style="inputBox"><text/></field>
@@ -158,10 +162,10 @@
         <field name="oldDataResourceId"><display/></field>
         <field name="newDataResourceId"><display/></field>
         <field name="editLink" title=" " widget-style="buttontext">
-            <hyperlink also-hidden="false" description="[Edit]" target="EditContentRevisionItem?contentId=${contentId}&amp;contentRevisionSeqId=${contentRevisionSeqId}&amp;itemContentId=${itemContentId}"/>
+            <hyperlink also-hidden="false" description="[Edit]" target="EditContentRevisionItem?contentId=${contentId}&amp;contentRevisionSeqId=${contentRevisionSeqId}&amp;itemContentId=${itemContentId}&amp;rootContentId=${rootContentId}&amp;rootContentRevisionSeqId=${rootContentRevisionSeqId}"/>
         </field>
         <field name="create" title=" " widget-style="buttontext">
-            <hyperlink also-hidden="false" description="[Create]" target="EditContentRevisionItem?contentId=${contentId}&amp;contentRevisionSeqId=${contentRevisionSeqId}"/>
+            <hyperlink also-hidden="false" description="[Create]" target="EditContentRevisionItem?contentId=${contentId}&amp;contentRevisionSeqId=${contentRevisionSeqId}&amp;rootContentId=${rootContentId}&amp;rootContentRevisionSeqId=${rootContentRevisionSeqId}"/>
         </field>
     </form>
 
@@ -221,12 +225,12 @@
     </form>
 
     <form name="ListContentApproval" default-title-style="tableheadtext" default-tooltip-style="tabletext"
-                target="updateContentApprovalStatus"   
+                target="updateContentApproval"   
                list-name="contentApprovalList" default-widget-style="tabletext" title="" type="list">
         <field name="contentApprovalId" widget-style="tabletext"><display/></field>
         <field name="contentId"><hidden/></field>
         <field name="rootContentId" map-name="empty"><hidden/></field>
-        <field name="contentRevisionSeqId"><display/></field>
+        <field name="contentRevisionSeqId"><hidden/></field>
         <field name="partyId" title="" widget-style="inputBox">
             <lookup target-form-name="LookupPartyName"/>
         </field>
@@ -238,17 +242,20 @@
                 </entity-options>
             </drop-down>
         </field>
-        <field name="approvalStatusId" use-when="contentTypeId.equals(&quot;COMPDOC_INSTANCE&quot;)">
+        <field name="approvalStatusId" use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)">
             <drop-down allow-empty="true">
 				<option key="SOFT_REJ" description="Soft Rejected"/>
 				<option key="REJECTED" description="Rejected"/>
 				<option key="APPROVED" description="Approved"/>
             </drop-down>
         </field>
-        <field name="approvalDate" title="" widget-style="inputBox"><date-time/></field>
-        <field name="sequenceNum" title="" widget-style="inputBox"><text/></field>
+        <field name="approvalDate" title="" widget-style="inputBox"   use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)"><date-time/></field>
+        <field name="sequenceNum" title="" widget-style="inputBox"  use-when="&quot;COMPDOC_TEMPLATE&quot;.equals(contentTypeId)"><text/></field>
         <field name="comments" title="" widget-style="inputBox"><textarea cols="30" rows="3"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"  use-when="&quot;COMPDOC_INSTANCE&quot;.equals(contentTypeId)"><submit/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>
+        <field name="deleteButton" title="${uiLabelMap.CommonDelete}" widget-style="smallSubmit">
+			<hyperlink target="removeContentApproval?contentApprovalId=${contentApprovalId}&amp;rootContentId=${rootContentId}&amp;rootContentRevisionSeqId=${rootContentRevisionSeqId}" description="${uiLabelMap.CommonDelete}"></hyperlink>
+		</field>
     </form>
 
     <form name="ListWaitingContentApproval" default-title-style="tableheadtext" default-tooltip-style="tabletext"
@@ -481,7 +488,7 @@
         <field name="contentApprovalId"><display/></field>
 
         <field name="editLink" title=" " widget-style="buttontext" use-when="approvalCount &gt; 0">
-            <hyperlink also-hidden="false" description="[Edit]" target="EditContentRevisionItem?contentId=${contentId}&amp;contentRevisionSeqId=${contentRevisionSeqId}&amp;itemContentId=${itemContentId}"/>
+            <hyperlink also-hidden="false" description="[Edit]" target="EditContentRevisionItem?contentId=${contentId}&amp;contentRevisionSeqId=${contentRevisionSeqId}&amp;itemContentId=${itemContentId}&amp;rootContentId=${rootContentId}&amp;rootContentRevisionSeqId=${rootContentRevisionSeqId}"/>
         </field>
         <field name="create" title=" " widget-style="buttontext">
             <hyperlink also-hidden="false" description="[Create]" target="EditContentRevisionItem"/>

Modified: trunk/applications/content/widget/compdoc/CompDocScreens.xml
===================================================================
--- trunk/applications/content/widget/compdoc/CompDocScreens.xml	2006-03-15 19:05:07 UTC (rev 6995)
+++ trunk/applications/content/widget/compdoc/CompDocScreens.xml	2006-03-15 21:41:16 UTC (rev 6996)
@@ -31,8 +31,6 @@
                	<set from-field="parameters.rootContentRevisionSeqId" default-value="${parameters.contentRevisionSeqId}"  field="contentRevisionSeqId" />
                 <set field="menuName" value="tree"/>
                 <set field="currentMenuItemName" value="approval"/>
-                <set field="menuName" value="tree"/>
-                <set field="currentMenuItemName" value="approval"/>
                 <entity-one entity-name="Content" value-name="content" use-cache="true"/>
                 <set from-field="content.contentTypeId" field="contentTypeId" />
                 <service service-name="getApprovalsWithPermissions" result-map-name="result">
@@ -42,7 +40,7 @@
                 </service>
                 
                 <set field="contentApprovalList" from-field="result.contentApprovalList" />
-                <set field="title" value="Content Approvals for ${contentId}"/>
+                <set field="title" value="Content Approvals for ${contentId}, rev. ${contentRevisionSeqId}"/>
             </actions>
             <widgets>
                 <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
@@ -144,7 +142,6 @@
                 <set from-field="content.contentTypeId" field="contentTypeId" />
                 <set field="menuName" value="tree"/>
                 <set field="currentMenuItemName" value="revision"/>
-                <set field="title" value="Revision List Page"/>
                 
 
                 <entity-one entity-name="Content" value-name="content" use-cache="true">
@@ -154,6 +151,8 @@
                  <entity-and entity-name="ContentRevision" list-name="contentRevisionList" use-cache="true">
                     <field-map env-name="contentId" field-name="contentId" />
                 </entity-and>
+
+				<set field="title" value="Revision List Page for Content: ${rootContentId} rev. ${rootContentRevisionSeqId}"/>
             </actions>
             <widgets>
                 <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
@@ -179,7 +178,7 @@
                 <set from-field="content.contentTypeId" field="contentTypeId" />
                 <set field="menuName" value="tree"/>
                 <set field="currentMenuItemName" value="revision"/>
-                <set field="title" value="Content Revision Edit Page"/>
+				<set field="title" value="Revision List Page for Content: ${rootContentId} rev. ${rootContentRevisionSeqId}"/>
                 
                 <entity-one entity-name="ContentRevision" value-name="contentRevision" use-cache="true">
                 </entity-one>
@@ -208,12 +207,12 @@
                 <set from-field="content.contentTypeId" field="contentTypeId" />
                 <set field="menuName" value="tree"/>
                 <set field="currentMenuItemName" value="revision"/>
-                <set field="title" value="Content Revision List Page"/>
-                
-            <entity-and entity-name="ContentRevisionItem" list-name="contentRevisionItemList" use-cache="true">
-                <field-map field-name="contentId" env-name="parameters.contentId"/>
-                <field-map field-name="contentRevisionSeqId" env-name="parameters.contentRevisionSeqId"/>
-            </entity-and>
+				<set field="title" value="Revision Item List Page for Content: ${rootContentId} rev. ${rootContentRevisionSeqId}"/>
+	                
+	            <entity-and entity-name="ContentRevisionItem" list-name="contentRevisionItemList" use-cache="true">
+	                <field-map field-name="contentId" env-name="parameters.contentId"/>
+	                <field-map field-name="contentRevisionSeqId" env-name="parameters.contentRevisionSeqId"/>
+	            </entity-and>
             </actions>
             <widgets>
                 <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
@@ -233,13 +232,13 @@
             <actions>
                	<set from-field="parameters.rootContentId"  field="rootContentId" />
                	<set from-field="parameters.rootContentRevisionSeqId"  field="rootContentRevisionSeqId" />
-               	<set from-field="rootContentId"  field="contentId" />
-               	<set from-field="rootContentRevisionSeqId"  field="contentRevisionSeqId" />
+               	<set from-field="parameters.contentId" default-value="${rootContentId}"  field="contentId" />
+               	<set from-field="parameters.contentRevisionSeqId" default-value="${rootContentRevisionSeqId}"  field="contentRevisionSeqId" />
                 <entity-one entity-name="Content" value-name="content" use-cache="true"/>
                 <set from-field="content.contentTypeId" field="contentTypeId" />
                 <set field="menuName" value="tree"/>
                 <set field="currentMenuItemName" value="revision"/>
-                <set field="title" value="Content Revision Item Edit Page"/>
+                <set field="title" value="Content Revision Item Edit Page for Content: ${contentId} rev. ${contentRevisionSeqId}"/>
                 
                 <entity-one entity-name="ContentRevisionItem" value-name="contentRevisionItem" use-cache="true"/>
             </actions>



More information about the Svn mailing list