[OFBiz] SVN: r6469 - trunk/applications/content/widget/compdoc

byersa@svn.ofbiz.org byersa at svn.ofbiz.org
Wed Jan 4 18:05:17 CST 2006


Author: byersa
Date: 2006-01-04 18:05:13 -0600 (Wed, 04 Jan 2006)
New Revision: 6469

Modified:
   trunk/applications/content/widget/compdoc/CompDocForms.xml
   trunk/applications/content/widget/compdoc/CompDocScreens.xml
Log:
Latest updates


Modified: trunk/applications/content/widget/compdoc/CompDocForms.xml
===================================================================
--- trunk/applications/content/widget/compdoc/CompDocForms.xml	2006-01-04 23:25:02 UTC (rev 6468)
+++ trunk/applications/content/widget/compdoc/CompDocForms.xml	2006-01-05 00:05:13 UTC (rev 6469)
@@ -195,18 +195,42 @@
    <form name="EditCompDocTemplate" default-map-name="content" title="" type="single" target="updateCompDocTemplate" 
         default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">
        <alt-target target="createCompDocTemplate" use-when="contentAssoc==null"/> 
-       <field name="contentName"  field-name="contentName" map-name="content"><display/></field>
-       <field name="contentId"  field-name="contentId" map-name="content"><text/></field> +        <field name="contentTypeId"  field-name="contentTypeId" map-name="content"><hidden value="COMPDOC_TEMPLATE"/></field> +        <field name="ownerContentId"  field-name="ownerContentId" map-name="content"><text/></field>
+       <field name="contentName"  field-name="contentName" map-name="content"><text/></field>
+       <field name="contentId"  field-name="contentId" map-name="content"><text/></field>
+       <field name="contentTypeId"  field-name="contentTypeId" map-name="content"><hidden value="COMPDOC_TEMPLATE"/></field>
+       <field name="ownerContentId"><lookup target-form-name="LookupContent"/></field>
        <field name="instanceOfContentId"  field-name="instanceOfContentId" map-name="content"><text/></field>
-       <field name="dataResourceId"  field-name="dataResourceId" map-name="content"><text/></field> +        <field name="templateDataResourceId"  field-name="templateDataResourceId" map-name="content"><text/></field>
+        <field name="dataResourceId">
+            <lookup target-form-name="LookupDataResource">
+            <sub-hyperlink use-when="&quot;${currentValue.dataResourceId}&quot;.length()>0" link-style="buttontext" target-type="intra-app" target="gotoDataResource?dataResourceId=${currentValue.dataResourceId}" description="Go to Data Resource"/>
+            </lookup>
+        </field>
+       <field name="templateDataResourceId"  field-name="templateDataResourceId" map-name="content"><text/></field>
        <field name="dataSourceId"  field-name="dataSourceId" map-name="content"><text/></field>
-       <field name="statusId"  field-name="statusId" map-name="content"><text/></field>
+        <field name="statusId">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="StatusItem" key-field-name="statusId">
+                    <entity-constraint name="statusTypeId" value="PUBLISH_STATUS"/>
+                    <entity-order-by field-name="sequenceId"/>
+                </entity-options>
+            </drop-down>
+        </field>
        <field name="privilegeEnumId"  field-name="privilegeEnumId" map-name="content"><text/></field>
        <field name="serviceName"  field-name="serviceName" map-name="content"><text/></field>
        <field name="description"  field-name="description" map-name="content"><text/></field>
        <field name="localeString"  field-name="localeString" map-name="content"><text/></field>
-       <field name="mimeTypeId"  field-name="mimeTypeId" map-name="content"><text/></field>
-       <field name="characterSetId"  field-name="characterSetId" map-name="content"><text/></field>
+        <field name="mimeTypeId">
+            <drop-down allow-empty="true">
+                <entity-options description="${mimeTypeId} - ${description}" entity-name="MimeType" key-field-name="mimeTypeId">
+                    <entity-order-by field-name="mimeTypeId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="characterSetId">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="CharacterSet" key-field-name="characterSetId"/>
+            </drop-down>
+        </field>
        <field name="childLeafCount"  field-name="childLeafCount" map-name="content"><text/></field>
        <field name="childBranchCount"  field-name="childBranchCount" map-name="content"><text/></field>
        <field name="createdDate"  field-name="createdDate" map-name="content"><text/></field>
@@ -218,9 +242,10 @@
        <field name="contentAssocTypeId"  field-name="contentAssocTypeId" map-name="contentAssoc"><hidden value="COMPDOC_PART"/></field>
        <field use-when="contentAssoc!=null" name="fromDate"  field-name="fromDate" map-name="contentAssoc"><display/></field>
        <field use-when="contentAssoc==null" name="fromDate" field-name="fromDate"><hidden value="${nowTimestamp}"/></field>
