Hi
Im a newbie to OFBiz. I am having a problem adding a new functionality to
existing
OFBiz based application(opentaps)
My service definition file services_Test.xml has the following entry
<service name="crmsfa.Test" engine="java"
location="com.opensourcestrategies.crmsfa.test.TestServices" invoke="Test">
<description>Testing</description>
<attribute name="testSelect" type="String" mode="IN"
optional="false"/>
<attribute name="heading" type="String" mode="OUT"
optional="false"/>
</service>
my TestForms.xml
<form name="TestFormMain" type="single" title="" target="Test"
default-title-style="tableheadtext" default-widget-style="inputBox"
default-tooltip-style="tabletext">
<field name="testSelect" title="Select option" >
<drop-down allow-empty="true">
<option key="option1" description="HEAD1"/>
<option key="option2" description="HEAD2"/>
</drop-down>
</field>
</form>
<form name="SuccessForm" type="single" title="SuccessFormTitle"
default-title-style="tableheadtext" default-widget-style="inputBox"
default-tooltip-style="tabletext">
<field name="heading" title="${heading}"><display/></field>
</form>
i invoke a java service method which returns a Map of data
My java method has the following entries in the TestServices.java file
public static Map Test(DispatchContext dctx, Map context) {
Map result = ServiceUtil.returnSuccess("Success");
result.put("heading", "HELLO");
return result;
}
My TestScreens.xml
<screen name="TestScreenMain">
<section>
<actions>
<set field="sectionHeaderUiLabel" value="CrmTest"/>
</actions>
<widgets>
<decorator-screen name="main-section-decorator">
<decorator-section name="section-body">
<container style="subSectionBlock">
<container style="form">
<include-form name="TestFormMain"
location="component://crmsfa/widget/crmsfa/forms/test/TestForms.xml"/>
</container>
</container>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="TestScreenSuccess">
<section>
<actions>
<set field="sectionHeaderUiLabel" value="CrmTestSuccess"/>
</actions>
<widgets>
<decorator-screen name="main-section-decorator">
<decorator-section name="section-body">
<container style="subSectionBlock">
<container style="form">
<include-form name="SuccessForm"
location="component://crmsfa/widget/crmsfa/forms/Test/TestForms.xml"/>
</container>
</container>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
What are the appropriate changes i should make in my controller.xml and
TestForm.xml file
so that I can get the value of OUT paramter of my mainForm
(heading)returned by my
java service method to be displayed
in my successForm as the value of
its field
Please help me to solve the problem
Thanks in advance
-Tanzeem
--
View this message in context:
http://www.nabble.com/How-do-i-get-the-value-of-OUT-parameter-from-service-method-to-the-success-form-tp23310231p23310231.html
Sent from the OFBiz - User mailing list archive at Nabble.com.