Author: jleroux
Date: Sun Dec 21 06:35:40 2014
New Revision: 1647094
URL: http://svn.apache.org/r1647094
Log:
"Applied fix from trunk for revision: 1646984"
------------------------------------------------------------------------
r1646984 | ashish | 2014-12-20 15:22:50 +0100 (sam. 20 déc. 2014) | 2 lignes
Applied patch from jira issue OFBIZ-4946 - Getting error when uploading a file
after creating a data resource.
Thanks Ashish Ambulkar for creating the issue. Thanks Arun, Jacques for
providing the patch.
------------------------------------------------------------------------
Modified:
ofbiz/branches/release13.07/ (props changed)
ofbiz/branches/release13.07/applications/content/config/ContentErrorUiLabels.xml
ofbiz/branches/release13.07/applications/content/config/ContentUiLabels.xml
ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml
ofbiz/branches/release13.07/applications/content/servicedef/services_content.xml
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/ContentManagementServices.java
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
ofbiz/branches/release13.07/applications/content/widget/LookupForms.xml
ofbiz/branches/release13.07/applications/content/widget/cms/CMSForms.xml
ofbiz/branches/release13.07/applications/content/widget/content/ContentForms.xml
ofbiz/branches/release13.07/applications/content/widget/content/DataResourceForms.xml
ofbiz/branches/release13.07/applications/content/widget/content/DataResourceScreens.xml
ofbiz/branches/release13.07/applications/party/widget/partymgr/CommunicationEventForms.xml
ofbiz/branches/release13.07/applications/party/widget/partymgr/PartyForms.xml
ofbiz/branches/release13.07/applications/product/widget/catalog/ImageManagementForms.xml
ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ContentForms.xml
ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ForumForms.xml
Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 21 06:35:40 2014
@@ -5,4 +5,4 @@
/ofbiz/branches/jquery:952958-1044489
/ofbiz/branches/multitenant20100310:921280-927264
/ofbiz/branches/release12.04:1557118
-/ofbiz/trunk:1506269,1506499,1506504,1506828,1509164,1510042,1511279,1512376,1512573,1516094,1517629,1517702,1517780,1517947,1518336,1518950,1519245,1519999,1520319,1520321,1520326,1524361,1524676,1524769,1524835,1524950,1525523,1526276,1526387,1526463,1527212,1527254,1527609,1527626,1527810,1528144,1528146,1528149,1528298,1529412,1529418,1529588,1530273,1530634,1530876,1530972,1530976,1531848,1532342,1532366,1533542,1533839,1535961,1536170,1536656,1537023,1537086,1537179,1537996,1538096,1539147,1539156,1539781,1542264,1542388,1542442,1543744,1543766,1543781,1543994,1544444,1547548,1548143,1549015,1550255,1550258,1550515,1551585,1551744,1552149,1552290,1552500,1552901,1552908,1554064,1554242,1554265,1554290,1554373,1554536,1554681,1554685,1554706,1554764,1554787,1555142,1557409-1557410,1557427,1557440,1557443,1557447,1557456-1557457,1557462,1557593,1558145,1558241,1558373,1558774,1559814,1560048,1560056,1560176,1560203,1560205,1560699,1561286,1561290,1561305,1561311,1561327,1561467,
1562767,1563238,1563683,1563958,1564111,1564113,1564463,1564473,1564493,1566096,1566273,1569078,1569743,1570611,1570622,1570639-1570640,1571207,1571219,1571247,1573161,1573498,1573639,1574019,1574201,1574404,1575508,1576259,1576331,1576378,1576506,1576511,1576757,1576839,1577268,1577744,1579155,1579161,1579277,1579309,1580455,1580850,1581386,1581972,1581997,1582762,1583040,1583427-1583428,1583551,1583674,1583681,1583689,1583696,1584873,1585033,1585574,1585958-1585959,1586987,1587841,1587843,1588733,1589589,1589602,1589606,1589612,1589625,1589669,1592530,1592588,1592745,1592977,1593902,1593908,1593952,1597239,1597464,1598113,1598327,1598475,1598544,1598913,1603439,1603732,1603739,1604357,1604363,1604522,1604554,1605029,1605269,1605348,1605354,1605707,1607457,1608355,1608495,1608526,1608698,1609047,1609065,1609076,1609087,1609149,1609155,1609167,1609184,1609389,1609394,1609398,1609406,1609418,1609885,1609889,1610355,1610420,1610425,1610685,1610918,1610925,1611321,1612190,1612202,16131
21,1614019,1614025,1614280,1614355,1614366,1614556,1615296-1615297,1616272,1616684,1616940,1617229,1617473,1617480,1617936,1617938,1618395,1618397,1618570,1618831,1619087,1619098,1619300,1621335,1621363,1621413,1621436,1621438-1621439,1621442,1621599,1621683,1622050,1622170,1622672,1623370,1624538,1624767,1624809,1624817,1626797,1627230,1627763,1628096,1628130,1628937,1628940,1629382,1629391,1629426,1631203,1631299-1631300,1632764,1632793,1633100,1633188,1633550,1636864,1637883,1639606,1639835,1639840-1639841,1639846,1639863,1639887,1640288,1640299,1640515,1640717,1641066,1641131,1641165,1641548,1641804,1642423,1643341,1644904,1645950,1646204,1646935
+/ofbiz/trunk:1506269,1506499,1506504,1506828,1509164,1510042,1511279,1512376,1512573,1516094,1517629,1517702,1517780,1517947,1518336,1518950,1519245,1519999,1520319,1520321,1520326,1524361,1524676,1524769,1524835,1524950,1525523,1526276,1526387,1526463,1527212,1527254,1527609,1527626,1527810,1528144,1528146,1528149,1528298,1529412,1529418,1529588,1530273,1530634,1530876,1530972,1530976,1531848,1532342,1532366,1533542,1533839,1535961,1536170,1536656,1537023,1537086,1537179,1537996,1538096,1539147,1539156,1539781,1542264,1542388,1542442,1543744,1543766,1543781,1543994,1544444,1547548,1548143,1549015,1550255,1550258,1550515,1551585,1551744,1552149,1552290,1552500,1552901,1552908,1554064,1554242,1554265,1554290,1554373,1554536,1554681,1554685,1554706,1554764,1554787,1555142,1557409-1557410,1557427,1557440,1557443,1557447,1557456-1557457,1557462,1557593,1558145,1558241,1558373,1558774,1559814,1560048,1560056,1560176,1560203,1560205,1560699,1561286,1561290,1561305,1561311,1561327,1561467,
1562767,1563238,1563683,1563958,1564111,1564113,1564463,1564473,1564493,1566096,1566273,1569078,1569743,1570611,1570622,1570639-1570640,1571207,1571219,1571247,1573161,1573498,1573639,1574019,1574201,1574404,1575508,1576259,1576331,1576378,1576506,1576511,1576757,1576839,1577268,1577744,1579155,1579161,1579277,1579309,1580455,1580850,1581386,1581972,1581997,1582762,1583040,1583427-1583428,1583551,1583674,1583681,1583689,1583696,1584873,1585033,1585574,1585958-1585959,1586987,1587841,1587843,1588733,1589589,1589602,1589606,1589612,1589625,1589669,1592530,1592588,1592745,1592977,1593902,1593908,1593952,1597239,1597464,1598113,1598327,1598475,1598544,1598913,1603439,1603732,1603739,1604357,1604363,1604522,1604554,1605029,1605269,1605348,1605354,1605707,1607457,1608355,1608495,1608526,1608698,1609047,1609065,1609076,1609087,1609149,1609155,1609167,1609184,1609389,1609394,1609398,1609406,1609418,1609885,1609889,1610355,1610420,1610425,1610685,1610918,1610925,1611321,1612190,1612202,16131
21,1614019,1614025,1614280,1614355,1614366,1614556,1615296-1615297,1616272,1616684,1616940,1617229,1617473,1617480,1617936,1617938,1618395,1618397,1618570,1618831,1619087,1619098,1619300,1621335,1621363,1621413,1621436,1621438-1621439,1621442,1621599,1621683,1622050,1622170,1622672,1623370,1624538,1624767,1624809,1624817,1626797,1627230,1627763,1628096,1628130,1628937,1628940,1629382,1629391,1629426,1631203,1631299-1631300,1632764,1632793,1633100,1633188,1633550,1636864,1637883,1639606,1639835,1639840-1639841,1639846,1639863,1639887,1640288,1640299,1640515,1640717,1641066,1641131,1641165,1641548,1641804,1642423,1643341,1644904,1645950,1646204,1646935,1646984
Modified:
ofbiz/branches/release13.07/applications/content/config/ContentErrorUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/config/ContentErrorUiLabels.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/content/config/ContentErrorUiLabels.xml
(original)
+++
ofbiz/branches/release13.07/applications/content/config/ContentErrorUiLabels.xml
Sun Dec 21 06:35:40 2014
@@ -303,4 +303,9 @@
<value xml:lang="zh">没æä¸ä¼ æä»¶</value>
<value xml:lang="zh_TW">æ²æä¸å³æä»¶</value>
</property>
+ <property key="uploadContentAndImage.noRootDirProvided">
+ <value xml:lang="en">No root dir provided, please fill path in the
data resource objectInfo field</value>
+ <value xml:lang="fr">Aucun répertoire racine fourni. Veuillez
indiquer le chemin dans le champ objectInfo de la ressource de donnée</value>
+ </property>
+
</resource>
Modified:
ofbiz/branches/release13.07/applications/content/config/ContentUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/config/ContentUiLabels.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/content/config/ContentUiLabels.xml
(original)
+++ ofbiz/branches/release13.07/applications/content/config/ContentUiLabels.xml
Sun Dec 21 06:35:40 2014
@@ -1024,6 +1024,10 @@
<value xml:lang="zh">å
容设置</value>
<value xml:lang="zh_TW">å
§å®¹è¨ç½®</value>
</property>
+ <property key="ContentContentShow">
+ <value xml:lang="en">Show Content (if visible else simply Id)</value>
+ <value xml:lang="fr">Montre le contenu (si visible sinon uniquement la
référence</value>
+ </property>
<property key="ContentContentToOrFromErrorRetriving">
<value xml:lang="en">Error in retrieving content To or From.</value>
<value xml:lang="fr">Erreur dans la récupération du document de
destination ou d'origine.</value>
@@ -1231,6 +1235,10 @@
<value xml:lang="zh">Html</value>
<value xml:lang="zh_TW">Html</value>
</property>
+ <property key="ContentDataResourceId">
+ <value xml:lang="en">Data Resource Id</value>
+ <value xml:lang="fr">Ressource de données</value>
+ </property>
<property key="ContentDataResourceImage">
<value xml:lang="ar">ØµÙØ±Ø©</value>
<value xml:lang="da">Billede</value>
@@ -7490,8 +7498,8 @@
<value xml:lang="ar">إشØÙ عÙÙÙØ§ Ø§ÙØµÙرة</value>
<value xml:lang="da">Upload billede</value>
<value xml:lang="de">Bild hochladen</value>
- <value xml:lang="en">Upload Image</value>
- <value xml:lang="fr">Télécharger une image vers le serveur</value>
+ <value xml:lang="en">Upload File</value>
+ <value xml:lang="fr">Télécharger un fichier vers le serveur</value>
<value xml:lang="it">Carica Immagine</value>
<value xml:lang="ja">ç»åãã¢ãããã¼ã</value>
<value xml:lang="pt">Enviar imagem</value>
Modified:
ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml
(original)
+++
ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml
Sun Dec 21 06:35:40 2014
@@ -564,13 +564,16 @@ under the License.
<property-to-field resource="content.properties"
property="content.upload.always.local.file" field="forceLocal"/>
<if>
<condition>
- <!-- if (forceLocal &&
!("LOCAL_FILE".equals(parameters.dataResourceTypeId) ||
"OFBIZ_FILE".equals(parameters.dataResourceTypeId)) -->
<and>
<if-compare field="forceLocal" value="true"
operator="equals"/>
<not>
<or>
<if-compare field="parameters.dataResourceTypeId"
operator="equals" value="LOCAL_FILE"/>
<if-compare field="parameters.dataResourceTypeId"
operator="equals" value="OFBIZ_FILE"/>
+ <if-compare field="parameters.dataResourceTypeId"
operator="equals" value="CONTEXT_FILE"/>
+ <if-compare field="parameters.dataResourceTypeId"
operator="equals" value="LOCAL_FILE_BIN"/>
+ <if-compare field="parameters.dataResourceTypeId"
operator="equals" value="OFBIZ_FILE_BIN"/>
+ <if-compare field="parameters.dataResourceTypeId"
operator="equals" value="CONTEXT_FILE_BIN"/>
</or>
</not>
</and>
@@ -623,15 +626,44 @@ under the License.
</if>
</if-empty>
- <if-compare field="parameters.dataResourceTypeId" value="LOCAL_FILE"
operator="equals">
- <call-simple-method method-name="saveLocalFileDataResource"/>
- <return/>
- </if-compare>
+ <if>
+ <condition>
+ <or>
+ <if-compare field="parameters.dataResourceTypeId"
value="LOCAL_FILE" operator="equals"/>
+ <if-compare field="parameters.dataResourceTypeId"
value="LOCAL_FILE_BIN" operator="equals"/>
+ </or>
+ </condition>
+ <then>
+ <call-simple-method method-name="saveLocalFileDataResource"/>
+ <return/>
+ </then>
+ </if>
- <if-compare field="parameters.dataResourceTypeId" value="OFBIZ_FILE"
operator="equals">
- <call-simple-method method-name="saveOfbizFileDataResource"/>
- <return/>
- </if-compare>
+ <if>
+ <condition>
+ <or>
+ <if-compare field="parameters.dataResourceTypeId"
value="OFBIZ_FILE" operator="equals"/>
+ <if-compare field="parameters.dataResourceTypeId"
value="OFBIZ_FILE_BIN" operator="equals"/>
+ </or>
+ </condition>
+ <then>
+ <call-simple-method method-name="saveOfbizFileDataResource"/>
+ <return/>
+ </then>
+ </if>
+
+ <if>
+ <condition>
+ <or>
+ <if-compare field="parameters.dataResourceTypeId"
value="CONTEXT_FILE" operator="equals"/>
+ <if-compare field="parameters.dataResourceTypeId"
value="CONTEXT_FILE_BIN" operator="equals"/>
+ </or>
+ </condition>
+ <then>
+ <call-simple-method method-name="saveContextFileDataResource"/>
+ <return/>
+ </then>
+ </if>
<if-compare field="parameters.dataResourceTypeId" value="IMAGE_OBJECT"
operator="equals">
<entity-one entity-name="ImageDataResource"
value-field="dataResObj">
@@ -740,7 +772,7 @@ under the License.
<if-not-empty field="extension">
<set
value="${uploadPath}/${dataResource.dataResourceId}.${extension.fileExtensionId}"
field="dataResource.objectInfo"/>
</if-not-empty>
- <set value="LOCAL_FILE" field="dataResource.dataResourceTypeId"/>
+ <set from-field="parameters.dataResourceTypeId"
field="dataResource.dataResourceTypeId"/>
<store-value value-field="dataResource"/>
<set-service-fields service-name="createAnonFile" map="dataResource"
to-map="fileCtx"/>
@@ -811,7 +843,7 @@ under the License.
<if-not-empty field="extension">
<set
value="${uploadPath}/${dataResource.dataResourceId}.${extension.fileExtensionId}"
field="dataResource.objectInfo"/>
</if-not-empty>
- <set value="OFBIZ_FILE" field="dataResource.dataResourceTypeId"/>
+ <set from-field="parameters.dataResourceTypeId"
field="dataResource.dataResourceTypeId"/>
<store-value value-field="dataResource"/>
<set-service-fields service-name="createAnonFile" map="dataResource"
to-map="fileCtx"/>
@@ -1061,5 +1093,79 @@ under the License.
<field-to-result result-name="dataResourceId"
field="dataResource.dataResourceId"/>
<field-to-result result-name="mimeTypeId"
field="dataResource.mimeTypeId"/>
+ </simple-method>
+
+ <!-- save CONTEXT_FILE data -->
+ <simple-method method-name="saveContextFileDataResource"
short-description="Attach an uploaded file to a data resource as CONTEXT_FILE">
+ <entity-one entity-name="DataResource" value-field="dataResource"/>
+ <if-empty field="dataResource">
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentDataResourceNotFound"/>
+ </add-error>
+ <else>
+ <if-not-empty field="dataResource.objectInfo">
+ <set field="isUpdate" value="Y"/>
+ </if-not-empty>
+ </else>
+ </if-empty>
+ <if>
+ <condition>
+ <if-empty field="parameters._uploadedFile_fileName"/>
+ </condition>
+ <then>
+ <if>
+ <condition>
+ <or>
+ <if-empty field="isUpdate"/>
+ <if-compare field="isUpdate" value="Y"
operator="not-equals"/>
+ </or>
+ </condition>
+ <then>
+ <add-error>
+ <fail-property resource="ContentUiLabels"
property="ContentNoUploadedContentFound"/>
+ </add-error>
+ </then>
+ <else>
+ <!-- if not upload is found on an update; its okay,
don't do anything just return -->
+ <field-to-result result-name="dataResourceId"
field="dataResource.dataResourceId"/>
+ <field-to-result result-name="mimeTypeId"
field="dataResource.mimeTypeId"/>
+ <return/>
+ </else>
+ </if>
+
+ </then>
+ </if>
+ <check-errors/>
+
+ <set field="uploadPath" from-field="parameters.rootDir"/>
+ <log level="info" message="[attachLocalFileToDataResource] - Found
Subdir : ${uploadPath}"/>
+ <if-empty field="uploadPath">
+ <add-error>
+ <fail-property resource="ContentErrorUiLabels"
property="uploadContentAndImage.noRootDirProvided"/>
+ </add-error>
+ <check-errors/>
+ </if-empty>
+ <log level="info" message="[attachLocalFileToDataResource] - Found
Subdir : ${uploadPath}"/>
+
+ <set from-field="parameters._uploadedFile_contentType"
field="extenLookup.mimeTypeId"/>
+ <find-by-and entity-name="FileExtension" map="extenLookup"
list="extensions"/>
+ <first-from-list entry="extension" list="extensions"/>
+
+ <set from-field="parameters._uploadedFile_fileName"
field="dataResource.dataResourceName"/>
+ <set from-field="parameters._uploadedFile_contentType"
field="dataResource.mimeTypeId"/>
+ <set value="${uploadPath}/${dataResource.dataResourceId}"
field="dataResource.objectInfo"/>
+ <if-not-empty field="extension">
+ <set
value="${uploadPath}/${dataResource.dataResourceId}.${extension.fileExtensionId}"
field="dataResource.objectInfo"/>
+ </if-not-empty>
+ <set from-field="parameters.dataResourceTypeId"
field="dataResource.dataResourceTypeId"/>
+ <store-value value-field="dataResource"/>
+
+ <set-service-fields service-name="createAnonFile" map="dataResource"
to-map="fileCtx"/>
+ <set from-field="parameters.uploadedFile" field="fileCtx.binData"/>
+ <set from-field="dataResource" field="fileCtx.dataResource"/>
+ <call-service service-name="createAnonFile" in-map-name="fileCtx"
include-user-login="true"/>
+
+ <field-to-result result-name="dataResourceId"
field="dataResource.dataResourceId"/>
+ <field-to-result result-name="mimeTypeId"
field="dataResource.mimeTypeId"/>
</simple-method>
</simple-methods>
Modified:
ofbiz/branches/release13.07/applications/content/servicedef/services_content.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/servicedef/services_content.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/content/servicedef/services_content.xml
(original)
+++
ofbiz/branches/release13.07/applications/content/servicedef/services_content.xml
Sun Dec 21 06:35:40 2014
@@ -88,6 +88,7 @@
<attribute name="dataResourceTypeId" type="String" mode="IN"
optional="true"/>
<!-- mimetype is set from the uploaded file (contentType) when empty
-->
<attribute name="mimeTypeId" type="String" mode="INOUT"
optional="true"/>
+ <attribute mode="IN" name="rootDir" optional="true" type="String"/>
</service>
<service name="createContentFromUploadedFile" engine="group"
transaction-timeout="300">
Modified:
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/ContentManagementServices.java
(original)
+++
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/ContentManagementServices.java
Sun Dec 21 06:35:40 2014
@@ -147,7 +147,6 @@ public class ContentManagementServices {
Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
Locale locale = (Locale) context.get("locale");
- Debug.logInfo("=========== type:" +
(String)context.get("dataresourceTypeId") , module);
// Knowing why a request fails permission check is one of the more
difficult
// aspects of content management. Setting "displayFailCond" to true
will
// put an html table in result.errorMessage that will show what tests
were performed
@@ -639,7 +638,7 @@ public class ContentManagementServices {
newDrContext.put("mimeTypeId", mimeTypeId);
}
- if (!dataResourceExists) {
+ if (!dataResourceExists) { // Create
Map<String, Object> thisResult =
dispatcher.runSync("createDataResource", newDrContext);
String errorMsg = ServiceUtil.getErrorMessage(thisResult);
if (UtilValidate.isNotEmpty(errorMsg)) {
@@ -652,29 +651,7 @@ public class ContentManagementServices {
dataResource = (GenericValue)thisResult.get("dataResource");
Map<String, Object> fileContext = FastMap.newInstance();
fileContext.put("userLogin", userLogin);
- if (dataResourceTypeId.indexOf("_FILE") >=0) {
- boolean hasData = false;
- if (textData != null) {
- fileContext.put("textData", textData);
- hasData = true;
- }
- if (imageDataBytes != null) {
- fileContext.put("binData", imageDataBytes);
- hasData = true;
- }
- if (hasData) {
- fileContext.put("rootDir", context.get("rootDir"));
- fileContext.put("dataResourceTypeId", dataResourceTypeId);
- if (UtilValidate.isNotEmpty(dataResource) &&
UtilValidate.isNotEmpty(dataResource.get("objectInfo"))) {
- fileContext.put("objectInfo",
dataResource.get("objectInfo"));
- }
- thisResult = dispatcher.runSync("createFile", fileContext);
- errorMsg = ServiceUtil.getErrorMessage(thisResult);
- if (UtilValidate.isNotEmpty(errorMsg)) {
- return ServiceUtil.returnError(errorMsg);
- }
- }
- } else if (dataResourceTypeId.equals("IMAGE_OBJECT")) {
+ if (dataResourceTypeId.equals("IMAGE_OBJECT")) {
if (imageDataBytes != null) {
fileContext.put("dataResourceId", dataResourceId);
fileContext.put("imageData", imageDataBytes);
@@ -698,46 +675,19 @@ public class ContentManagementServices {
}
}
}
- } else {
+ } else { // Update
Map<String, Object> thisResult =
dispatcher.runSync("updateDataResource", newDrContext);
String errorMsg = ServiceUtil.getErrorMessage(thisResult);
if (UtilValidate.isNotEmpty(errorMsg)) {
return ServiceUtil.returnError(errorMsg);
}
- //Map thisResult = DataServices.updateDataResourceMethod(dctx,
context);
- if (Debug.infoOn()) {
- Debug.logInfo("====in persist...
thisResult.permissionStatus(0):" + thisResult.get("permissionStatus"), null);
- }
- //thisResult = DataServices.updateElectronicTextMethod(dctx,
context);
Map<String, Object> fileContext = FastMap.newInstance();
fileContext.put("userLogin", userLogin);
String forceElectronicText =
(String)context.get("forceElectronicText");
- Debug.logInfo("====dataResourceType" + dataResourceTypeId , module);
- if (dataResourceTypeId.indexOf("_FILE") >=0) {
- boolean hasData = false;
- if (textData != null) {
- fileContext.put("textData", textData);
- hasData = true;
- }
- if (imageDataBytes != null) {
- fileContext.put("binData", imageDataBytes);
- hasData = true;
- }
- if (hasData || "true".equalsIgnoreCase(forceElectronicText)) {
- fileContext.put("rootDir", context.get("rootDir"));
- fileContext.put("dataResourceTypeId", dataResourceTypeId);
- fileContext.put("objectInfo",
dataResource.get("objectInfo"));
- thisResult = dispatcher.runSync("updateFile", fileContext);
- errorMsg = ServiceUtil.getErrorMessage(thisResult);
- if (UtilValidate.isNotEmpty(errorMsg)) {
- return ServiceUtil.returnError(errorMsg);
- }
- }
- } else if (dataResourceTypeId.equals("IMAGE_OBJECT")) {
+ if (dataResourceTypeId.equals("IMAGE_OBJECT")) {
if (imageDataBytes != null ||
"true".equalsIgnoreCase(forceElectronicText)) {
fileContext.put("dataResourceId", dataResourceId);
fileContext.put("imageData", imageDataBytes);
- Debug.logInfo("====trying to update image", module);
thisResult = dispatcher.runSync("updateImage", fileContext);
errorMsg = ServiceUtil.getErrorMessage(thisResult);
if (UtilValidate.isNotEmpty(errorMsg)) {
@@ -758,6 +708,17 @@ public class ContentManagementServices {
}
}
}
+ if (dataResourceTypeId.indexOf("_FILE") >=0) {
+ Map<String, Object> uploadImage = FastMap.newInstance();
+ uploadImage.put("userLogin", userLogin);
+ uploadImage.put("dataResourceId", dataResourceId);
+ uploadImage.put("dataResourceTypeId", dataResourceTypeId);
+ uploadImage.put("rootDir", context.get("objectInfo"));
+ uploadImage.put("uploadedFile", imageDataBytes);
+ uploadImage.put("_uploadedFile_fileName", (String)
context.get("_imageData_fileName"));
+ uploadImage.put("_uploadedFile_contentType", (String)
context.get("_imageData_contentType"));
+ dispatcher.runSync("attachUploadToDataResource", uploadImage);
+ }
result.put("dataResourceId", dataResourceId);
result.put("drDataResourceId", dataResourceId);
context.put("dataResourceId", dataResourceId);
Modified:
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
(original)
+++
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
Sun Dec 21 06:35:40 2014
@@ -56,6 +56,7 @@ import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.FileUtil;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.StringUtil.StringWrapper;
import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.base.util.UtilHttp;
import org.ofbiz.base.util.UtilIO;
@@ -63,7 +64,6 @@ import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.UtilXml;
-import org.ofbiz.base.util.StringUtil.StringWrapper;
import org.ofbiz.base.util.collections.MapStack;
import org.ofbiz.base.util.template.FreeMarkerWorker;
import org.ofbiz.base.util.template.XslTransform;
@@ -936,14 +936,14 @@ public class DataResourceWorker impleme
public static void renderFile(String dataResourceTypeId, String
objectInfo, String rootDir, Appendable out) throws GeneralException,
IOException {
// TODO: this method assumes the file is a text file, if it is an
image we should respond differently, see the comment above for IMAGE_OBJECT
type data resource
- if (dataResourceTypeId.equals("LOCAL_FILE")) {
+ if (dataResourceTypeId.equals("LOCAL_FILE") &&
UtilValidate.isNotEmpty(objectInfo)) {
File file = FileUtil.getFile(objectInfo);
if (!file.isAbsolute()) {
throw new GeneralException("File (" + objectInfo + ") is not
absolute");
}
FileReader in = new FileReader(file);
UtilIO.copy(in, true, out);
- } else if (dataResourceTypeId.equals("OFBIZ_FILE")) {
+ } else if (dataResourceTypeId.equals("OFBIZ_FILE") &&
UtilValidate.isNotEmpty(objectInfo)) {
String prefix = System.getProperty("ofbiz.home");
String sep = "";
if (objectInfo.indexOf("/") != 0 && prefix.lastIndexOf("/") !=
(prefix.length() - 1)) {
@@ -952,7 +952,7 @@ public class DataResourceWorker impleme
File file = FileUtil.getFile(prefix + sep + objectInfo);
FileReader in = new FileReader(file);
UtilIO.copy(in, true, out);
- } else if (dataResourceTypeId.equals("CONTEXT_FILE")) {
+ } else if (dataResourceTypeId.equals("CONTEXT_FILE") &&
UtilValidate.isNotEmpty(objectInfo)) {
String prefix = rootDir;
String sep = "";
if (objectInfo.indexOf("/") != 0 && prefix.lastIndexOf("/") !=
(prefix.length() - 1)) {
Modified:
ofbiz/branches/release13.07/applications/content/widget/LookupForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/widget/LookupForms.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/content/widget/LookupForms.xml
(original)
+++ ofbiz/branches/release13.07/applications/content/widget/LookupForms.xml Sun
Dec 21 06:35:40 2014
@@ -38,7 +38,7 @@ under the License.
<form name="lookupDataResourceContent"
default-entity-name="DataResourceContentView" target="LookupSubContent"
title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId">
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}">
<text-find/>
</field>
<field name="coContentId">
Modified:
ofbiz/branches/release13.07/applications/content/widget/cms/CMSForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/widget/cms/CMSForms.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/content/widget/cms/CMSForms.xml
(original)
+++ ofbiz/branches/release13.07/applications/content/widget/cms/CMSForms.xml
Sun Dec 21 06:35:40 2014
@@ -27,7 +27,7 @@ under the License.
<field name="caContentAssocTypeId"><text-find/></field>
<field name="caFromDate"
title="${uiLabelMap.CommonFromDate}"><date-find/></field>
<field name="contentId"><text-find/></field>
- <field name="dataResourceId"><text-find/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><text-find/></field>
<field name="contentName"><text-find/></field>
<field name="submitButton" title="${uiLabelMap.CommonFind}"
widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
@@ -68,7 +68,7 @@ under the License.
<field name="caMapKey"><display/></field>
<field name="caFromDate"
title="${uiLabelMap.CommonFromDate}"><display/></field>
<field name="contentId"><display/></field>
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="contentName"><display/></field>
</form>
@@ -77,7 +77,7 @@ under the License.
<field name="imageData" >
<file />
</field>
- <field name="dataResourceId" >
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" >
<drop-down allow-empty="false"
no-current-selected-key="TEMPLATE_TEXT_ONLY">
<option key="TEMPLATE_TEXT_ONLY"
description="${uiLabelMap.ContentTemplateTextOnly}"/>
<option key="TEMPLATE_IMAGE_CENTERED"
description="${uiLabelMap.ContentTemplateImageCentered}"/>
@@ -498,7 +498,7 @@ under the License.
<field name="dataResourceTitle" title-style="h1" map-name="dummy">
<display description=""/>
</field>
- <field name="dataResourceId">
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}">
<lookup target-form-name="LookupDataResource">
<sub-hyperlink
use-when=""${currentValue.dataResourceId}".length()>0"
link-style="buttontext" target-type="intra-app" target="gotoDataResource"
description="${uiLabelMap.ContentGoToDataResource}">
<parameter param-name="dataResourceId"
from-field="currentValue.dataResourceId"/>
Modified:
ofbiz/branches/release13.07/applications/content/widget/content/ContentForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/widget/content/ContentForms.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/content/widget/content/ContentForms.xml
(original)
+++
ofbiz/branches/release13.07/applications/content/widget/content/ContentForms.xml
Sun Dec 21 06:35:40 2014
@@ -42,7 +42,7 @@ under the License.
</entity-options>
</drop-down>
</field>
- <field name="dataResourceId" position="1">
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" position="1">
<lookup target-form-name="LookupDataResource"/>
</field>
<field name="ownerContentId" position="2">
@@ -95,8 +95,8 @@ under the License.
<field name="localeString" sort-field="true"><display-entity
entity-name="CountryCode" key-field-name="countryCode"
description="${countryName}[${countryCode}]"></display-entity></field>
<field name="contentTypeId" sort-field="true"><display-entity
entity-name="ContentType"></display-entity></field>
<field name="mimeTypeId" sort-field="true"><display-entity
entity-name="MimeType"></display-entity></field>
- <field name="dataResourceId" use-when="dataResourceId==null"
sort-field="true"><display/></field>
- <field name="dataResourceId" use-when="dataResourceId!=null"
sort-field="true">
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId==null"
sort-field="true"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId!=null"
sort-field="true">
<display-entity entity-name="DataResource"
description="${dataResourceName}">
<sub-hyperlink target="EditDataResource"
link-style="buttontext" description="[${dataResourceId}]">
<parameter param-name="dataResourceId"/>
@@ -151,14 +151,14 @@ under the License.
</entity-options>
</drop-down>
</field>
- <field name="dataResourceId" use-when="dataResourceId != null">
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId != null">
<lookup target-form-name="LookupDataResource">
<sub-hyperlink link-style="buttontext"
target="EditDataResource" description="${uiLabelMap.ContentGoToDataResource}">
<parameter param-name="dataResourceId"
from-field="currentValue.dataResourceId"/>
</sub-hyperlink>
</lookup>
</field>
- <field name="dataResourceId" use-when="dataResourceId == null ">
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId == null ">
<lookup target-form-name="LookupDataResource">
<sub-hyperlink link-style="buttontext"
target="AddDataResourceFromContent"
description="${uiLabelMap.FormFieldTitle_newDataResourceId}">
<parameter param-name="contentId"
from-field="currentValue.contentId"/>
Modified:
ofbiz/branches/release13.07/applications/content/widget/content/DataResourceForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/widget/content/DataResourceForms.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/content/widget/content/DataResourceForms.xml
(original)
+++
ofbiz/branches/release13.07/applications/content/widget/content/DataResourceForms.xml
Sun Dec 21 06:35:40 2014
@@ -24,7 +24,7 @@ under the License.
<form name="FindDataResource" target="findDataResource" type="single"
header-row-style="header-row" default-table-style="basic-table">
<field name="noConditionFind"><hidden value="Y"/><!-- if this isn't
there then with all fields empty no query will be done --></field>
- <field name="dataResourceId"><text-find ignore-case="true"/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><text-find
ignore-case="true"/></field>
<field name="dataResourceName"><text-find ignore-case="true"/></field>
<field name="dataResourceTypeId">
<drop-down allow-empty="true">
@@ -140,7 +140,7 @@ under the License.
<field-map field-name="viewSize" from-field="viewSize"/>
</service>
</actions>
- <field name="dataResourceId">
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}">
<hyperlink also-hidden="false" target-type="plain"
description="${dataResourceId}"
target="javascript:set_value('${dataResourceId}')"/>
</field>
<field name="dataResourceName"><display/></field>
@@ -238,7 +238,7 @@ under the License.
<form name="DataResourceMaster" target="createDataResource" title=""
type="single" default-map-name="currentValue"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-entity entity-name="DataResource"
default-field-type="edit"/>
- <field name="dataResourceId"></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"></field>
<field name="dataResourceTypeId">
<drop-down allow-empty="true">
<entity-options description="${description}"
entity-name="DataResourceType" key-field-name="dataResourceTypeId"/>
@@ -287,14 +287,14 @@ under the License.
-->
<form name="AddDataResource" target="createDataResource" title=""
type="single" extends="DataResourceMaster"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId"><text/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><text/></field>
<field name="submitButton" title="${uiLabelMap.CommonCreate}"
widget-style="smallSubmit"><submit button-type="button"/></field>
<field name="objectInfo" title="${uiLabelMap.ContentUrl}"/>
<field name="mode"><hidden value="CREATE"/></field>
</form>
<form name="AddDataResourceText" target="createDataResourceAndText"
title="" type="single" extends="DataResourceMaster"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId"><text/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><text/></field>
<field name="dataResourceTypeId"><hidden
value="ELECTRONIC_TEXT"/></field>
<field name="dataResourceTypeIdDisplay"
title="${uiLabelMap.CommonType}" field-name="dataResourceTypeId">
<display description="ELECTRONIC_TEXT" also-hidden="false"/>
@@ -304,7 +304,7 @@ under the License.
</form>
<form name="AddDataResourceUrl" target="createDataResourceUrl" title=""
type="single" extends="DataResourceMaster"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId"><text/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><text/></field>
<field name="objectInfo"
title="${uiLabelMap.ContentUrl}"><text/></field>
<field name="dataResourceTypeId"><hidden value="URL_RESOURCE"/></field>
<field name="dataResourceTypeIdDisplay"
title="${uiLabelMap.CommonType}" field-name="dataResourceTypeId">
@@ -348,17 +348,17 @@ under the License.
</form>
<form name="ImageUpload" target="uploadImage" title="" type="upload"
default-map-name="currentValue"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="dataResourceTypeId" ><hidden/></field>
- <field name="objectInfo"><display /></field>
- <field name="imageData" entity-name="ImageDataResource"><file/></field>
+ <field name="objectInfo"
title="${uiLabelMap.ContentUploadedFile}"><display /></field>
+ <field name="imageData" entity-name="ImageDataResource"
title="${uiLabelMap.ContentFile}"><file/></field>
<field name="submitButton" title="${uiLabelMap.CommonUpload}"
widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<!-- DataResourceAttribute forms -->
<form name="AddDataResourceAttribute" target="addDataResourceAttribute"
title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-service service-name="createDataResourceAttribute"/>
- <field name="dataResourceId" title=" "
map-name="currentValue"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"
map-name="currentValue"><display/></field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}"
widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="ListDataResourceAttribute" list-name="dataResourceAttribute"
target="updateDataResourceAttribute" title="" type="list"
@@ -386,7 +386,7 @@ under the License.
<form name="AddDataResourceRole" target="addDataResourceRole" title=""
type="single"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-entity entity-name="DataResourceRole"/>
- <field name="dataResourceId" title=" "
map-name="currentValue"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"
map-name="currentValue"><display/></field>
<field name="partyId" title=" "><lookup
target-form-name="LookupPerson"/></field>
<field name="roleTypeId">
<drop-down allow-empty="true">
@@ -422,7 +422,7 @@ under the License.
<form name="AddDataResourceProductFeature"
target="createDataResourceProductFeature" title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-service service-name="createProductFeatureDataResource"/>
- <field name="dataResourceId" map-name="currentValue"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"
map-name="currentValue"><display/></field>
<field name="productFeatureId" widget-style="buttontext"><lookup
target-form-name="LookupProductFeature"/></field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}"
widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
@@ -487,7 +487,7 @@ under the License.
<entity-one entity-name="ElectronicText"
value-field="electronicText"/>
</actions>
<alt-target use-when="electronicText==null"
target="addElectronicText"/>
- <field name="dataResourceId" title=" "
widget-style="buttontext"><display also-hidden="true"/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" widget-style="buttontext"><display
also-hidden="true"/></field>
<field name="textData" widget-style="buttontext"><textarea cols="120"
rows="24"/></field>
<field name="submitButton" use-when="electronicText!=null"
title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit
button-type="button"/></field>
<field name="submitButton" use-when="electronicText==null"
title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit
button-type="button"/></field>
@@ -497,7 +497,7 @@ under the License.
<form name="AddHtmlText" target="addHtmlText" title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-entity entity-name="ElectronicText"/>
- <field name="dataResourceId" title=" " widget-style="buttontext"
map-name="currentValue"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" widget-style="buttontext"
map-name="currentValue"><display/></field>
<field name="textData" id-name="textData"><textarea rows="24"
cols="120"/></field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}"
widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
@@ -508,7 +508,7 @@ under the License.
</actions>
<alt-target use-when="electronicText==null" target="addHtmlText"/>
<auto-fields-entity entity-name="ElectronicText"/>
- <field name="dataResourceId" title=" "
widget-style="buttontext"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"
widget-style="buttontext"><display/></field>
<field name="textData" id-name="textData"
encode-output="true"><textarea cols="120" rows="20" visual-editor-enable="true"
/></field>
<field name="submitButton" title="${uiLabelMap.CommonUpdate}"
widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
Modified:
ofbiz/branches/release13.07/applications/content/widget/content/DataResourceScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/widget/content/DataResourceScreens.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/content/widget/content/DataResourceScreens.xml
(original)
+++
ofbiz/branches/release13.07/applications/content/widget/content/DataResourceScreens.xml
Sun Dec 21 06:35:40 2014
@@ -214,8 +214,15 @@ under the License.
<decorator-screen name="commonDataResourceDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-form name="ImageUpload"
location="component://content/widget/content/DataResourceForms.xml"/>
- <content
dataresource-id="${currentValue.dataResourceId}" border="false"/>
- </decorator-section>
+ <!-- Commented out the following snippet because the
behaviour is too random (does not depend on browser)-->
+<!-- <content
dataresource-id="${currentValue.dataResourceId}" border="false"/>
+ <horizontal-separator></horizontal-separator>
+ <label>${uiLabelMap.ContentContentShow}:</label>
+ <container>
+ <content
dataresource-id="${currentValue.dataResourceId}" border="false"/>
+ <horizontal-separator></horizontal-separator>
+ </container>
+--> </decorator-section>
</decorator-screen>
</widgets>
</section>
Modified:
ofbiz/branches/release13.07/applications/party/widget/partymgr/CommunicationEventForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/party/widget/partymgr/CommunicationEventForms.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/party/widget/partymgr/CommunicationEventForms.xml
(original)
+++
ofbiz/branches/release13.07/applications/party/widget/partymgr/CommunicationEventForms.xml
Sun Dec 21 06:35:40 2014
@@ -789,7 +789,7 @@ under the License.
<field name="communicationEventId"><display/></field>
<field name="contentId"><display/></field>
<field name="contentTypeId"><hidden/></field>
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="contentName"><text/></field>
<field name="fromDate"><display/></field>
<field name="thruDate"><date-time/></field>
Modified:
ofbiz/branches/release13.07/applications/party/widget/partymgr/PartyForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/party/widget/partymgr/PartyForms.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/party/widget/partymgr/PartyForms.xml
(original)
+++
ofbiz/branches/release13.07/applications/party/widget/partymgr/PartyForms.xml
Sun Dec 21 06:35:40 2014
@@ -586,7 +586,7 @@ under the License.
</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="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><lookup
target-form-name="LookupDataResource"/></field>
-->
<field name="contentTypeId">
<drop-down allow-empty="false" no-current-selected-key="DOCUMENT">
Modified:
ofbiz/branches/release13.07/applications/product/widget/catalog/ImageManagementForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/product/widget/catalog/ImageManagementForms.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/product/widget/catalog/ImageManagementForms.xml
(original)
+++
ofbiz/branches/release13.07/applications/product/widget/catalog/ImageManagementForms.xml
Sun Dec 21 06:35:40 2014
@@ -53,7 +53,7 @@ under the License.
</hyperlink>
</field>
<field name="contentId"><display/></field>
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="fromDate"><display/></field>
<field name="statusId" title="${uiLabelMap.CommonStatus}">
<display-entity entity-name="StatusItem" key-field-name="statusId"
description="${description}"/>
@@ -116,7 +116,7 @@ under the License.
</field>
<field name="drDataResourceName" position="2"
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
<field name="contentId" position="2"><display/></field>
- <field name="dataResourceId" position="2"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" position="2"><display/></field>
<field name="fromDate" position="2"><display/></field>
<field name="viewButton" position="2" title="${uiLabelMap.CommonView}"
widget-style="buttontext">
<hyperlink
target="${origContentDataResourceViews[0].drObjectInfo}" target-window="_blank"
description="${uiLabelMap.CommonView}" also-hidden="false"
target-type="content"/>
@@ -156,7 +156,7 @@ under the License.
<field name="drObjectInfo" position="2"
title="${uiLabelMap.CommonImage}"><image style="cssImgLarge"/></field>
<field name="drDataResourceName" position="2"
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
<field name="contentId" position="2"><display/></field>
- <field name="dataResourceId" position="2"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" position="2"><display/></field>
<field name="fromDate" position="2"><display/></field>
<field name="viewButton" position="2" title="${uiLabelMap.CommonView}"
widget-style="buttontext">
<hyperlink
target="${origContentDataResourceViews[0].drObjectInfo}" target-window="_blank"
description="${uiLabelMap.CommonView}" also-hidden="false"
target-type="content"/>
@@ -196,7 +196,7 @@ under the License.
<field name="drObjectInfo" position="2"
title="${uiLabelMap.CommonImage}"><image style="cssImgLarge"/></field>
<field name="drDataResourceName" position="2"
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
<field name="contentId" position="2"><display/></field>
- <field name="dataResourceId" position="2"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" position="2"><display/></field>
<field name="fromDate" position="2"><display/></field>
<field name="statusId" position="2" title="${uiLabelMap.CommonStatus}">
<display-entity entity-name="StatusItem" key-field-name="statusId"
description="${description}"/>
@@ -250,7 +250,7 @@ under the License.
<field name="drObjectInfo" position="2"
title="${uiLabelMap.CommonImage}"><image style="cssImgLarge"/></field>
<field name="drDataResourceName" position="2"
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
<field name="contentId" position="2"><display/></field>
- <field name="dataResourceId" position="2"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" position="2"><display/></field>
<field name="fromDate" position="2"><display/></field>
<field name="thruDate" position="2"><display/></field>
<field name="statusId" position="2" title="${uiLabelMap.CommonStatus}">
@@ -665,7 +665,7 @@ under the License.
<hyperlink also-hidden="false" target-type="plain"
description="${drDataResourceName}"
target="javascript:set_value('${contentId}')"/>
</field>
<field name="contentId"><display/></field>
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="fromDate"><display/></field>
<field name="statusId" title="${uiLabelMap.CommonStatus}">
<display-entity entity-name="StatusItem" key-field-name="statusId"
description="${description}"/>
@@ -714,7 +714,7 @@ under the License.
<field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image
style="cssImgLarge"/></field>
<field name="drDataResourceName"
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
<field name="contentId"><display/></field>
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="statusId" title="${uiLabelMap.CommonStatus}">
<display-entity entity-name="StatusItem" key-field-name="statusId"
description="${description}"/>
</field>
@@ -819,7 +819,7 @@ under the License.
<hyperlink also-hidden="false" target-type="plain"
description="${drDataResourceName}"
target="javascript:set_value('${contentId}')"/>
</field>
<field name="contentId"><display/></field>
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="createdDate"><display/></field>
<!--<field name="deleteButton" title="${uiLabelMap.CommonDelete}"
widget-style="buttontext">
<hyperlink target="deleteImageFrame" target-window="_blank"
description="${uiLabelMap.CommonDelete}" also-hidden="false">
Modified:
ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ContentForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ContentForms.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
---
ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ContentForms.xml
(original)
+++
ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ContentForms.xml
Sun Dec 21 06:35:40 2014
@@ -37,7 +37,7 @@ under the License.
</hyperlink>
</field>
<field name="contentId"><display/></field>
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="contentName"><display/></field>
</form>
</forms>
Modified:
ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ForumForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ForumForms.xml?rev=1647094&r1=1647093&r2=1647094&view=diff
==============================================================================
--- ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ForumForms.xml
(original)
+++ ofbiz/branches/release13.07/specialpurpose/ecommerce/widget/ForumForms.xml
Sun Dec 21 06:35:40 2014
@@ -43,7 +43,7 @@ under the License.
<field name="imageData" >
<file />
</field>
- <field name="dataResourceId" >
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" >
<drop-down allow-empty="false"
no-current-selected-key="TEMPLATE_TEXT_ONLY">
<option key="TEMPLATE_TEXT_ONLY"
description="${uiLabelMap.EcommerceTextOnly}"/>
<option key="TEMPLATE_IMAGE_CENTERED"
description="${uiLabelMap.EcommerceImageCenteredAbove}"/>
@@ -150,7 +150,7 @@ under the License.
<field name="summaryData" >
<ignored/>
</field>
- <field name="dataResourceId" >
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" >
<display />
</field>
<field name="ftlContentId" position="1">
@@ -179,7 +179,7 @@ under the License.
<field name="caContentAssocTypeId"
title="${uiLabelMap.FormFieldTitle_contentAssocTypeId}" ><text-find/></field>
<field name="caFromDate" title="${uiLabelMap.CommonFromDate}"
><date-find/></field>
<field name="contentId"><text-find/></field>
- <field name="dataResourceId"><text-find/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><text-find/></field>
<field name="contentName"><text-find/></field>
<field name="submitButton" title="${uiLabelMap.CommonFind}"
widget-style="smallSubmit"><submit button-type="button"/></field>
<!--
@@ -216,7 +216,7 @@ under the License.
<field name="caFromDate" title="From Date" ><display/></field>
-->
<field name="contentId"><display/></field>
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="contentName"><display/></field>
</form>
@@ -225,7 +225,7 @@ under the License.
<field name="imageData" >
<file />
</field>
- <field name="dataResourceId" >
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" >
<drop-down allow-empty="false"
no-current-selected-key="TEMPLATE_TEXT_ONLY">
<option key="TEMPLATE_TEXT_ONLY"
description="${uiLabelMap.EcommerceTextOnly}"/>
<option key="TEMPLATE_IMAGE_CENTERED"
description="${uiLabelMap.EcommerceImageCenteredAbove}"/>
@@ -337,7 +337,7 @@ under the License.
<entity-options description="${description}"
entity-name="ContentType" key-field-name="contentTypeId"/>
</drop-down>
</field>
- <field name="dataResourceId">
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}">
<drop-down allow-empty="false"
no-current-selected-key="TEMPLATE_TEXT_ONLY">
<option key="TEMPLATE_TEXT_ONLY"
description="${uiLabelMap.EcommerceTextOnly}"/>
<option key="TEMPLATE_IMAGE_CENTERED"
description="${uiLabelMap.EcommerceImageCenteredAbove}"/>
@@ -386,7 +386,7 @@ under the License.
<form name="DataResourceMaster" target="createDataResource" title=""
type="single" default-map-name="currentValue"
default-title-style="tableheadtext" default-widget-style="inputBox">
<auto-fields-entity entity-name="DataResource"
default-field-type="edit"/>
- <field name="dataResourceId"></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"></field>
<field name="dataResourceTypeId">
<drop-down allow-empty="true">
<entity-options description="${description}"
entity-name="DataResourceType" key-field-name="dataResourceTypeId"/>
@@ -429,7 +429,7 @@ under the License.
</form>
<form name="EditDataResourceText" target="updateDataResourceText" title=""
type="single" extends="DataResourceMaster"
default-title-style="tableheadtext" default-widget-style="inputBox">
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="dataResourceTypeId"><hidden
value="ELECTRONIC_TEXT"/></field>
<field name="dataResourceTypeIdDisplay"
title="${uiLabelMap.CommonType}" field-name="dataResourceTypeId" >
<display description="ELECTRONIC_TEXT" also-hidden="false"/>
@@ -439,7 +439,7 @@ under the License.
</form>
<form name="ImageUpload" target="uploadImage" title="" type="upload"
default-title-style="tableheadtext" default-widget-style="inputBox">
- <field name="dataResourceId" >
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" >
<display description="${currentValue.dataResourceId}"/>
</field>
<field name="objectInfo" title="${uiLabelMap.EcommerceImageFileName}">
@@ -457,7 +457,7 @@ under the License.
<field name="imageData" >
<file />
</field>
- <field name="dataResourceId" >
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" >
<drop-down allow-empty="false"
no-current-selected-key="TEMPLATE_TEXT_ONLY">
<option key="TEMPLATE_TEXT_ONLY"
description="${uiLabelMap.EcommerceTextOnly}"/>
<option key="TEMPLATE_IMAGE_CENTERED"
description="${uiLabelMap.EcommerceImageCenteredAbove}"/>