-       <field name="thruDate"  field-name="thruDate" map-name="contentAssoc"><text/></field>
+       <field name="thruDate"  field-name="thruDate" map-name="contentAssoc"><date-find/></field>
        <field name="contentAssocPredicateId"  field-name="contentAssocPredicateId" map-name="contentAssoc"><text/></field>
        <field name="sequenceNum"  field-name="sequenceNum" map-name="contentAssoc"><text/></field>
+       <field use-when="contentAssoc!=null" name="sequenceNum" field-name="sequenceNum"><hidden value="${sequenceNum}"/></field>
        <field name="mapKey"  field-name="mapKey" map-name="contentAssoc"><text/></field>
        <field name="upperCoordinate"  field-name="upperCoordinate" map-name="contentAssoc"><text/></field>
        <field name="leftCoordinate"  field-name="leftCoordinate" map-name="contentAssoc"><text/></field>
@@ -233,36 +258,36 @@
         <auto-fields-entity entity-name="ContentAssoc"/>
         <field name="contentName"><text/></field>
 
-        <field name="contentId"><hidden/></field>
+        <field name="contentId"><text/></field>
         <field name="contentTypeId"><hidden value="COMPDOC_INSTANCE"/></field>
-        <field name="ownerContentId"><hidden/></field>
-        <field name="instanceOfContentId"><hidden/></field>
-        <field name="dataResourceId"><hidden/></field>
-        <field name="templateDataResourceId"><hidden/></field>
-        <field name="dataSourceId"><hidden/></field>
-        <field name="statusId"><hidden/></field>
-        <field name="privilegeEnumId"><hidden/></field>
-        <field name="serviceName"><hidden/></field>
-        <field name="description"><hidden/></field>
-        <field name="localeString"><hidden/></field>
-        <field name="mimeTypeId"><hidden/></field>
-        <field name="characterSetId"><hidden/></field>
-        <field name="childLeafCount"><hidden/></field>
-        <field name="childBranchCount"><hidden/></field>
-        <field name="createdDate"><hidden/></field>
-        <field name="createdByUserLogin"><hidden/></field>
-        <field name="lastModifiedDate"><hidden/></field>
-        <field name="lastModifiedByUserLogin"><hidden/></field>
+        <field name="ownerContentId"><text/></field>
+        <field name="instanceOfContentId"><text/></field>
+        <field name="dataResourceId"><text/></field>
+        <field name="templateDataResourceId"><text/></field>
+        <field name="dataSourceId"><text/></field>
+        <field name="statusId"><text/></field>
+        <field name="privilegeEnumId"><text/></field>
+        <field name="serviceName"><text/></field>
+        <field name="description"><text/></field>
+        <field name="localeString"><text/></field>
+        <field name="mimeTypeId"><text/></field>
+        <field name="characterSetId"><text/></field>
+        <field name="childLeafCount"><text/></field>
+        <field name="childBranchCount"><text/></field>
+        <field name="createdDate"><text/></field>
+        <field name="createdByUserLogin"><text/></field>
+        <field name="lastModifiedDate"><text/></field>
+        <field name="lastModifiedByUserLogin"><text/></field>
 
-        <field name="contentIdTo"><hidden/></field>
+        <field name="contentIdTo"><text/></field>
         <field name="contentAssocTypeId"><hidden value="TREE_CHILD"/></field>
         <field name="fromDate"><hidden value="${nowTimestamp}"/></field>
-        <field name="thruDate"><hidden/></field>
-        <field name="contentAssocPredicateId"><hidden/></field>
-        <field name="sequenceNum"><hidden/></field>
-        <field name="mapKey"><hidden/></field>
-        <field name="upperCoordinate"><hidden/></field>
-        <field name="leftCoordinate"><hidden/></field>
+        <field name="thruDate"><text/></field>
+        <field name="contentAssocPredicateId"><text/></field>
+        <field name="sequenceNum"><text/></field>
+        <field name="mapKey"><text/></field>
+        <field name="upperCoordinate"><text/></field>
+        <field name="leftCoordinate"><text/></field>
 
         <field name="submitButton" title="Create" widget-style="smallSubmit"><submit button-type="button"/></field>
         <field name="Approval" title="">
@@ -272,4 +297,64 @@
             <hyperlink also-hidden="false" description="Revision" target="ListContentRevision?contentId=${contentId}"/> 
         </field>
     </form>
