Author: sichen
Date: Wed Feb 14 07:12:32 2007 New Revision: 507567 URL: http://svn.apache.org/viewvc?view=rev&rev=507567 Log: Applied patch from Andrew Sykes to run services synchronously in webtools (OFBIZ-677) Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/serviceResult.bsh (with props) ofbiz/trunk/framework/webtools/webapp/webtools/service/serviceResult.ftl (with props) Modified: ofbiz/trunk/framework/webapp/config/WebappUiLabels.properties ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/scheduleJob.bsh ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml ofbiz/trunk/framework/webtools/webapp/webtools/service/setServiceParameter.ftl ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml Modified: ofbiz/trunk/framework/webapp/config/WebappUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/config/WebappUiLabels.properties?view=diff&rev=507567&r1=507566&r2=507567 ============================================================================== --- ofbiz/trunk/framework/webapp/config/WebappUiLabels.properties (original) +++ ofbiz/trunk/framework/webapp/config/WebappUiLabels.properties Wed Feb 14 07:12:32 2007 @@ -39,8 +39,9 @@ coreEvents.service_time_already_passed=SERVICE_TIME has already passed coreEvents.invalid_format_interval=Invalid format for SERVICE_INTERVAL coreEvents.invalid_format_count=Invalid format for SERVICE_COUNT -coreEvents.invalid_format_frequency=Invalid format for SERIVCE_FREQUENCY +coreEvents.invalid_format_frequency=Invalid format for SERVICE_FREQUENCY coreEvents.service_dispatcher_exception=Service dispatcher threw an exception +coreEvents.no_fields_in_session=No previous fields found in session coreEvents.service_scheduled=Service has been scheduled coreEvents.must_specify_service_name=You must specify a 'serviceName', and optionally a 'mode' (sync or async, defaults to sync) coreEvents.service_eventhandler_exception=ServiceEventHandler threw an exception Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java?view=diff&rev=507567&r1=507566&r2=507567 ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java Wed Feb 14 07:12:32 2007 @@ -23,13 +23,20 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.sql.Timestamp; +import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Set; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import javolution.util.FastMap; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; @@ -37,6 +44,7 @@ import org.ofbiz.base.util.UtilValidate; import org.ofbiz.webapp.control.RequestHandler; import org.ofbiz.entity.GenericDelegator; +import org.ofbiz.entity.GenericEntity; import org.ofbiz.entity.GenericValue; import org.ofbiz.security.Security; import org.ofbiz.service.DispatchContext; @@ -397,19 +405,106 @@ request.setAttribute("_ERROR_MESSAGE_", errorBuf.toString()); return "error"; } - + + Map syncServiceResult = null; // schedule service try { - dispatcher.schedule(jobName, poolName, serviceName, serviceContext, startTime, frequency, interval, count, endTime, maxRetry); + if(null!=request.getParameter("_RUN_SYNC_") && request.getParameter("_RUN_SYNC_").equals("Y")){ + syncServiceResult = dispatcher.runSync(serviceName, serviceContext); + }else{ + dispatcher.schedule(jobName, poolName, serviceName, serviceContext, startTime, frequency, interval, count, endTime, maxRetry); + } } catch (GenericServiceException e) { String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.service_dispatcher_exception", locale); request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg + e.getMessage()); return "error"; } - + String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.service_scheduled", locale); request.setAttribute("_EVENT_MESSAGE_", errMsg); + if(null!=syncServiceResult){ + request.getSession().setAttribute("_RUN_SYNC_RESULT_", syncServiceResult); + return "sync_success"; + } return "success"; + } + + public static String saveServiceResultsToSession(HttpServletRequest request, HttpServletResponse response) { + HttpSession session = request.getSession(); + Locale locale = UtilHttp.getLocale(request); + Map syncServiceResult = (Map)session.getAttribute("_RUN_SYNC_RESULT_"); + if(null==syncServiceResult){ + String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.no_fields_in_session", locale); + request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg); + return "error"; + } + + if(null!=request.getParameter("_CLEAR_PREVIOUS_PARAMS_") && request.getParameter("_CLEAR_PREVIOUS_PARAMS_").equalsIgnoreCase("on")) + session.removeAttribute("_SAVED_SYNC_RESULT_"); + + Map serviceFieldsToSave = request.getParameterMap(); + Map savedFields = FastMap.newInstance(); + Set keys = serviceFieldsToSave.keySet(); + Iterator keysItr = keys.iterator(); + + while(keysItr.hasNext()){ + String key = (String)keysItr.next(); + if(null!=serviceFieldsToSave.get(key) && request.getParameter(key).equalsIgnoreCase("on") && !key.equals("_CLEAR_PREVIOUS_PARAMS_")){ + String[] servicePath = key.split("\\|\\|"); + String partialKey = servicePath[servicePath.length-1]; + savedFields.put(partialKey, getObjectFromServicePath(key ,syncServiceResult)); + } + } + if(null!=session.getAttribute("_SAVED_SYNC_RESULT_")){ + Map savedSyncResult = (Map)session.getAttribute("_SAVED_SYNC_RESULT_"); + savedSyncResult.putAll(savedFields); + savedFields = savedSyncResult; + } + session.setAttribute("_SAVED_SYNC_RESULT_", savedFields); + return "success"; + } + + //Tries to return a map, if Object is one of HashMap, GenericEntity, List + public static Object getObjectFromServicePath(String servicePath, Map serviceResult){ + String[] sp = servicePath.split("\\|\\|"); + Object servicePathObject = null; + Map servicePathMap = null; + for(int i=0;i<sp.length;i++){ + String servicePathEntry = sp[i]; + if(null==servicePathMap){ + servicePathObject = serviceResult.get(servicePathEntry); + }else{ + servicePathObject = servicePathMap.get(servicePathEntry); + } + servicePathMap = null; + + if(servicePathObject instanceof HashMap){ + servicePathMap = (HashMap)servicePathObject; + }else if(servicePathObject instanceof GenericEntity){ + GenericEntity servicePathEntity = (GenericEntity)servicePathObject; + Set servicePathEntitySet = servicePathEntity.keySet(); + Iterator spesItr = servicePathEntitySet.iterator(); + servicePathMap = FastMap.newInstance(); + while(spesItr.hasNext()){ + String spesKey = (String)spesItr.next(); + servicePathMap.put(spesKey, servicePathEntity.get(spesKey)); + } + }else if(servicePathObject instanceof Collection){ + Collection servicePathColl = (Collection)servicePathObject; + Iterator splItr = servicePathColl.iterator(); + int count=0; + servicePathMap = FastMap.newInstance(); + while(splItr.hasNext()){ + servicePathMap.put("_"+count+"_", splItr.next()); + count++; + } + } + } + if(null==servicePathMap){ + return servicePathObject; + }else{ + return servicePathMap; + } } public static ServiceEventHandler seh = new ServiceEventHandler(); Modified: ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties?view=diff&rev=507567&r1=507566&r2=507567 ============================================================================== --- ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties (original) +++ ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties Wed Feb 14 07:12:32 2007 @@ -37,6 +37,7 @@ PageTitleLogView=Log View PageTitleJobList=Job List PageTitleScheduleJob=Schedule Job +PageTitleRunService=Run Service PageTitleServiceList=Service List PageTitleThreadList=Thread List Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/scheduleJob.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/scheduleJob.bsh?view=diff&rev=507567&r1=507566&r2=507567 ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/scheduleJob.bsh (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/scheduleJob.bsh Wed Feb 14 07:12:32 2007 @@ -24,6 +24,7 @@ import java.util.Map; import java.sql.Timestamp; +import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.service.ServiceDispatcher; @@ -34,6 +35,11 @@ import org.ofbiz.service.engine.GenericEngine; import org.ofbiz.service.config.ServiceConfigUtil; +Map savedSyncResult = null; +if( null!=session.getAttribute("_SAVED_SYNC_RESULT_") ){ + savedSyncResult = (Map)session.getAttribute("_SAVED_SYNC_RESULT_"); +} + String serviceName = request.getParameter("SERVICE_NAME"); context.put("POOL_NAME", ServiceConfigUtil.getSendPool()); @@ -63,7 +69,13 @@ if (par.internal) { continue; } - serviceParameters.add(UtilMisc.toMap("name", par.name, "type", par.type, "optional", (par.optional? "Y": "N"))); + Map serviceParam = null; + if(null!=savedSyncResult && null!=savedSyncResult.get(par.name)){ + serviceParam = UtilMisc.toMap("name", par.name, "type", par.type, "optional", (par.optional? "Y": "N"), "value", savedSyncResult.get(par.name).toString()); + }else{ + serviceParam = UtilMisc.toMap("name", par.name, "type", par.type, "optional", (par.optional? "Y": "N")); + } + serviceParameters.add(serviceParam); } } } Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/serviceResult.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/serviceResult.bsh?view=auto&rev=507567 ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/serviceResult.bsh (added) +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/serviceResult.bsh Wed Feb 14 07:12:32 2007 @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.Map; +import java.util.Set; +import java.sql.Timestamp; + +import org.ofbiz.entity.GenericEntity; +import org.ofbiz.base.util.UtilMisc; +import org.ofbiz.base.util.Debug; +import org.ofbiz.webapp.event.CoreEvents; + +import javolution.util.FastList; +import javolution.util.FastMap; + +if(null!=session.getAttribute("_RUN_SYNC_RESULT_")){ + List serviceResultList = FastList.newInstance(); + Map serviceResult = (Map)session.getAttribute("_RUN_SYNC_RESULT_"); + + if(request.getParameter("servicePath")!=null && !request.getParameter("servicePath").equals("")){ + String servicePath = request.getParameter("servicePath"); + newServiceResult = CoreEvents.getObjectFromServicePath(servicePath, serviceResult); + if(null!=newServiceResult && newServiceResult instanceof Map) + serviceResult = newServiceResult; + context.put("servicePath", servicePath); + } + + Set serviceResultSet = serviceResult.keySet(); + Iterator serviceResultItr = serviceResultSet.iterator(); + while(serviceResultItr.hasNext()){ + String key = serviceResultItr.next(); + Map valueMap = UtilMisc.toMap("key", key, "value", (null==serviceResult.get(key))?"null":serviceResult.get(key).toString()); + if(serviceResult.get(key) instanceof GenericEntity || + serviceResult.get(key) instanceof HashMap || + serviceResult.get(key) instanceof Collection){ + valueMap.put("hasChild", "Y"); + }else{ + valueMap.put("hasChild", "N"); + } + serviceResultList.add(valueMap); + } + + context.put("serviceResultList", serviceResultList); +} + + Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/serviceResult.bsh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/serviceResult.bsh ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/serviceResult.bsh ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?view=diff&rev=507567&r1=507566&r2=507567 ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Wed Feb 14 07:12:32 2007 @@ -326,16 +326,35 @@ <security https="true" auth="true"/> <response name="success" type="view" value="scheduleJob"/> </request-map> + <request-map uri="runService"> + <security https="true" auth="true"/> + <response name="success" type="view" value="runService"/> + </request-map> <request-map uri="setServiceParameters"> <security https="true" auth="true"/> <response name="success" type="view" value="setServiceParameters"/> </request-map> + <request-map uri="setSyncServiceParameters"> + <security https="true" auth="true"/> + <response name="success" type="view" value="setSyncServiceParameters"/> + </request-map> <request-map uri="scheduleService"> <security https="true" auth="true"/> <event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="scheduleService"/> <response name="success" type="view" value="jobList"/> + <response name="sync_success" type="view" value="serviceResult"/> <response name="error" type="view" value="scheduleJob"/> </request-map> + <request-map uri="serviceResult"> + <security https="true" auth="true"/> + <response name="success" type="view" value="serviceResult"/> + </request-map> + <request-map uri="saveServiceResultsToSession"> + <security https="true" auth="true"/> + <event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="saveServiceResultsToSession"/> + <response name="success" type="view" value="runService"/> + <response name="error" type="view" value="error"/> + </request-map> <!-- Available services requests --> <request-map uri="availableServices"> @@ -540,9 +559,12 @@ <view-map name="serviceList" type="screen" page="component://webtools/widget/ServiceScreens.xml#ServiceList"/> <view-map name="jobList" type="screen" page="component://webtools/widget/ServiceScreens.xml#JobList"/> + <view-map name="serviceResult" type="screen" page="component://webtools/widget/ServiceScreens.xml#ServiceResult"/> <view-map name="threadList" type="screen" page="component://webtools/widget/ServiceScreens.xml#ThreadList"/> <view-map name="scheduleJob" type="screen" page="component://webtools/widget/ServiceScreens.xml#ScheduleJob"/> + <view-map name="runService" type="screen" page="component://webtools/widget/ServiceScreens.xml#RunService"/> <view-map name="setServiceParameters" type="screen" page="component://webtools/widget/ServiceScreens.xml#setServiceParameters"/> + <view-map name="setSyncServiceParameters" type="screen" page="component://webtools/widget/ServiceScreens.xml#setSyncServiceParameters"/> <view-map name="availableServices" type="screen" page="component://webtools/widget/AvailableServicesScreens.xml#AvailableServicesList"/> <view-map name="serviceEcaDetail" type="screen" page="component://webtools/widget/AvailableServicesScreens.xml#ServiceEcaDetail"/> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl?view=diff&rev=507567&r1=507566&r2=507567 ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl Wed Feb 14 07:12:32 2007 @@ -89,6 +89,7 @@ <ul> <li><a href="<@ofbizUrl>/availableServices</@ofbizUrl>" class="linktext">${uiLabelMap.WebtoolsServiceReference}</a> <li><a href="<@ofbizUrl>/scheduleJob</@ofbizUrl>" class="linktext">${uiLabelMap.PageTitleScheduleJob}</a> + <li><a href="<@ofbizUrl>/runService</@ofbizUrl>" class="linktext">${uiLabelMap.PageTitleRunService}</a> <li><a href="<@ofbizUrl>/jobList</@ofbizUrl>" class="linktext">${uiLabelMap.PageTitleJobList}</a> <li><a href="<@ofbizUrl>/threadList</@ofbizUrl>" class="linktext">${uiLabelMap.PageTitleThreadList}</a> <li><a href="<@ofbizUrl>/serviceList</@ofbizUrl>" class="linktext">${uiLabelMap.WebtoolsServiceLog}</a> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml?view=diff&rev=507567&r1=507566&r2=507567 ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml Wed Feb 14 07:12:32 2007 @@ -44,4 +44,11 @@ <field name="SERVICE_MAXRETRY" title="${uiLabelMap.WebtoolsMaxRetry}" tooltip="${uiLabelMap.WebtoolsMessage10}"><text/></field> <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> + + <form name="runService" type="single" target="setSyncServiceParameters" title="" default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext"> + <field name="SERVICE_NAME" title="${uiLabelMap.WebtoolsService}"><text/></field> + <field name="POOL_NAME" title="${uiLabelMap.WebtoolsPool}"><text/></field> + <field name="_RUN_SYNC_"><hidden value="Y"/></field> + <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> </forms> Added: ofbiz/trunk/framework/webtools/webapp/webtools/service/serviceResult.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/service/serviceResult.ftl?view=auto&rev=507567 ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/service/serviceResult.ftl (added) +++ ofbiz/trunk/framework/webtools/webapp/webtools/service/serviceResult.ftl Wed Feb 14 07:12:32 2007 @@ -0,0 +1,45 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<form method="post" action="<@ofbizUrl>saveServiceResultsToSession</@ofbizUrl>" +<table cellpadding="2" cellspacing="0" border="1" width="100%"> + <tr> + <td><div class="tableheadtext">parameter</div></td> + <td><div class="tableheadtext">value</div></td> + <td><div class="tableheadtext">save value?</div></td> + </tr> + + <#list serviceResultList as srl> + <tr> + <#if srl.hasChild=="Y"> + <td><div class="tabletext"><a href="<@ofbizUrl>/serviceResult?servicePath=</@ofbizUrl><#if parameters.servicePath?exists>${parameters.servicePath}||</#if>${srl.key?if_exists}">${srl.key?if_exists}</a></div></td> + <#else> + <td><div class="tabletext">${srl.key?if_exists}</div></td> + </#if> + <td><div class="tabletext">${srl.value?if_exists}</div></td> + <td><div class="tabletext"><input type="checkbox" name="<#if parameters.servicePath?exists>${parameters.servicePath}||</#if>${srl.key?if_exists}" /></div></td> + </tr> + </#list> + + <tr> + <td><div class="tabletext"> </div></td> + <td><div class="tabletext">Clear previous params? <input type="checkbox" name="_CLEAR_PREVIOUS_PARAMS_" /></div></td> + <td><div class="tabletext"><input type="submit" value="submit" /></div></td> + </tr> +</table> Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/service/serviceResult.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/service/serviceResult.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/service/serviceResult.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/framework/webtools/webapp/webtools/service/setServiceParameter.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/service/setServiceParameter.ftl?view=diff&rev=507567&r1=507566&r2=507567 ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/service/setServiceParameter.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/service/setServiceParameter.ftl Wed Feb 14 07:12:32 2007 @@ -28,7 +28,7 @@ <tr> <td align="right"><div class="tabletext">${serviceParameter.name} (${serviceParameter.type})</div></td> <td> - <input type="text" class="inputBox" size="20" name="${serviceParameter.name}"/> + <input type="text" class="inputBox" size="20" name="${serviceParameter.name}" value="${serviceParameter.value?if_exists}" /> <span class="tabletext"><#if serviceParameter.optional == "N">(required)<#else>(optional)</#if></span> </td> </tr> Modified: ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml?view=diff&rev=507567&r1=507566&r2=507567 ============================================================================== --- ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml (original) +++ ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml Wed Feb 14 07:12:32 2007 @@ -129,6 +129,21 @@ </widgets> </section> </screen> + <screen name="RunService"> + <section> + <actions> + <set field="titleProperty" value="PageTitleRunService"/> + <script location="component://webtools/webapp/webtools/WEB-INF/actions/service/scheduleJob.bsh"/> + </actions> + <widgets> + <decorator-screen name="CommonWebtoolsDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <include-form name="runService" location="component://webtools/webapp/webtools/service/ServiceForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> <screen name="setServiceParameters"> <section> <actions> @@ -143,6 +158,44 @@ <label style="head1">${uiLabelMap.WebtoolsMessage12}</label> <platform-specific> <html><html-template location="component://webtools/webapp/webtools/service/setServiceParameter.ftl"/></html> + </platform-specific> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="setSyncServiceParameters"> + <section> + <actions> + <set field="titleProperty" value="PageTitleScheduleJob"/> + <set field="headerItem" value="services"/> + <set field="tabButtonItem" value="ScheduleJob"/> + <script location="component://webtools/webapp/webtools/WEB-INF/actions/service/scheduleJob.bsh"/> + </actions> + <widgets> + <decorator-screen name="CommonWebtoolsDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <platform-specific> + <html><html-template location="component://webtools/webapp/webtools/service/setServiceParameter.ftl"/></html> + </platform-specific> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="ServiceResult"> + <section> + <actions> + <set field="titleProperty" value="PageTitleScheduleJob"/> + <set field="headerItem" value="services"/> + <set field="tabButtonItem" value="ScheduleJob"/> + <script location="component://webtools/webapp/webtools/WEB-INF/actions/service/serviceResult.bsh"/> + </actions> + <widgets> + <decorator-screen name="CommonWebtoolsDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <platform-specific> + <html><html-template location="component://webtools/webapp/webtools/service/serviceResult.ftl"/></html> </platform-specific> </decorator-section> </decorator-screen> |
Free forum by Nabble | Edit this page |