Author: adrianc
Date: Sat Feb 16 12:37:20 2013
New Revision: 1446885
URL: http://svn.apache.org/r1446885
Log:
Small improvement to Web Tools services screen: Add service definition location.
Modified:
ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl
Modified: ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml?rev=1446885&r1=1446884&r2=1446885&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml (original)
+++ ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml Sat Feb 16
12:37:20 2013
@@ -1513,6 +1513,9 @@
<value xml:lang="zh">缺çå®ä½åç§°</value>
<value xml:lang="zh_TW">缺ç實é«å稱</value>
</property>
+ <property key="WebtoolsDefinitionLocation">
+ <value xml:lang="en">Definition Location</value>
+ </property>
<property key="WebtoolsDeleteFiles">
<value xml:lang="de">Dateien nachher löschen?</value>
<value xml:lang="en">Delete Files Afterwards?</value>
Modified:
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy?rev=1446885&r1=1446884&r2=1446885&view=diff
==============================================================================
---
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
(original)
+++
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
Sat Feb 16 12:37:20 2013
@@ -349,10 +349,9 @@ if (selectedService) {
curServiceMap.serviceName = selectedService;
curServiceModel = curDispatchContext.getModelService(selectedService);
- curServiceMap.description = curServiceModel.description;
if (curServiceModel != null) {
-
+ curServiceMap.description = curServiceModel.description;
engineName = curServiceModel.engineName ?: "NA";
defaultEntityName = curServiceModel.defaultEntityName ?: "NA";
export = curServiceModel.export ? uiLabelMap.CommonTrue :
uiLabelMap.CommonFalse;
@@ -378,6 +377,7 @@ if (selectedService) {
curServiceMap.defaultEntityName = defaultEntityName;
curServiceMap.invoke = invoke;
curServiceMap.location = location;
+ curServiceMap.definitionLocation =
curServiceModel.definitionLocation.replaceFirst("file:/" +
System.getProperty("ofbiz.home") + "/", "");
curServiceMap.requireNewTransaction = requireNewTransaction;
curServiceMap.export = export;
curServiceMap.exportBool = exportBool;
@@ -539,6 +539,11 @@ if (!selectedService) {
}
}
+ if (canIncludeService &&
constraintName.equals("definitionLocation")) {
+ fullPath = "file:/" + System.getProperty("ofbiz.home") + "/" +
constraintVal;
+ canIncludeService =
curServiceModel.definitionLocation.equals(fullPath);
+ }
+
if (canIncludeService && constraintName.equals("alpha")) {
canIncludeService = (serviceName[0]).equals(constraintVal);
if (constraintVal.equals("NA")) {
@@ -558,6 +563,7 @@ if (!selectedService) {
curServiceMap.defaultEntityName = defaultEntityName;
curServiceMap.invoke = invoke;
curServiceMap.location = location;
+ curServiceMap.definitionLocation =
curServiceModel.definitionLocation.replaceFirst("file:/" +
System.getProperty("ofbiz.home") + "/", "");
curServiceMap.requireNewTransaction = requireNewTransaction;
servicesList.add(curServiceMap);
Modified:
ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl?rev=1446885&r1=1446884&r2=1446885&view=diff
==============================================================================
---
ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl
(original)
+++
ofbiz/trunk/framework/webtools/webapp/webtools/service/availableservices.ftl
Sat Feb 16 12:37:20 2013
@@ -67,13 +67,14 @@ under the License.
<td><a
href='<@ofbizUrl>${url}?constraint=location@${selectedServiceMap.location}</@ofbizUrl>'>${selectedServiceMap.location}</a></td>
</tr>
<tr>
- <td class="label">${uiLabelMap.WebtoolsArtifactInfo}</td>
- <td><a
href='<@ofbizUrl>ArtifactInfo?name=${selectedServiceMap.serviceName}&type=service</@ofbizUrl>'>${uiLabelMap.WebtoolsArtifactInfo}</a></td>
+ <td class="label">${uiLabelMap.WebtoolsDefinitionLocation}</td>
+ <td><a
href='<@ofbizUrl>${url}?constraint=definitionLocation@${selectedServiceMap.definitionLocation}</@ofbizUrl>'>${selectedServiceMap.definitionLocation}</a></td>
<td class="label">${uiLabelMap.WebtoolsDefaultEntityName}</td>
<td><a
href='<@ofbizUrl>${url}?constraint=default_entity_name@${selectedServiceMap.defaultEntityName}</@ofbizUrl>'>${selectedServiceMap.defaultEntityName}</a></td>
</tr>
<tr>
- <td colspan="2"> </td>
+ <td class="label">${uiLabelMap.WebtoolsArtifactInfo}</td>
+ <td><a
href='<@ofbizUrl>ArtifactInfo?name=${selectedServiceMap.serviceName}&type=service</@ofbizUrl>'>${uiLabelMap.WebtoolsArtifactInfo}</a></td>
<td class="label">${uiLabelMap.WebtoolsRequireNewTransaction}</td>
<td>${selectedServiceMap.requireNewTransaction}</td>
</tr>
@@ -375,6 +376,7 @@ under the License.
<td>${uiLabelMap.WebtoolsDefaultEntityName}</td>
<td>${uiLabelMap.WebtoolsInvoke}</td>
<td>${uiLabelMap.WebtoolsLocation}</td>
+ <td>${uiLabelMap.WebtoolsDefinitionLocation}</td>
</tr>
<#assign alt_row = false>
<#list servicesList as service>
@@ -384,6 +386,7 @@ under the License.
<td><a
href='<@ofbizUrl>${url}?constraint=default_entity_name@${service.defaultEntityName?default(uiLabelMap.CommonNA)}</@ofbizUrl>'>${service.defaultEntityName}</a></td>
<td>${service.invoke}</td>
<td><a
href='<@ofbizUrl>${url}?constraint=location@${service.location?default(uiLabelMap.CommonNA)}</@ofbizUrl>'>${service.location}</a></td>
+ <td><a
href='<@ofbizUrl>${url}?constraint=definitionLocation@${service.definitionLocation}</@ofbizUrl>'>${service.definitionLocation}</a></td>
</tr>
<#assign alt_row = !alt_row>
</#list>