Improved ui flow for "run service" requests: when an error occurs it returns to the "run service" screen instead of the "submit job" screen (OFBIZ-3571)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1214680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacopo Cappellato
2011-12-15 10:00:12 +00:00
parent 9671997a2d
commit 172d49de9b
3 changed files with 48 additions and 6 deletions
@@ -59,11 +59,6 @@ under the License.
<response name="error" type="none"/>
<response name="success" type="none"/>
</request-map>
<request-map uri="runService">
<event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="runService"/>
<response name="success" type="view" value="main"/>
<response name="error" type="view" value="main"/>
</request-map>
<request-map uri="ping">
<event type="service" invoke="ping"/>
@@ -316,6 +311,13 @@ under the License.
<response name="sync_success" type="view" value="serviceResult"/>
<response name="error" type="view" value="scheduleJob"/>
</request-map>
<request-map uri="scheduleServiceSync">
<security https="true" auth="true"/>
<event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="scheduleService"/>
<response name="success" type="view" value="serviceResult"/>
<response name="sync_success" type="view" value="serviceResult"/>
<response name="error" type="view" value="runService"/>
</request-map>
<request-map uri="serviceResult">
<security https="true" auth="true"/>
<response name="success" type="view" value="serviceResult"/>
@@ -0,0 +1,40 @@
<#--
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 name="scheduleForm" method="post" action="<@ofbizUrl>scheduleServiceSync</@ofbizUrl>">
<#list scheduleOptions as scheduleOption>
<input type="hidden" name="${scheduleOption.name}" value="${scheduleOption.value}"/>
</#list>
<table class="basic-table" cellspacing="0">
<#list serviceParameters as serviceParameter>
<tr>
<td class="label">${serviceParameter.name} (${serviceParameter.type})</td>
<td>
<input type="text" size="20" name="${serviceParameter.name}" value="${serviceParameter.value?if_exists}" <#if serviceParameter.optional == "N">class="required"</#if>/>
<#if serviceParameter.optional == "N"><span class="tooltip">${uiLabelMap.CommonRequired}</span></#if>
<#if serviceParameter.defaultValue?has_content>${uiLabelMap.WebtoolsServiceDefault} ${serviceParameter.defaultValue}</#if>
</td>
</tr>
</#list>
<tr>
<td colspan="2" align="center"><input type="submit" value="${uiLabelMap.CommonSubmit}" /></td>
</tr>
</table>
</form>
+1 -1
View File
@@ -167,7 +167,7 @@ under the License.
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleScheduleJob}">
<platform-specific>
<html><html-template location="component://webtools/webapp/webtools/service/setServiceParameter.ftl"/></html>
<html><html-template location="component://webtools/webapp/webtools/service/setServiceParameterSync.ftl"/></html>
</platform-specific>
</screenlet>
</decorator-section>