Author: jleroux
Date: Sun Dec 21 06:39:40 2014
New Revision: 1647095
URL: http://svn.apache.org/r1647095
Log:
"Applied fix from trunk for revision: 1646984" Conflicts in
DataResourceForms.xml handled by hand
------------------------------------------------------------------------
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/release12.04/ (props changed)
ofbiz/branches/release12.04/applications/content/config/ContentErrorUiLabels.xml
ofbiz/branches/release12.04/applications/content/config/ContentUiLabels.xml
ofbiz/branches/release12.04/applications/content/script/org/ofbiz/content/data/DataServices.xml
ofbiz/branches/release12.04/applications/content/servicedef/services_content.xml
ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/ContentManagementServices.java
ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
ofbiz/branches/release12.04/applications/content/widget/LookupForms.xml
ofbiz/branches/release12.04/applications/content/widget/cms/CMSForms.xml
ofbiz/branches/release12.04/applications/content/widget/content/ContentForms.xml
ofbiz/branches/release12.04/applications/content/widget/content/DataResourceScreens.xml
ofbiz/branches/release12.04/applications/party/widget/partymgr/CommunicationEventForms.xml
ofbiz/branches/release12.04/applications/party/widget/partymgr/PartyForms.xml
ofbiz/branches/release12.04/applications/product/widget/catalog/ImageManagementForms.xml
ofbiz/branches/release12.04/specialpurpose/ebaystore/widget/EbayAccountForms.xml
ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/ContentForms.xml
ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/ForumForms.xml
ofbiz/branches/release12.04/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 21 06:39:40 2014
@@ -3,4 +3,4 @@
/ofbiz/branches/jackrabbit20100709:962442-1231517
/ofbiz/branches/jquery:952958-1044489
/ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:1332097,1333439,1333885,1334201,1334336,1334483,1335047,1335343,1335347,1335351,1335946,1336921,1337046,1337057-1337059,1337202,1337502,1337524,1337644,1337789,1337800,1338065,1338101,1338224,1338570,1338591,1338700,1338831,1338845,1338974,1339081,1339122,1340273,1340352,1340357,1340400,1340405,1340415,1340657,1340661,1340774,1340821,1340826,1340943,1341314,1341399,1342852,1342875,1342893,1342980,1343088,1345473,1345484,1345532,1345547,1345553,1347559,1347762,1351778,1351999,1353135,1353681,1355660,1355801,1355859,1355975,1358735,1359500,1359599-1359600,1360689,1361056,1361073,1361476,1361662,1361931,1361944,1361958,1364046,1364052,1364216,1364218,1366660,1366960,1369555,1369561,1377253,1377382,1377386,1377388,1379334,1379340,1379345,1381146,1384251,1384894,1387878,1387884,1388832,1389802,1392773,1393948,1394995,1395104,1395460,1395953,1396105,1399539,1399761,1400388,1400393,1400421,1402766,1403370,1406727,1407634,1408408,1413307,1421662,1422207,1423117,1425155,1425662,
1426231,1426734,1426787,1430332,1430336,1431191,1432392,1432833,1435528,1435701,1438498,1444356,1446575,1446876,1447107,1451183,1451879,1452382,1458429,1459220,1459222,1460116,1460276,1461551,1462948,1463989,1465351,1470151,1470483,1471283-1471284,1471687,1471739,1476296,1480407,1481287,1484279,1485432,1487130,1487854,1488000,1488127,1488188,1489461,1492112,1492673,1493352,1493393,1493658,1493683,1494202,1494682,1497376,1497822,1497839,1499732,1500760,1500772,1502121,1502944,1502946,1504864,1506269,1506499,1506504,1506828,1509164,1510042,1512376,1512573,1517629,1517702,1517780,1517947,1518336,1518950,1519245,1524361,1524676,1524769,1524950,1525523,1526387,1526463,1527254,1528144,1528146,1528149,1528298,1529412,1529418,1531848,1532342,1532366,1535961,1536656,1537023,1537179,1537996,1538096,1539147,1539156,1543744,1543766,1543781,1544444,1547548,1548143,1550255,1550515,1551744,1552290,1552500,1552901,1552908,1554290,1554536,1554681,1554685,1554706,1554764,1554787,1555142,1557409-15574
10,1557440,1557447,1557457,1557462,1557593,1558373,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,1571219,1573161,1573498,1573639,1574019,1575508,1576259,1576331,1576378,1576506,1576511,1576757,1576839,1577268,1579155,1579161,1579309,1580455,1581386,1581997,1582762,1583040,1583427-1583428,1583551,1583674,1583681,1583689,1583696,1584873,1585033,1585574,1585958-1585959,1586987,1587841,1587843,1588733,1589602,1589606,1589612,1589625,1589669,1592530,1592588,1592745,1592977,1593902,1593908,1593952,1597464,1598544,1598913,1603732,1603739,1604357,1604363,1604522,1604554,1605348,1605354,1605707,1607457,1608355,1608491,1608495,1608698,1609047,1609065,1609076,1609087,1609167,1609184,1609389,1609394,1609406,1609418,1609885,1610355,1610385,1610425,1610685,1610918,1610925,1611321,1612190,1612205,1613121,1614019,1614025,1614355,1614366,16
14556,1615296-1615297,1616684,1616940,1617229,1618354,1618411,1618570,1619098,1622050,1622672,1623370,1627230,1627776,1628096,1629391,1631203,1632733,1632745,1632764,1632797,1632801,1632803,1633100,1636493,1639835,1639840-1639841,1639846,1639863,1639867,1639873,1639884,1639887,1639892,1640288,1640515,1640717,1641066,1641131,1641165,1641548,1641804,1642409,1642423,1643341,1644904,1646204
+/ofbiz/trunk:1332097,1333439,1333885,1334201,1334336,1334483,1335047,1335343,1335347,1335351,1335946,1336921,1337046,1337057-1337059,1337202,1337502,1337524,1337644,1337789,1337800,1338065,1338101,1338224,1338570,1338591,1338700,1338831,1338845,1338974,1339081,1339122,1340273,1340352,1340357,1340400,1340405,1340415,1340657,1340661,1340774,1340821,1340826,1340943,1341314,1341399,1342852,1342875,1342893,1342980,1343088,1345473,1345484,1345532,1345547,1345553,1347559,1347762,1351778,1351999,1353135,1353681,1355660,1355801,1355859,1355975,1358735,1359500,1359599-1359600,1360689,1361056,1361073,1361476,1361662,1361931,1361944,1361958,1364046,1364052,1364216,1364218,1366660,1366960,1369555,1369561,1377253,1377382,1377386,1377388,1379334,1379340,1379345,1381146,1384251,1384894,1387878,1387884,1388832,1389802,1392773,1393948,1394995,1395104,1395460,1395953,1396105,1399539,1399761,1400388,1400393,1400421,1402766,1403370,1406727,1407634,1408408,1413307,1421662,1422207,1423117,1425155,1425662,
1426231,1426734,1426787,1430332,1430336,1431191,1432392,1432833,1435528,1435701,1438498,1444356,1446575,1446876,1447107,1451183,1451879,1452382,1458429,1459220,1459222,1460116,1460276,1461551,1462948,1463989,1465351,1470151,1470483,1471283-1471284,1471687,1471739,1476296,1480407,1481287,1484279,1485432,1487130,1487854,1488000,1488127,1488188,1489461,1492112,1492673,1493352,1493393,1493658,1493683,1494202,1494682,1497376,1497822,1497839,1499732,1500760,1500772,1502121,1502944,1502946,1504864,1506269,1506499,1506504,1506828,1509164,1510042,1512376,1512573,1517629,1517702,1517780,1517947,1518336,1518950,1519245,1524361,1524676,1524769,1524950,1525523,1526387,1526463,1527254,1528144,1528146,1528149,1528298,1529412,1529418,1531848,1532342,1532366,1535961,1536656,1537023,1537179,1537996,1538096,1539147,1539156,1543744,1543766,1543781,1544444,1547548,1548143,1550255,1550515,1551744,1552290,1552500,1552901,1552908,1554290,1554536,1554681,1554685,1554706,1554764,1554787,1555142,1557409-15574
10,1557440,1557447,1557457,1557462,1557593,1558373,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,1571219,1573161,1573498,1573639,1574019,1575508,1576259,1576331,1576378,1576506,1576511,1576757,1576839,1577268,1579155,1579161,1579309,1580455,1581386,1581997,1582762,1583040,1583427-1583428,1583551,1583674,1583681,1583689,1583696,1584873,1585033,1585574,1585958-1585959,1586987,1587841,1587843,1588733,1589602,1589606,1589612,1589625,1589669,1592530,1592588,1592745,1592977,1593902,1593908,1593952,1597464,1598544,1598913,1603732,1603739,1604357,1604363,1604522,1604554,1605348,1605354,1605707,1607457,1608355,1608491,1608495,1608698,1609047,1609065,1609076,1609087,1609167,1609184,1609389,1609394,1609406,1609418,1609885,1610355,1610385,1610425,1610685,1610918,1610925,1611321,1612190,1612205,1613121,1614019,1614025,1614355,1614366,16
14556,1615296-1615297,1616684,1616940,1617229,1618354,1618411,1618570,1619098,1622050,1622672,1623370,1627230,1627776,1628096,1629391,1631203,1632733,1632745,1632764,1632797,1632801,1632803,1633100,1636493,1639835,1639840-1639841,1639846,1639863,1639867,1639873,1639884,1639887,1639892,1640288,1640515,1640717,1641066,1641131,1641165,1641548,1641804,1642409,1642423,1643341,1644904,1646204,1646984
Modified:
ofbiz/branches/release12.04/applications/content/config/ContentErrorUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/config/ContentErrorUiLabels.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/content/config/ContentErrorUiLabels.xml
(original)
+++
ofbiz/branches/release12.04/applications/content/config/ContentErrorUiLabels.xml
Sun Dec 21 06:39:40 2014
@@ -281,4 +281,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/release12.04/applications/content/config/ContentUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/config/ContentUiLabels.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/content/config/ContentUiLabels.xml
(original)
+++ ofbiz/branches/release12.04/applications/content/config/ContentUiLabels.xml
Sun Dec 21 06:39:40 2014
@@ -860,6 +860,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>
@@ -1031,6 +1035,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>
@@ -6399,8 +6407,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="pt">Enviar imagem</value>
<value xml:lang="ro">Incarca Imagine</value>
Modified:
ofbiz/branches/release12.04/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/content/script/org/ofbiz/content/data/DataServices.xml
(original)
+++
ofbiz/branches/release12.04/applications/content/script/org/ofbiz/content/data/DataServices.xml
Sun Dec 21 06:39: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">
@@ -737,7 +769,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"/>
@@ -807,7 +839,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"/>
@@ -1057,5 +1089,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/release12.04/applications/content/servicedef/services_content.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/servicedef/services_content.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/content/servicedef/services_content.xml
(original)
+++
ofbiz/branches/release12.04/applications/content/servicedef/services_content.xml
Sun Dec 21 06:39: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/release12.04/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/ContentManagementServices.java
(original)
+++
ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/ContentManagementServices.java
Sun Dec 21 06:39:40 2014
@@ -172,7 +172,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
@@ -664,7 +663,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)) {
@@ -677,29 +676,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);
@@ -723,46 +700,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)) {
@@ -783,6 +733,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/release12.04/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
(original)
+++
ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
Sun Dec 21 06:39: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;
@@ -926,14 +926,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)) {
@@ -942,7 +942,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/release12.04/applications/content/widget/LookupForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/widget/LookupForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/content/widget/LookupForms.xml
(original)
+++ ofbiz/branches/release12.04/applications/content/widget/LookupForms.xml Sun
Dec 21 06:39: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/release12.04/applications/content/widget/cms/CMSForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/widget/cms/CMSForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/content/widget/cms/CMSForms.xml
(original)
+++ ofbiz/branches/release12.04/applications/content/widget/cms/CMSForms.xml
Sun Dec 21 06:39: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}"/>
@@ -526,7 +526,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/release12.04/applications/content/widget/content/ContentForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/widget/content/ContentForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/content/widget/content/ContentForms.xml
(original)
+++
ofbiz/branches/release12.04/applications/content/widget/content/ContentForms.xml
Sun Dec 21 06:39: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/release12.04/applications/content/widget/content/DataResourceScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/widget/content/DataResourceScreens.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/content/widget/content/DataResourceScreens.xml
(original)
+++
ofbiz/branches/release12.04/applications/content/widget/content/DataResourceScreens.xml
Sun Dec 21 06:39: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/release12.04/applications/party/widget/partymgr/CommunicationEventForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/party/widget/partymgr/CommunicationEventForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/party/widget/partymgr/CommunicationEventForms.xml
(original)
+++
ofbiz/branches/release12.04/applications/party/widget/partymgr/CommunicationEventForms.xml
Sun Dec 21 06:39: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/release12.04/applications/party/widget/partymgr/PartyForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/party/widget/partymgr/PartyForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/party/widget/partymgr/PartyForms.xml
(original)
+++
ofbiz/branches/release12.04/applications/party/widget/partymgr/PartyForms.xml
Sun Dec 21 06:39:40 2014
@@ -581,7 +581,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/release12.04/applications/product/widget/catalog/ImageManagementForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/widget/catalog/ImageManagementForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/product/widget/catalog/ImageManagementForms.xml
(original)
+++
ofbiz/branches/release12.04/applications/product/widget/catalog/ImageManagementForms.xml
Sun Dec 21 06:39: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/release12.04/specialpurpose/ebaystore/widget/EbayAccountForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/ebaystore/widget/EbayAccountForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/specialpurpose/ebaystore/widget/EbayAccountForms.xml
(original)
+++
ofbiz/branches/release12.04/specialpurpose/ebaystore/widget/EbayAccountForms.xml
Sun Dec 21 06:39:40 2014
@@ -55,7 +55,7 @@ under the License.
<form name="RecentFeedback" type="list" list-name="recentFeedbackList"
odd-row-style="alternate-row" header-row-style="header-row-2"
default-table-style="basic-table hover-bar">
<field name="contentId" title="Feedback Id"><display/></field>
- <field name="dataResourceId" title="Comment Text">
+ <field name="dataResourceId"
title="${uiLabelMap.ContentDataResourceId}" title="Comment Text">
<display-entity entity-name="ElectronicText"
key-field-name="dataResourceId" description="${textData}"/>
</field>
<field name="commentator" title="Commentator"><display/></field>
Modified:
ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/ContentForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/ContentForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/ContentForms.xml
(original)
+++
ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/ContentForms.xml
Sun Dec 21 06:39: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/release12.04/specialpurpose/ecommerce/widget/ForumForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/ForumForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
--- ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/ForumForms.xml
(original)
+++ ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/ForumForms.xml
Sun Dec 21 06:39: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-tooltip-style="tabletext"
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-tooltip-style="tabletext"
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-tooltip-style="tabletext"
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}"/>
Modified:
ofbiz/branches/release12.04/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=1647095&r1=1647094&r2=1647095&view=diff
==============================================================================
---
ofbiz/branches/release12.04/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
(original)
+++
ofbiz/branches/release12.04/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
Sun Dec 21 06:39:40 2014
@@ -923,7 +923,7 @@
</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" use-when="workEffortContent!=null">
<drop-down allow-empty="false" no-current-selected-key="DOCUMENT">