You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2007/10/29 07:56:04 UTC
svn commit: r589526 - in /ofbiz/trunk/applications/party: entitydef/
script/org/ofbiz/party/party/ webapp/partymgr/party/
webapp/partymgr/party/profileblocks/
Author: jonesde
Date: Sun Oct 28 23:56:03 2007
New Revision: 589526
URL: http://svn.apache.org/viewvc?rev=589526&view=rev
Log:
A few cleanups in the PartyContent screen, done while looking into another issue; this stuff is still pretty ugly, but here is a startissue
Modified:
ofbiz/trunk/applications/party/entitydef/entitygroup.xml
ofbiz/trunk/applications/party/entitydef/entitymodel.xml
ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleEvents.xml
ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Content.ftl
Modified: ofbiz/trunk/applications/party/entitydef/entitygroup.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitygroup.xml?rev=589526&r1=589525&r2=589526&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/entitydef/entitygroup.xml (original)
+++ ofbiz/trunk/applications/party/entitydef/entitygroup.xml Sun Oct 28 23:56:03 2007
@@ -113,6 +113,7 @@
<entity-group group="org.ofbiz" entity="PartyClassificationType" />
<entity-group group="org.ofbiz" entity="PartyContactWithPurpose" />
<entity-group group="org.ofbiz" entity="PartyContent" />
+ <entity-group group="org.ofbiz" entity="PartyContentDetail" />
<entity-group group="org.ofbiz" entity="PartyContentType" />
<entity-group group="org.ofbiz" entity="PartyDataSource" />
<entity-group group="org.ofbiz" entity="PartyGroup" />
Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=589526&r1=589525&r2=589526&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Sun Oct 28 23:56:03 2007
@@ -1629,6 +1629,21 @@
<key-map field-name="partyContentTypeId"/>
</relation>
</entity>
+ <view-entity entity-name="PartyContentDetail" package-name="org.ofbiz.content.content" title="Party Content Detail View Entity">
+ <member-entity entity-alias="PCT" entity-name="PartyContent"/>
+ <member-entity entity-alias="CNT" entity-name="Content"/>
+ <alias-all entity-alias="PCT"/>
+ <alias-all entity-alias="CNT"/>
+ <view-link entity-alias="PCT" rel-entity-alias="CNT">
+ <key-map field-name="contentId"/>
+ </view-link>
+ <relation type="one-nofk" rel-entity-name="DataResource">
+ <key-map field-name="dataResourceId"/>
+ </relation>
+ <relation type="one-nofk" rel-entity-name="ContentType">
+ <key-map field-name="contentTypeId"/>
+ </relation>
+ </view-entity>
<entity entity-name="PartyContentType"
package-name="org.ofbiz.party.party"
title="Party Content Type Entity">
Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleEvents.xml?rev=589526&r1=589525&r2=589526&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleEvents.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleEvents.xml Sun Oct 28 23:56:03 2007
@@ -85,18 +85,17 @@
<call-class-method class-name="org.ofbiz.content.layout.LayoutWorker"
method-name="returnByteBuffer"
- ret-field-name="byteWrap"
- >
+ ret-field-name="byteWrap">
<field field-name="formInput" type="java.util.Map"/>
- </call-class-method >
+ </call-class-method>
- <set-service-fields service-name="createPartyContent" map-name="formInput.formInput" to-map-name="partyContentMap"/>
- <set field="partyContentMap._uploadedFile_fileName" from-field="formInput.imageFileName"/>
- <set field="partyContentMap.uploadedFile" from-field="byteWrap"/>
- <set field="partyContentMap._uploadedFile_contentType" from-field="formInput.formInput.mimeTypeId"/>
- <call-service service-name="createPartyContent" in-map-name="partyContentMap" break-on-error="false">
- <result-to-field result-name="contentId" field-name="contentId"/>
- </call-service>
+ <set-service-fields service-name="createPartyContent" map-name="formInput.formInput" to-map-name="partyContentMap"/>
+ <set field="partyContentMap._uploadedFile_fileName" from-field="formInput.imageFileName"/>
+ <set field="partyContentMap.uploadedFile" from-field="byteWrap"/>
+ <set field="partyContentMap._uploadedFile_contentType" from-field="formInput.formInput.mimeTypeId"/>
+ <call-service service-name="createPartyContent" in-map-name="partyContentMap" break-on-error="false">
+ <result-to-field result-name="contentId" field-name="contentId"/>
+ </call-service>
<!-- set the partyId in the request -->
<field-to-request field-name="partyId" map-name="formInput.formInput" request-name="partyId"/>
<field-to-request field-name="contentId" request-name="contentId"/>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml?rev=589526&r1=589525&r2=589526&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml Sun Oct 28 23:56:03 2007
@@ -412,23 +412,28 @@
<field-map field-name="dataResourceId" env-name="content.dataResourceId"/>
</entity-one>
</actions>
+
<alt-target use-when="content==null" target="createPartyContent"/>
- <auto-fields-entity entity-name="Content" />
+ <!-- <auto-fields-entity entity-name="Content"/> -->
+
<field name="partyId" map-name="parameters"><hidden/></field>
<field use-when="content!=null" name="contentId" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
- <field use-when="content==null&&contentId==null" name="contentId"><ignored/></field>
- <field use-when="content==null&&contentId!=null" name="contentId"><display description="${uiLabelMap.CommonCannotBeFound}: [${contentId}]" also-hidden="false"/></field>
- <field name="ownerContentId"><lookup target-form-name="LookupContent"/></field>
- <field name="dataResourceId">
- <lookup target-form-name="LookupDataResource"/>
+ <field name="partyContentTypeId">
+ <drop-down allow-empty="false">
+ <entity-options description="${description}" entity-name="PartyContentType"/>
+ </drop-down>
</field>
+ <!-- note sure if these two are necessray, but they are kind of confusing in this context:
+ <field name="ownerContentId"><lookup target-form-name="LookupContent"/></field>
+ <field name="dataResourceId"><lookup target-form-name="LookupDataResource"/></field>
+ -->
<field name="contentTypeId">
- <drop-down allow-empty="false">
- <entity-options description="${description}" entity-name="ContentType" key-field-name="contentTypeId"/>
+ <drop-down allow-empty="false" no-current-selected-key="DOCUMENT">
+ <entity-options description="${description}" entity-name="ContentType"/>
</drop-down>
</field>
<field name="statusId" use-when="content==null">
- <drop-down allow-empty="false">
+ <drop-down allow-empty="false" no-current-selected-key="CTNT_AVAILABLE">
<entity-options description="${description}" entity-name="StatusItem" key-field-name="statusId">
<entity-constraint name="statusTypeId" value="CONTENT_STATUS"/>
<entity-order-by field-name="sequenceId"/>
@@ -436,7 +441,7 @@
</drop-down>
</field>
<field name="statusId" use-when="content!=null">
- <drop-down allow-empty="false" current-description="${currentStatus.description}">
+ <drop-down allow-empty="false" current-description="${currentStatus.description}" no-current-selected-key="CTNT_AVAILABLE">
<entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})">
<entity-constraint name="statusId" value="${content.statusId}"/>
<entity-order-by field-name="sequenceId"/>
@@ -470,7 +475,7 @@
<form name="ListPartyContents" type="list"
separate-columns="false">
<actions>
- <entity-and entity-name="ContentAndRole">
+ <entity-and entity-name="PartyContentDetail">
<field-map field-name="partyId"/>
</entity-and>
</actions>
@@ -481,6 +486,7 @@
<sub-hyperlink target="EditPartyContents?contentId=${contentId}&amp;partyId=${partyId}" description="${contentId}" link-style="smallSubmit"/>
</display-entity>
</field>
+ <field name="partyContentTypeId"><display-entity entity-name="PartyContentType"/></field>
<field name="description"><display/></field>
<field name="statusId"><display-entity entity-name="StatusItem"></display-entity></field>
<field name="localeString"><display-entity entity-name="CountryCode" key-field-name="countryCode" description="${countryName}${countryCode}"></display-entity></field>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?rev=589526&r1=589525&r2=589526&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Sun Oct 28 23:56:03 2007
@@ -249,9 +249,9 @@
</#if>
</td>
<td>
- <#if partyRow.lastName?has_content>
+ <#if partyRow.getModelEntity().isField("lastName") && lastName?has_content>
${partyRow.lastName}<#if partyRow.firstName?has_content>, ${partyRow.firstName}</#if>
- <#elseif partyRow.groupName?has_content>
+ <#elseif partyRow.getModelEntity().isField("groupName") && partyRow.groupName?has_content>
${partyRow.groupName}
<#else>
<#assign partyName = Static["org.ofbiz.party.party.PartyHelper"].getPartyName(partyRow, true)>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Content.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Content.ftl?rev=589526&r1=589525&r2=589526&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Content.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Content.ftl Sun Oct 28 23:56:03 2007
@@ -67,7 +67,7 @@
<select name="roleTypeId">
<option value="">${uiLabelMap.PartySelectRole}</option>
<#list roles as role>
- <option value="${role.roleTypeId}">${role.get("description", locale)?default(role.roleTypeId)}</option>
+ <option value="${role.roleTypeId}" <#if role.roleTypeId == "_NA_">selected="selected"</#if>>${role.get("description", locale)?default(role.roleTypeId)}</option>
</#list>
</select>
<select name="mimeTypeId">