+
+    <form name="EditCompDocContent" target="updateCompDocContent" title="" type="single"
+        default-title-style="tableheadtext" default-map-name="currentValue"
+        default-tooltip-style="tabletext" default-widget-style="inputBox">
+        <auto-fields-entity entity-name="Content" />
+        <field name="contentId"><display/></field>
+        <field name="contentTypeId">
+            <drop-down allow-empty="false">
+                <entity-options description="${description}" entity-name="ContentType" key-field-name="contentTypeId"/>
+            </drop-down>
+        </field>
+        <field name="dataResourceId">
+            <lookup target-form-name="LookupDataResource">
+            <sub-hyperlink use-when="&quot;${currentValue.dataResourceId}&quot;.length()>0" link-style="buttontext" target-type="intra-app" target="gotoDataResource?dataResourceId=${currentValue.dataResourceId}" description="Go to Data Resource"/>
+            </lookup>
+        </field>
+        <field name="ownerContentId"><lookup target-form-name="LookupContent"/></field>
+        <field name="mimeTypeId">
+            <drop-down allow-empty="true">
+                <entity-options description="${mimeTypeId} - ${description}" entity-name="MimeType" key-field-name="mimeTypeId">
+                    <entity-order-by field-name="mimeTypeId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="characterSetId">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="CharacterSet" key-field-name="characterSetId"/>
+            </drop-down>
+        </field>
+        <field name="statusId">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="StatusItem" key-field-name="statusId">
+                    <entity-constraint name="statusTypeId" value="PUBLISH_STATUS"/>
+                    <entity-order-by field-name="sequenceId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="createdByUserLogin" position="1"><display/></field>
+        <field name="createdDate" position="2"><display/></field>
+        <field name="lastModifiedByUserLogin" position="1"><display/></field>
+        <field name="lastModifiedDate" position="2"><display/></field>
+       <field name="submitButton" title="Create" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+
+    <!-- ================ CompDoc Requests ================= -->
+
+    <form name="EditContentRevisionAndItem" target="updateContentRevisionAndItem" title="" type="single"
+        default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">
+        <auto-fields-entity entity-name="ContentRevision" />
+        <auto-fields-entity entity-name="ContentRevisionItem" />
+        
+        <field name="contentId" title="" widget-style="buttontext" ><text/></field>
+        <field name="contentRevisionSeqId" title=""><hidden/></field> 
+        <field name="committedByPartyId" title="" widget-style="inputBox"></field>
+        <field name="comments" title="" widget-style="inputBox"></field>
+        <field name="itemContentId" title="" widget-style="inputBox"></field>
+        <field name="oldDataResourceId" title="" widget-style="inputBox"></field>
+        <field name="newDataResourceId" title="" widget-style="inputBox"></field>
+        <field name="submitButton" title="Create" widget-style="smallSubmit"><submit/></field>
+    </form>
 </forms>

Modified: trunk/applications/content/widget/compdoc/CompDocScreens.xml
===================================================================
--- trunk/applications/content/widget/compdoc/CompDocScreens.xml	2006-01-04 23:25:02 UTC (rev 6468)
+++ trunk/applications/content/widget/compdoc/CompDocScreens.xml	2006-01-05 00:05:13 UTC (rev 6469)
@@ -250,6 +250,7 @@
                 <set field="contentIdTo" from-field="parameters.caContentIdTo"/>
                 <set field="contentAssocTypeId" from-field="parameters.caContentAssocTypeId"/>
                 <set field="fromDate" from-field="parameters.caFromDate"/>
+                <set field="sequenceNum" from-field="parameters.caSequenceNum"/>
 
                 <entity-one entity-name="Content" value-name="content"/>
                 <entity-one entity-name="ContentAssoc" value-name="contentAssoc"/>
@@ -287,15 +288,18 @@
     <screen name="CompDocTemplateTree">
         <section>
             <actions>
+                <set field="headerItem" value="Content"/>
+                <script location="component://content/widget/getMenuContext.bsh"/>
+                <set field="title" value="Composite Document Instance Edit Page"/>
+                <set field="titleProperty" value="PageTitleEditContent"/>
+                <set field="currentContentMenuItemName" value="AddContent" to-scope="user"/>
+
                 <set  field="rootEntityId" from-field="parameters.contentId" />
                 <set  field="contentId" from-field="parameters.contentId" />
                 <set  field="responseContentId" from-field="parameters.contentId" />
                 <set  field="ownerContentId" from-field="parameters.ownerContentId" />
-                <entity-one entity-name="Content" value-name="content" use-cache="true">
-                    <field-map field-name="contentId" env-name="contentId"/>
-                </entity-one>
                 <set field="enableEdit" value="false"/>
