Author: jleroux
Date: Sat Aug 29 15:02:39 2009 New Revision: 809142 URL: http://svn.apache.org/viewvc?rev=809142&view=rev Log: "Applied fix from trunk for revision: 808786 " ------------------------------------------------------------------------ r808786 | jleroux | 2009-08-28 09:21:52 +0200 (ven. 28 ao–t 2009) | 14 lignes Fix a bug reported by J n Valkovic on user ML about about service CreateLead informations in Webtools (actions is not the same as actionsAndSet) in Webtools, in the ECA section of services info, the I have added a column for fields set. In availableservices.ftl, I have also replaced <td><b>${uiLabelMap.WebtoolsIsService}</b> ${condition.isService?default(uiLabelMap.CommonNA)}</td> by <#if condition.isService?has_content> <td><b>${uiLabelMap.WebtoolsIsService}</b> ${condition.isService}</td> <td colspan="2"> </td> </#if> I think we don't need to show informations (actually always NA) about attributes not used. But as I was not sure everybody would agree, I only did this one as an example. So What do you think, should we do it for all occurrences ? ------------------------------------------------------------------------ Modified: ofbiz/branches/release09.04/ (props changed) ofbiz/branches/release09.04/framework/webtools/config/WebtoolsUiLabels.xml ofbiz/branches/release09.04/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy ofbiz/branches/release09.04/framework/webtools/webapp/webtools/service/availableservices.ftl Propchange: ofbiz/branches/release09.04/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Aug 29 15:02:39 2009 @@ -1 +1 @@ -/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099,767102,767123,767125,767127,767279,767287,767671,767688,767694,767822,767845,768358,768490,768550,768675,768686,768705,768811,768815,768960,769030,769500,770272,770997,771073,772401,772464-772465,773076,773557,773628,773659,773697,774014,774632,774661,774995,775292,775667,776227,776594,776620,776922,777004,777020,777768,777792,777893,777947,778078,778094,778107,778278,778280,778364,778374,778402,778576,778594,778628,779020,779477,779496,779639,779834,779856,779866,779873,780111,780138,780180,780199,780203,780906,780945,781201,781534,781549,781669,781680,781694,782663,783257,783266,783833,783913,783917,785123,785764,785967,786778,787126,787435-787436,787442,787520,788965,788983,788987,789329,789337,789506,789548,796769,799185,800461,800846,801023,802346,804364,805307,806127,806377,808787,808792 +/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099,767102,767123,767125,767127,767279,767287,767671,767688,767694,767822,767845,768358,768490,768550,768675,768686,768705,768811,768815,768960,769030,769500,770272,770997,771073,772401,772464-772465,773076,773557,773628,773659,773697,774014,774632,774661,774995,775292,775667,776227,776594,776620,776922,777004,777020,777768,777792,777893,777947,778078,778094,778107,778278,778280,778364,778374,778402,778576,778594,778628,779020,779477,779496,779639,779834,779856,779866,779873,780111,780138,780180,780199,780203,780906,780945,781201,781534,781549,781669,781680,781694,782663,783257,783266,783833,783913,783917,785123,785764,785967,786778,787126,787435-787436,787442,787520,788965,788983,788987,789329,789337,789506,789548,796769,799185,800461,800846,801023,802346,804364,805307,806127,806377,808786-808787,808792 Modified: ofbiz/branches/release09.04/framework/webtools/config/WebtoolsUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/webtools/config/WebtoolsUiLabels.xml?rev=809142&r1=809141&r2=809142&view=diff ============================================================================== --- ofbiz/branches/release09.04/framework/webtools/config/WebtoolsUiLabels.xml (original) +++ ofbiz/branches/release09.04/framework/webtools/config/WebtoolsUiLabels.xml Sat Aug 29 15:02:39 2009 @@ -1032,6 +1032,10 @@ <value xml:lang="th">à¹à¸à¸£à¸·à¹à¸à¸à¸¡à¸·à¸ Entity XML </value> <value xml:lang="zh">å®ä½XMLå·¥å ·</value> </property> + <property key="WebtoolsEnvName"> + <value xml:lang="en">Env Name</value> + <value xml:lang="fr">Nom de var. d'env.</value> + </property> <property key="WebtoolsErrorLogLevel"> <value xml:lang="en">Error</value> <value xml:lang="fr">Erreur</value> @@ -1331,7 +1335,7 @@ </property> <property key="WebtoolsInParameters"> <value xml:lang="en">In parameters</value> - <value xml:lang="fr">Dans les paramètres</value> + <value xml:lang="fr">Paramètres en entrée</value> <value xml:lang="it">Parametri in Ingresso</value> <value xml:lang="ro">Parametri de Intrare</value> <value xml:lang="th">à¸à¹à¸²à¸à¸±à¸§à¹à¸à¸£</value> @@ -2524,6 +2528,10 @@ <value xml:lang="th">รายà¸à¸²à¸£ Services สำหรัà¸</value> <value xml:lang="zh">æå¡å表ï¼</value> </property> + <property key="WebtoolsSet"> + <value xml:lang="en">Set</value> + <value xml:lang="fr">Affectation</value> + </property> <property key="WebtoolsShowShowWSDL"> <value xml:lang="en">Show wsdl</value> <value xml:lang="fr">Montrer WSDL</value> Modified: ofbiz/branches/release09.04/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy?rev=809142&r1=809141&r2=809142&view=diff ============================================================================== --- ofbiz/branches/release09.04/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy (original) +++ ofbiz/branches/release09.04/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy Sat Aug 29 15:02:39 2009 @@ -77,96 +77,141 @@ actions.setAccessible(true); actionsVal = actions.get(curRule); if (actionsVal) { - actionsList = new ArrayList(actionsVal.size()); + actionsList = new ArrayList(); + setsList = new ArrayList(); actionsVal.each { curAction -> - actionMap = [:]; actionClass = curAction.getClass(); + if (org.ofbiz.service.eca.ServiceEcaAction.equals(actionClass)) { + actionMap = [:]; - //eventName - eventName = actionClass.getDeclaredField("eventName"); - eventName.setAccessible(true); - eventNameVal = eventName.get(curAction); - if (eventNameVal) { - actionMap.eventName = eventNameVal as String; - } - eventName.setAccessible(false); - - //ignoreError - ignoreError = actionClass.getDeclaredField("ignoreError"); - ignoreError.setAccessible(true); - ignoreErrorVal = ignoreError.get(curAction); - if (ignoreErrorVal) { - actionMap.ignoreError = ignoreErrorVal as String; - } - ignoreError.setAccessible(false); - - //ignoreFailure - ignoreFailure = actionClass.getDeclaredField("ignoreFailure"); - ignoreFailure.setAccessible(true); - ignoreFailureVal = ignoreFailure.get(curAction); - if (ignoreFailureVal) { - actionMap.ignoreFailure = ignoreFailureVal as String; - } - ignoreFailure.setAccessible(false); - - //persist - persist = actionClass.getDeclaredField("persist"); - persist.setAccessible(true); - persistVal = persist.get(curAction); - if (persistVal) { - actionMap.persist = persistVal as String; - } - persist.setAccessible(false); - - //resultMapName - resultMapName = actionClass.getDeclaredField("resultMapName"); - resultMapName.setAccessible(true); - resultMapNameVal = resultMapName.get(curAction); - if (resultMapNameVal) { - actionMap.resultMapName = resultMapNameVal as String; - } - resultMapName.setAccessible(false); - - //resultToContext - resultToContext = actionClass.getDeclaredField("resultToContext"); - resultToContext.setAccessible(true); - resultToContextVal = resultToContext.get(curAction); - if (resultToContextVal) { - actionMap.resultToContext = resultToContextVal as String; - } - resultToContext.setAccessible(false); - - //resultToResult - resultToResult = actionClass.getDeclaredField("resultToResult"); - resultToResult.setAccessible(true); - resultToResultVal = resultToResult.get(curAction); - if (resultToResultVal) { - actionMap.resultToResult = resultToResultVal as String; - } - resultToResult.setAccessible(false); - - //serviceMode - serviceMode = actionClass.getDeclaredField("serviceMode"); - serviceMode.setAccessible(true); - serviceModeVal = serviceMode.get(curAction); - if (serviceModeVal) { - actionMap.serviceMode = serviceModeVal as String; - } - serviceMode.setAccessible(false); - - //serviceName - serviceName = actionClass.getDeclaredField("serviceName"); - serviceName.setAccessible(true); - serviceNameVal = serviceName.get(curAction); - if (serviceNameVal) { - actionMap.serviceName = serviceNameVal as String; - } - serviceName.setAccessible(false); + //eventName + eventName = actionClass.getDeclaredField("eventName"); + eventName.setAccessible(true); + eventNameVal = eventName.get(curAction); + if (eventNameVal) { + actionMap.eventName = eventNameVal as String; + } + eventName.setAccessible(false); + + //ignoreError + ignoreError = actionClass.getDeclaredField("ignoreError"); + ignoreError.setAccessible(true); + ignoreErrorVal = ignoreError.get(curAction); + if (ignoreErrorVal) { + actionMap.ignoreError = ignoreErrorVal as String; + } + ignoreError.setAccessible(false); + + //ignoreFailure + ignoreFailure = actionClass.getDeclaredField("ignoreFailure"); + ignoreFailure.setAccessible(true); + ignoreFailureVal = ignoreFailure.get(curAction); + if (ignoreFailureVal) { + actionMap.ignoreFailure = ignoreFailureVal as String; + } + ignoreFailure.setAccessible(false); + + //persist + persist = actionClass.getDeclaredField("persist"); + persist.setAccessible(true); + persistVal = persist.get(curAction); + if (persistVal) { + actionMap.persist = persistVal as String; + } + persist.setAccessible(false); + + //resultMapName + resultMapName = actionClass.getDeclaredField("resultMapName"); + resultMapName.setAccessible(true); + resultMapNameVal = resultMapName.get(curAction); + if (resultMapNameVal) { + actionMap.resultMapName = resultMapNameVal as String; + } + resultMapName.setAccessible(false); + + //resultToContext + resultToContext = actionClass.getDeclaredField("resultToContext"); + resultToContext.setAccessible(true); + resultToContextVal = resultToContext.get(curAction); + if (resultToContextVal) { + actionMap.resultToContext = resultToContextVal as String; + } + resultToContext.setAccessible(false); + + //resultToResult + resultToResult = actionClass.getDeclaredField("resultToResult"); + resultToResult.setAccessible(true); + resultToResultVal = resultToResult.get(curAction); + if (resultToResultVal) { + actionMap.resultToResult = resultToResultVal as String; + } + resultToResult.setAccessible(false); + + //serviceMode + serviceMode = actionClass.getDeclaredField("serviceMode"); + serviceMode.setAccessible(true); + serviceModeVal = serviceMode.get(curAction); + if (serviceModeVal) { + actionMap.serviceMode = serviceModeVal as String; + } + serviceMode.setAccessible(false); + + //serviceName + serviceName = actionClass.getDeclaredField("serviceName"); + serviceName.setAccessible(true); + serviceNameVal = serviceName.get(curAction); + if (serviceNameVal) { + actionMap.serviceName = serviceNameVal as String; + } + serviceName.setAccessible(false); + + actionsList.add(actionMap); + + } else { // FIXME : we should also show field-names and values for set operation + setMap = [:]; + + // fieldName + fieldName = actionClass.getDeclaredField("fieldName"); + fieldName.setAccessible(true); + fieldNameVal = fieldName.get(curAction); + if (fieldNameVal) { + setMap.fieldName = fieldNameVal as String; + } + fieldName.setAccessible(false); + + // envName + envName = actionClass.getDeclaredField("envName"); + envName.setAccessible(true); + envNameVal = envName.get(curAction); + if (envNameVal) { + setMap.envName = envNameVal as String; + } + envName.setAccessible(false); + + // value + value = actionClass.getDeclaredField("value"); + value.setAccessible(true); + valueVal = value.get(curAction); + if (valueVal) { + setMap.value = valueVal as String; + } + value.setAccessible(false); + + // format + format = actionClass.getDeclaredField("format"); + format.setAccessible(true); + formatVal = format.get(curAction); + if (formatVal) { + setMap.format = formatVal as String; + } + format.setAccessible(false); - actionsList.add(actionMap); + setsList.add(setMap); + } } curRuleMap.actions = actionsList; + curRuleMap.sets= setsList; } actions.setAccessible(true); Modified: ofbiz/branches/release09.04/framework/webtools/webapp/webtools/service/availableservices.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/webtools/webapp/webtools/service/availableservices.ftl?rev=809142&r1=809141&r2=809142&view=diff ============================================================================== --- ofbiz/branches/release09.04/framework/webtools/webapp/webtools/service/availableservices.ftl (original) +++ ofbiz/branches/release09.04/framework/webtools/webapp/webtools/service/availableservices.ftl Sat Aug 29 15:02:39 2009 @@ -151,18 +151,27 @@ <table class="basic-table" cellspacing='0'> <tr class="header-row"> <td>${uiLabelMap.WebtoolsEventName}</td> - <td>${uiLabelMap.WebtoolsRunOnError}</td> - <td>${uiLabelMap.WebtoolsRunOnFailure}</td> + <#if ecaMapList.runOnError?exists> + <td>${uiLabelMap.WebtoolsRunOnError}</td> + </#if> + <#if ecaMapList.runOnFailure?exists> + <td>${uiLabelMap.WebtoolsRunOnFailure}</td> + </#if> <td>${uiLabelMap.WebtoolsActions}</td> <td>${uiLabelMap.WebtoolsConditions}</td> + <td>${uiLabelMap.WebtoolsSet}</td> </tr> <#list ecaMapList as ecaMap> <tr> <td>${ecaMap.eventName?if_exists}</td> - <td>${ecaMap.runOnError?if_exists}</div></td> - <td>${ecaMap.runOnFailure?if_exists}</div></td> - <td> - <#if ecaMap.actions?exists && ecaMap.actions?has_content> + <#if ecaMap.runOnError?exists> + <td>${ecaMap.runOnError}</div></td> + </#if> + <#if ecaMap.runOnFailure?exists> + <td>${ecaMap.runOnFailure}</div></td> + </#if> + <#if ecaMap.actions?has_content> + <td> <#list ecaMap.actions as action> <table class="basic-table" cellspacing='0'> <tr> @@ -186,17 +195,17 @@ </tr> </table> </#list> - </#if> - </td> - <td> - <#if ecaMap.conditions?exists && ecaMap.conditions?has_content> + </td> + </#if> + <#if ecaMap.conditions?has_content> + <td> <#list ecaMap.conditions as condition> <table class='basic-table' cellspacing='0'> <tr> <td><b>${uiLabelMap.WebtoolsCompareType}</b> ${condition.compareType?default(uiLabelMap.CommonNA)}</td> <td> <b>${uiLabelMap.WebtoolsConditionService}</b> - <#if condition.conditionService?exists && condition.conditionService?has_content> + <#if condition.conditionService?has_content> <a href='<@ofbizUrl>${url}?sel_service_name=${condition.conditionService}</@ofbizUrl>'>${condition.conditionService?default(uiLabelMap.CommonNA)}</a> <#else> ${condition.conditionService?default(uiLabelMap.CommonNA)} @@ -205,7 +214,10 @@ <td><b>${uiLabelMap.WebtoolsFormat}</b> ${condition.format?default(uiLabelMap.CommonNA)}</td> </tr> <tr> - <td><b>${uiLabelMap.WebtoolsIsService}</b> ${condition.isService?default(uiLabelMap.CommonNA)}</td> + <#if condition.isService?has_content> + <td><b>${uiLabelMap.WebtoolsIsService}</b> ${condition.isService}</td> + <td colspan="2"> </td> + </#if> <td><b>${uiLabelMap.WebtoolsIsConstant}</b> ${condition.isConstant?default(uiLabelMap.CommonNA)}</td> <td><b>${uiLabelMap.WebtoolsOperator}</b> ${condition.operator?default(uiLabelMap.CommonNA)}</td> </tr> @@ -221,8 +233,38 @@ </tr> </table><br/> </#list> - </#if> - </td> + </td> + </#if> + <#if ecaMap.sets?has_content> + <td> + <#list ecaMap.sets as set> + <table class='basic-table' cellspacing='0'> + <tr> + <td><b>${uiLabelMap.WebtoolsFieldName}</b> ${set.fieldName?default(uiLabelMap.CommonNA)}</td> + <td colspan="2"> </td> + </tr> + <tr> + <#if set.envName?has_content> + <td><b>${uiLabelMap.WebtoolsEnvName}</b> ${set.envName}</td> + <td colspan="2"> </td> + </#if> + </tr> + <tr> + <#if set.value?has_content> + <td><b>${uiLabelMap.CommonValue}</b> ${set.value}</td> + <td colspan="2"> </td> + </#if> + </tr> + <tr> + <#if set.format?has_content> + <td><b>${uiLabelMap.WebtoolsFormat}</b> ${set.format}</td> + <td colspan="2"> </td> + </#if> + </tr> + </table><br/> + </#list> + </td> + </#if> </tr> <tr><td colspan='5'><hr></td></tr> </#list> |
Free forum by Nabble | Edit this page |