-                <set field="contentId" value="${content.contentId}" />
+                <set field="contentId" value="${contentId}" />
             </actions>
             <widgets>
                 <label text="&lt;p/&gt;" />
@@ -307,8 +311,12 @@
             </widgets>
         </section>
     </screen>
+    
     <screen name="responseTreeLine">
         <section>
+            <actions>
+                <script location="component://content/webapp/content/WEB-INF/actions/content/prepseqno.bsh"/>
+            </actions>
             <widgets>
                 <section>
                     <condition>
@@ -317,25 +325,32 @@
                     <widgets>
                         <container>
                             <label text="${contentName}[${contentId}]" style="responseheader" />
-                            <link  text="Add Template Child" target="addCompDocTemplate?contentId=${contentId}" style="tabButton"/>
-                            <link  text="Instance" target="EditCompDocInstance?contentId=${contentId}" style="tabButton"/>
-                            <link  text="Edit Template" target="EditCompDocTemplate?contentId=${contentId}" style="tabButton"/>
+                            <link  text="+Child" target="AddCompDocTemplate?caContentIdTo=${contentId}&amp;caSequenceNum=9999&amp;ownerContentId=${rootEntityId}" style="tabButton" target-window="_top" />
+                            <link  text="+Bef" target="EditCompDocTemplate?contentId=${contentId}&amp;caContentIdTo=${caContentIdTo}&amp;caContentAssocTypeId=${caContentAssocTypeId}&amp;caSequenceNum=${seqNumBefore}&amp;caFromDate=${caFromDate}" style="tabButton" target-window="_top" />
+                            <link  text="+Aft" target="EditCompDocTemplate?contentId=${contentId}&amp;caContentIdTo=${caContentIdTo}&amp;caContentAssocTypeId=${caContentAssocTypeId}&amp;caSequenceNum=${seqNumAfter}&amp;caFromDate=${caFromDate}" style="tabButton" target-window="_top" />
+                            <link  text="Instance" target="EditCompDocInstance?contentId=${contentId}" style="tabButton" />
+                            <link  text="Edit" target="EditCompDocTemplate?contentId=${contentId}&amp;caContentIdTo=${caContentIdTo}&amp;caContentAssocTypeId=${caContentAssocTypeId}&amp;caFromDate=${caFromDate}" style="tabButton" />
                             <container style="responsetext">
                                 <label text="${description}" style="responsetext" />
                             </container>
                         </container>    
                     </widgets>
         </section>
-        <section>
+         <section>
             <condition>
                 <if-compare-field field-name="responseContentId" operator="equals" to-field-name="contentId" />
             </condition>
+            <actions>
+                <script location="component://content/webapp/content/WEB-INF/actions/content/prepseqno.bsh"/>
+            </actions>
             <widgets>
               <container style="responseSelected">
                       <label text="${contentName}[${contentId}]" style="responseheader" />
-                            <link  text="Add Template Child" target="addCompDocTemplate?contentId=${contentId}" style="tabButton"/>
-                            <link  text="Instance" target="EditCompDocInstance?contentId=${contentId}" style="tabButton"/>
-                            <link  text="Edit Template" target="EditCompDocTemplate?contentId=${contentId}" style="tabButton"/>
+                            <link  text="+Child" target="AddCompDocTemplate?caContentIdTo=${contentId}&amp;caSequenceNum=9999&amp;ownerContentId=${rootEntityId}" style="tabButton" target-window="_top" />
+                            <link  text="+Bef" target="EditCompDocTemplate?contentId=${contentId}&amp;caContentIdTo=${caContentIdTo}&amp;caContentAssocTypeId=${caContentAssocTypeId}&amp;caSequenceNum=${seqNumBefore}&amp;caFromDate=${caFromDate}" style="tabButton" target-window="_top" />
+                            <link  text="+Aft" target="EditCompDocTemplate?contentId=${contentId}&amp;caContentIdTo=${caContentIdTo}&amp;caContentAssocTypeId=${caContentAssocTypeId}&amp;caSequenceNum=${seqNumAfter}&amp;caFromDate=${caFromDate}" style="tabButton" target-window="_top" />
+                            <link  text="Instance" target="EditCompDocInstance?contentId=${contentId}" style="tabButton" />
+                            <link  text="Edit" target="EditCompDocTemplate?contentId=${contentId}&amp;caContentIdTo=${caContentIdTo}&amp;caContentAssocTypeId=${caContentAssocTypeId}&amp;caFromDate=${caFromDate}" style="tabButton" />
                       <container style="responsetext">
                         <label text="${description}" style="responsetext" />
                       </container>
@@ -345,14 +360,17 @@
              </widgets>
         </section>
     </screen>
-    <screen name="cDTreeLine">
+     <screen name="cDTreeLine">
         <section>
+            <actions>
+                <script location="component://content/webapp/content/WEB-INF/actions/content/prepseqno.bsh"/>
+            </actions>
             <widgets>
                 <container>
                     <label text="${contentName}[${contentId}]" style="responseheader" />
-                            <link  text="Add Template Child" target="addCompDocTemplate?contentId=${contentId}" style="tabButton"/>
-                            <link  text="Instance" target="EditCompDocInstance?contentId=${contentId}" style="tabButton"/>
-                            <link  text="Edit Template" target="EditCompDocTemplate?contentId=${contentId}" style="tabButton"/>
+                            <link  text="+Child" target="AddCompDocTemplate?caContentIdTo=${contentId}&amp;caSequenceNum=9999&amp;ownerContentId=${rootEntityId}" style="tabButton" target-window="_top" />
+                            <link  text="Instance" target="EditCompDocInstance?contentId=${contentId}" style="tabButton" />
+                            <link  text="Edit" target="EditCompDocContent?contentId=${contentId}" style="tabButton" />
                     <container style="responsetext">
                         <label text="${description}" style="responsetext" />
                     </container>
@@ -360,24 +378,73 @@
             </widgets>
         </section>
     </screen>
-    <screen name="AddContent">
+    
+     <screen name="AddCompDocTemplate">
         <section>
             <condition>
                 <if-has-permission permission="CONTENTMGR" action="CREATE"/>
             </condition>
             <actions>
                 <set field="headerItem" value="Content"/>
-<!--               <script location="component://content/widget/getMenuContext.bsh"/> -->
-                <set field="title" value="CD Content Edit Page"/>
+                <script location="component://content/widget/getMenuContext.bsh"/>
+                <set field="title" value="Composite Document Instance Edit Page"/>
                 <set field="titleProperty" value="PageTitleEditContent"/>
+                <set field="currentContentMenuItemName" value="AddContent" to-scope="user"/>
+
+                <set field="contentIdTo" from-field="parameters.caContentIdTo"/>
+                <set  field="rootEntityId" from-field="parameters.caContentIdTo" />
+                <set  field="ownerContentId" from-field="parameters.ownerContentId" />
+                <set  field="sequenceNum" from-field="parameters.caSequenceNum" />
             </actions>
             <widgets>
-                <decorator-screen name="mainContentDecorator" location="component://content/widget/CommonScreens.xml">
+                <decorator-screen name="commonContentDecorator" location="component://content/widget/CommonScreens.xml">
                 <decorator-section name="body">
-                    <include-form name="AddContent" location="component://component://content/widget/compdoc/CompDocTemplateTreeForms.xml"/>
+                    <include-form name="EditCompDocTemplate" location="component://content/widget/compdoc/CompDocForms.xml"/>
                 </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
+    
+     
+    <screen name="EditCompDocContent">
+        <section>
+            <condition>
+                <if-has-permission permission="CONTENTMGR" action="CREATE"/>
+            </condition>
+            <actions>
+                <set field="headerItem" value="Content"/>
+                <script location="component://content/widget/getMenuContext.bsh"/>
+                <set field="title" value="Composite Document Instance Edit Page"/>
+                <set field="titleProperty" value="PageTitleEditContent"/>
+                <set field="currentContentMenuItemName" value="AddContent" to-scope="user"/>
+                <set field="contentIdTo" from-field="parameters.caContentIdTo"/>
+                <set  field="rootEntityId" from-field="parameters.caContentIdTo" />
+                <set  field="ownerContentId" from-field="parameters.ownerContentId" />
+                <set  field="sequenceNum" from-field="parameters.caSequenceNum" />
+            </actions>
+            <widgets>
+                <decorator-screen name="commonContentDecorator" location="component://content/widget/CommonScreens.xml">
+                <decorator-section name="body">
+                    <include-form name="EditCompDocContent" location="component://content/widget/compdoc/CompDocForms.xml"/>
+                </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <!-- ================ CompDoc Requests ================= -->
+    
+    <screen name="EditContentRevisionAndItem">
+        <section>
+            <widgets>
+                <decorator-screen name="commonContentDecorator" location="component://content/widget/CommonScreens.xml">
+                    <decorator-section name="body">
+                        <include-form name="EditContentRevisionAndItem" location="component://content/widget/compdoc/CompDocForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>



More information about the Svn mailing list