You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "tanzeem.mb" <ta...@hotmail.com> on 2009/05/02 07:47:36 UTC
Re: How do i get the value of OUT parameter from service method to
the success form
Thank you for the tips.
My code:
context = ServiceUtil.returnSuccess("Success");
context.put("heading", new String("HELLO"));
return context;
After returning the context what should i do with my SuccessForm so that I
get the heading displayed
When i use the following success form i dont get the value of heading
displayed.
<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>
madppiper wrote:
>
> well thats rather simple:
>
> use the serviceUtil classes to return a success or Error like the
> following
>
>
> context = ServiceUtil.returnSuccess("Your Sucess message");
>
>
> then return the context as appropriate... you may also want to add any
> other out parameter to the context as you wish
>
> context.put("out1",out1);
>
> whereas "out1" is the key and out1 is the object
>
--
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-tp23310231p23343286.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: How to stream excel object from java service method back to the
browser
Posted by "tanzeem.mb" <ta...@hotmail.com>.
hi
what i want is to export data from ofbiz into excel format and stream it to
the browser
-Tanzeem
Ashish Vijaywargiya-5 wrote:
>
> Direct link to see the commits :
>
> r663581
> http://www.nabble.com/svn-commit%3A-r663581---in--ofbiz-trunk-specialpurpose-assetmaint%3A-build.xml-data-ScheduleUploadJob.xml-servicedef-services.xml-src-org-ofbiz-poi--src-org-ofbiz-poi-FileImportHelper.java-src-org-ofbiz-poi-FileImportService.java-td17668684.html#a17668684
> <http://www.nabble.com/svn-commit%3A-r663581---in--ofbiz-trunk-specialpurpose-assetmaint%3A-build.xml-data-ScheduleUploadJob.xml-servicedef-services.xml-src-org-ofbiz-poi--src-org-ofbiz-poi-FileImportHelper.java-src-org-ofbiz-poi-FileImportService.java-td17668684.html#a17668684>
>
> r663627
> http://www.nabble.com/svn-commit%3A-r663627---in--ofbiz-trunk%3A-applications-product-data--applications-product-servicedef--applications-product-src-org-ofbiz-product-spreadsheetimport--specialpurpose-assetmaint--specialpurpose-assetmaint-data--specialpurpose-assetmaint-servic...-td17671151.html#a17671151
> <http://www.nabble.com/svn-commit%3A-r663627---in--ofbiz-trunk%3A-applications-product-data--applications-product-servicedef--applications-product-src-org-ofbiz-product-spreadsheetimport--specialpurpose-assetmaint--specialpurpose-assetmaint-data--specialpurpose-assetmaint-servic...-td17671151.html#a17671151>
>
> --
> Ashish
>
> Ashish Vijaywargiya wrote:
>> Hello Tanzeem,
>>
>> Following commit notification will be your friend.
>> r663581 & r663627.
>>
>> The how to steps are attached in the document available at jira issue
>> OFBIZ-1810. (https://issues.apache.org/jira/browse/OFBIZ-1810
>> <https://issues.apache.org/jira/browse/OFBIZ-1810>)
>>
>> --
>> Ashish
>>
>> tanzeem.mb wrote:
>>> Hi
>>>
>>> I m trying to extend my application now.
>>> I am creating excel workbook inside my java service method using POI.
>>> Is there any way to use the response variable to stream the excel
>>> workbook
>>> object(HSSFWorkBook) to the browser to download/save the excel file.
>>>
>>> Thanks
>>> -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-tp23310231p23383491.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: How to stream excel object from java service method back to the
browser
Posted by Ashish Vijaywargiya <as...@hotwaxmedia.com>.
Direct link to see the commits :
r663581
http://www.nabble.com/svn-commit%3A-r663581---in--ofbiz-trunk-specialpurpose-assetmaint%3A-build.xml-data-ScheduleUploadJob.xml-servicedef-services.xml-src-org-ofbiz-poi--src-org-ofbiz-poi-FileImportHelper.java-src-org-ofbiz-poi-FileImportService.java-td17668684.html#a17668684
<http://www.nabble.com/svn-commit%3A-r663581---in--ofbiz-trunk-specialpurpose-assetmaint%3A-build.xml-data-ScheduleUploadJob.xml-servicedef-services.xml-src-org-ofbiz-poi--src-org-ofbiz-poi-FileImportHelper.java-src-org-ofbiz-poi-FileImportService.java-td17668684.html#a17668684>
r663627
http://www.nabble.com/svn-commit%3A-r663627---in--ofbiz-trunk%3A-applications-product-data--applications-product-servicedef--applications-product-src-org-ofbiz-product-spreadsheetimport--specialpurpose-assetmaint--specialpurpose-assetmaint-data--specialpurpose-assetmaint-servic...-td17671151.html#a17671151
<http://www.nabble.com/svn-commit%3A-r663627---in--ofbiz-trunk%3A-applications-product-data--applications-product-servicedef--applications-product-src-org-ofbiz-product-spreadsheetimport--specialpurpose-assetmaint--specialpurpose-assetmaint-data--specialpurpose-assetmaint-servic...-td17671151.html#a17671151>
--
Ashish
Ashish Vijaywargiya wrote:
> Hello Tanzeem,
>
> Following commit notification will be your friend.
> r663581 & r663627.
>
> The how to steps are attached in the document available at jira issue
> OFBIZ-1810. (https://issues.apache.org/jira/browse/OFBIZ-1810
> <https://issues.apache.org/jira/browse/OFBIZ-1810>)
>
> --
> Ashish
>
> tanzeem.mb wrote:
>> Hi
>>
>> I m trying to extend my application now.
>> I am creating excel workbook inside my java service method using POI.
>> Is there any way to use the response variable to stream the excel workbook
>> object(HSSFWorkBook) to the browser to download/save the excel file.
>>
>> Thanks
>> -Tanzeem
>>
Re: How to stream excel object from java service method back to the
browser
Posted by Ashish Vijaywargiya <as...@hotwaxmedia.com>.
Hello Tanzeem,
Following commit notification will be your friend.
r663581 & r663627.
The how to steps are attached in the document available at jira issue
OFBIZ-1810. (https://issues.apache.org/jira/browse/OFBIZ-1810
<https://issues.apache.org/jira/browse/OFBIZ-1810>)
--
Ashish
tanzeem.mb wrote:
> Hi
>
> I m trying to extend my application now.
> I am creating excel workbook inside my java service method using POI.
> Is there any way to use the response variable to stream the excel workbook
> object(HSSFWorkBook) to the browser to download/save the excel file.
>
> Thanks
> -Tanzeem
>
How to stream excel object from java service method back to the
browser
Posted by "tanzeem.mb" <ta...@hotmail.com>.
Hi
I m trying to extend my application now.
I am creating excel workbook inside my java service method using POI.
Is there any way to use the response variable to stream the excel workbook
object(HSSFWorkBook) to the browser to download/save the excel file.
Thanks
-Tanzeem
tanzeem.mb wrote:
>
> Hi Scott,
>
> Thanks, its working!
>
> regards
> Tanzeem
>
> Scott Gray-2 wrote:
>>
>> Hi Tanzeem
>>
>> Try ${parameters.heading}
>>
>> Regards
>> Scott
>>
>> On 2/05/2009, at 7:31 PM, tanzeem.mb wrote:
>>
>>>
>>> Hi Scott
>>> Im calling the service by defining the following request map in my
>>> controller.xml
>>>
>>> <request-map uri="Test">
>>> <security https="true" auth="true"/>
>>> <event type="service" invoke="crmsfa.Test"/>
>>> <response name="success" type="view" value="successViewMap"/>
>>>
>>> </request-map>
>>> My view map is defined as below
>>> <view-map name="successViewMap" type="screen"
>>> page="component://pathtoScreensFolder/MyScreens.xml#MySuccessScreen"/>
>>> Thanks
>>> -Tanzeem
>>>
>>> Scott Gray-2 wrote:
>>>>
>>>> No that's how you're defining your service, what I'm asking is where
>>>> and how are you calling it? e.g. from a request event, a screen
>>>> def, a
>>>> script file, in the form actions, etc.
>>>>
>>>> Regards
>>>> Scott
>>>>
>>>> On 2/05/2009, at 6:35 PM, tanzeem.mb wrote:
>>>>
>>>>>
>>>>> <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>
>>>>>
>>>>> Scott Gray-2 wrote:
>>>>>>
>>>>>> How are you calling the service?
>>>>>>
>>>>>> Regards
>>>>>> Scott
>>>>>>
>>>>>> HotWax Media
>>>>>> http://www.hotwaxmedia.com
>>>>>>
>>>>>> On 2/05/2009, at 5:47 PM, tanzeem.mb wrote:
>>>>>>
>>>>>>>
>>>>>>> Thank you for the tips.
>>>>>>> My code:
>>>>>>>
>>>>>>> context = ServiceUtil.returnSuccess("Success");
>>>>>>> context.put("heading", new String("HELLO"));
>>>>>>> return context;
>>>>>>>
>>>>>>> After returning the context what should i do with my SuccessForm
>>>>>>> so
>>>>>>> that I
>>>>>>> get the heading displayed
>>>>>>> When i use the following success form i dont get the value of
>>>>>>> heading
>>>>>>> displayed.
>>>>>>>
>>>>>>> <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>
>>>>>>>
>>>>>>> madppiper wrote:
>>>>>>>>
>>>>>>>> well thats rather simple:
>>>>>>>>
>>>>>>>> use the serviceUtil classes to return a success or Error like the
>>>>>>>> following
>>>>>>>>
>>>>>>>>
>>>>>>>> context = ServiceUtil.returnSuccess("Your Sucess message");
>>>>>>>>
>>>>>>>>
>>>>>>>> then return the context as appropriate... you may also want to
>>>>>>>> add
>>>>>>>> any
>>>>>>>> other out parameter to the context as you wish
>>>>>>>>
>>>>>>>> context.put("out1",out1);
>>>>>>>>
>>>>>>>> whereas "out1" is the key and out1 is the object
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> 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-tp23310231p23343286.html
>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> 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-tp23310231p23343499.html
>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> 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-tp23310231p23343802.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>
>>
>>
>>
>
>
--
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-tp23310231p23381745.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: How to stream excel object from java service method back to the browser
Posted by Jacques Le Roux <ja...@les7arts.com>.
Also FAQ is your friend
http://docs.ofbiz.org/display/OFBIZ/Export+to+Excel
Jacques
From: "BJ Freeman" <bj...@free-man.net>
> you don't have to use POI. or be complicated.
> been doing this since html started
> you can create an ftl
> once it is completed it can be saved as an excel.
> http://www.w3schools.com/media/media_mimeref.asp
> here is an html example:
> <%response.ContentType="application/vnd.ms-excel"%>
> <html>
> <head>
> <style type="text/css">
> td {padding:2em; background-color:yellow; border:1px dotted #000;}
> </style>
> </head>
> <body>
> <table>
> <tr>
> <td>1</td>
> <td>2</td>
> <td>3</td>
> <td>4</td>
> </tr>
> <tr>
> <td>=sum(a1:d1)</td>
> <td>6</td>
> <td>7</td>
> <td>8</td>
> </tr>
> </table>
> </body>
> </html>
>
> tanzeem.mb sent the following on 5/4/2009 11:29 PM:
>> Hi
>>
>> I m trying to extend my application now.
>> I am creating excel workbook inside my java service method using POI.
>> Is there any way to use the response variable to stream the excel workbook
>> object(HSSFWorkBook) to the browser to download/save the excel file.
>>
>> Thanks
>> -Tanzeem
>>
>>
>> tanzeem.mb wrote:
>>> Hi Scott,
>>>
>>> Thanks, its working!
>>>
>>> regards
>>> Tanzeem
>>>
>>> Scott Gray-2 wrote:
>>>> Hi Tanzeem
>>>>
>>>> Try ${parameters.heading}
>>>>
>>>> Regards
>>>> Scott
>>>>
>>>> On 2/05/2009, at 7:31 PM, tanzeem.mb wrote:
>>>>
>>>>> Hi Scott
>>>>> Im calling the service by defining the following request map in my
>>>>> controller.xml
>>>>>
>>>>> <request-map uri="Test">
>>>>> <security https="true" auth="true"/>
>>>>> <event type="service" invoke="crmsfa.Test"/>
>>>>> <response name="success" type="view" value="successViewMap"/>
>>>>>
>>>>> </request-map>
>>>>> My view map is defined as below
>>>>> <view-map name="successViewMap" type="screen"
>>>>> page="component://pathtoScreensFolder/MyScreens.xml#MySuccessScreen"/>
>>>>> Thanks
>>>>> -Tanzeem
>>>>>
>>>>> Scott Gray-2 wrote:
>>>>>> No that's how you're defining your service, what I'm asking is where
>>>>>> and how are you calling it? e.g. from a request event, a screen
>>>>>> def, a
>>>>>> script file, in the form actions, etc.
>>>>>>
>>>>>> Regards
>>>>>> Scott
>>>>>>
>>>>>> On 2/05/2009, at 6:35 PM, tanzeem.mb wrote:
>>>>>>
>>>>>>> <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>
>>>>>>>
>>>>>>> Scott Gray-2 wrote:
>>>>>>>> How are you calling the service?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> Scott
>>>>>>>>
>>>>>>>> HotWax Media
>>>>>>>> http://www.hotwaxmedia.com
>>>>>>>>
>>>>>>>> On 2/05/2009, at 5:47 PM, tanzeem.mb wrote:
>>>>>>>>
>>>>>>>>> Thank you for the tips.
>>>>>>>>> My code:
>>>>>>>>>
>>>>>>>>> context = ServiceUtil.returnSuccess("Success");
>>>>>>>>> context.put("heading", new String("HELLO"));
>>>>>>>>> return context;
>>>>>>>>>
>>>>>>>>> After returning the context what should i do with my SuccessForm
>>>>>>>>> so
>>>>>>>>> that I
>>>>>>>>> get the heading displayed
>>>>>>>>> When i use the following success form i dont get the value of
>>>>>>>>> heading
>>>>>>>>> displayed.
>>>>>>>>>
>>>>>>>>> <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>
>>>>>>>>>
>>>>>>>>> madppiper wrote:
>>>>>>>>>> well thats rather simple:
>>>>>>>>>>
>>>>>>>>>> use the serviceUtil classes to return a success or Error like the
>>>>>>>>>> following
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> context = ServiceUtil.returnSuccess("Your Sucess message");
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> then return the context as appropriate... you may also want to
>>>>>>>>>> add
>>>>>>>>>> any
>>>>>>>>>> other out parameter to the context as you wish
>>>>>>>>>>
>>>>>>>>>> context.put("out1",out1);
>>>>>>>>>>
>>>>>>>>>> whereas "out1" is the key and out1 is the object
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> 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-tp23310231p23343286.html
>>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> 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-tp23310231p23343499.html
>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> 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-tp23310231p23343802.html
>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>
> --
> BJ Freeman
> http://www.businessesnetwork.com/automation
> http://bjfreeman.elance.com
> http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
> Systems Integrator.
>
Re: How to stream excel object from java service method back to the
browser
Posted by BJ Freeman <bj...@free-man.net>.
you don't have to use POI. or be complicated.
been doing this since html started
you can create an ftl
once it is completed it can be saved as an excel.
http://www.w3schools.com/media/media_mimeref.asp
here is an html example:
<%response.ContentType="application/vnd.ms-excel"%>
<html>
<head>
<style type="text/css">
td {padding:2em; background-color:yellow; border:1px dotted #000;}
</style>
</head>
<body>
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>=sum(a1:d1)</td>
<td>6</td>
<td>7</td>
<td>8</td>
</tr>
</table>
</body>
</html>
tanzeem.mb sent the following on 5/4/2009 11:29 PM:
> Hi
>
> I m trying to extend my application now.
> I am creating excel workbook inside my java service method using POI.
> Is there any way to use the response variable to stream the excel workbook
> object(HSSFWorkBook) to the browser to download/save the excel file.
>
> Thanks
> -Tanzeem
>
>
> tanzeem.mb wrote:
>> Hi Scott,
>>
>> Thanks, its working!
>>
>> regards
>> Tanzeem
>>
>> Scott Gray-2 wrote:
>>> Hi Tanzeem
>>>
>>> Try ${parameters.heading}
>>>
>>> Regards
>>> Scott
>>>
>>> On 2/05/2009, at 7:31 PM, tanzeem.mb wrote:
>>>
>>>> Hi Scott
>>>> Im calling the service by defining the following request map in my
>>>> controller.xml
>>>>
>>>> <request-map uri="Test">
>>>> <security https="true" auth="true"/>
>>>> <event type="service" invoke="crmsfa.Test"/>
>>>> <response name="success" type="view" value="successViewMap"/>
>>>>
>>>> </request-map>
>>>> My view map is defined as below
>>>> <view-map name="successViewMap" type="screen"
>>>> page="component://pathtoScreensFolder/MyScreens.xml#MySuccessScreen"/>
>>>> Thanks
>>>> -Tanzeem
>>>>
>>>> Scott Gray-2 wrote:
>>>>> No that's how you're defining your service, what I'm asking is where
>>>>> and how are you calling it? e.g. from a request event, a screen
>>>>> def, a
>>>>> script file, in the form actions, etc.
>>>>>
>>>>> Regards
>>>>> Scott
>>>>>
>>>>> On 2/05/2009, at 6:35 PM, tanzeem.mb wrote:
>>>>>
>>>>>> <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>
>>>>>>
>>>>>> Scott Gray-2 wrote:
>>>>>>> How are you calling the service?
>>>>>>>
>>>>>>> Regards
>>>>>>> Scott
>>>>>>>
>>>>>>> HotWax Media
>>>>>>> http://www.hotwaxmedia.com
>>>>>>>
>>>>>>> On 2/05/2009, at 5:47 PM, tanzeem.mb wrote:
>>>>>>>
>>>>>>>> Thank you for the tips.
>>>>>>>> My code:
>>>>>>>>
>>>>>>>> context = ServiceUtil.returnSuccess("Success");
>>>>>>>> context.put("heading", new String("HELLO"));
>>>>>>>> return context;
>>>>>>>>
>>>>>>>> After returning the context what should i do with my SuccessForm
>>>>>>>> so
>>>>>>>> that I
>>>>>>>> get the heading displayed
>>>>>>>> When i use the following success form i dont get the value of
>>>>>>>> heading
>>>>>>>> displayed.
>>>>>>>>
>>>>>>>> <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>
>>>>>>>>
>>>>>>>> madppiper wrote:
>>>>>>>>> well thats rather simple:
>>>>>>>>>
>>>>>>>>> use the serviceUtil classes to return a success or Error like the
>>>>>>>>> following
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> context = ServiceUtil.returnSuccess("Your Sucess message");
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> then return the context as appropriate... you may also want to
>>>>>>>>> add
>>>>>>>>> any
>>>>>>>>> other out parameter to the context as you wish
>>>>>>>>>
>>>>>>>>> context.put("out1",out1);
>>>>>>>>>
>>>>>>>>> whereas "out1" is the key and out1 is the object
>>>>>>>>>
>>>>>>>> --
>>>>>>>> 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-tp23310231p23343286.html
>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> 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-tp23310231p23343499.html
>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> 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-tp23310231p23343802.html
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>>
>
--
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.
Re: How do i get the value of OUT parameter from service method to
the success form
Posted by "tanzeem.mb" <ta...@hotmail.com>.
Hi Scott,
Thanks, its working!
regards
Tanzeem
Scott Gray-2 wrote:
>
> Hi Tanzeem
>
> Try ${parameters.heading}
>
> Regards
> Scott
>
> On 2/05/2009, at 7:31 PM, tanzeem.mb wrote:
>
>>
>> Hi Scott
>> Im calling the service by defining the following request map in my
>> controller.xml
>>
>> <request-map uri="Test">
>> <security https="true" auth="true"/>
>> <event type="service" invoke="crmsfa.Test"/>
>> <response name="success" type="view" value="successViewMap"/>
>>
>> </request-map>
>> My view map is defined as below
>> <view-map name="successViewMap" type="screen"
>> page="component://pathtoScreensFolder/MyScreens.xml#MySuccessScreen"/>
>> Thanks
>> -Tanzeem
>>
>> Scott Gray-2 wrote:
>>>
>>> No that's how you're defining your service, what I'm asking is where
>>> and how are you calling it? e.g. from a request event, a screen
>>> def, a
>>> script file, in the form actions, etc.
>>>
>>> Regards
>>> Scott
>>>
>>> On 2/05/2009, at 6:35 PM, tanzeem.mb wrote:
>>>
>>>>
>>>> <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>
>>>>
>>>> Scott Gray-2 wrote:
>>>>>
>>>>> How are you calling the service?
>>>>>
>>>>> Regards
>>>>> Scott
>>>>>
>>>>> HotWax Media
>>>>> http://www.hotwaxmedia.com
>>>>>
>>>>> On 2/05/2009, at 5:47 PM, tanzeem.mb wrote:
>>>>>
>>>>>>
>>>>>> Thank you for the tips.
>>>>>> My code:
>>>>>>
>>>>>> context = ServiceUtil.returnSuccess("Success");
>>>>>> context.put("heading", new String("HELLO"));
>>>>>> return context;
>>>>>>
>>>>>> After returning the context what should i do with my SuccessForm
>>>>>> so
>>>>>> that I
>>>>>> get the heading displayed
>>>>>> When i use the following success form i dont get the value of
>>>>>> heading
>>>>>> displayed.
>>>>>>
>>>>>> <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>
>>>>>>
>>>>>> madppiper wrote:
>>>>>>>
>>>>>>> well thats rather simple:
>>>>>>>
>>>>>>> use the serviceUtil classes to return a success or Error like the
>>>>>>> following
>>>>>>>
>>>>>>>
>>>>>>> context = ServiceUtil.returnSuccess("Your Sucess message");
>>>>>>>
>>>>>>>
>>>>>>> then return the context as appropriate... you may also want to
>>>>>>> add
>>>>>>> any
>>>>>>> other out parameter to the context as you wish
>>>>>>>
>>>>>>> context.put("out1",out1);
>>>>>>>
>>>>>>> whereas "out1" is the key and out1 is the object
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> 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-tp23310231p23343286.html
>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> 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-tp23310231p23343499.html
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>>>
>>
>> --
>> 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-tp23310231p23343802.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>
>
>
>
--
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-tp23310231p23344205.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: How do i get the value of OUT parameter from service method to the success form
Posted by Scott Gray <sc...@hotwaxmedia.com>.
Hi Tanzeem
Try ${parameters.heading}
Regards
Scott
On 2/05/2009, at 7:31 PM, tanzeem.mb wrote:
>
> Hi Scott
> Im calling the service by defining the following request map in my
> controller.xml
>
> <request-map uri="Test">
> <security https="true" auth="true"/>
> <event type="service" invoke="crmsfa.Test"/>
> <response name="success" type="view" value="successViewMap"/>
>
> </request-map>
> My view map is defined as below
> <view-map name="successViewMap" type="screen"
> page="component://pathtoScreensFolder/MyScreens.xml#MySuccessScreen"/>
> Thanks
> -Tanzeem
>
> Scott Gray-2 wrote:
>>
>> No that's how you're defining your service, what I'm asking is where
>> and how are you calling it? e.g. from a request event, a screen
>> def, a
>> script file, in the form actions, etc.
>>
>> Regards
>> Scott
>>
>> On 2/05/2009, at 6:35 PM, tanzeem.mb wrote:
>>
>>>
>>> <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>
>>>
>>> Scott Gray-2 wrote:
>>>>
>>>> How are you calling the service?
>>>>
>>>> Regards
>>>> Scott
>>>>
>>>> HotWax Media
>>>> http://www.hotwaxmedia.com
>>>>
>>>> On 2/05/2009, at 5:47 PM, tanzeem.mb wrote:
>>>>
>>>>>
>>>>> Thank you for the tips.
>>>>> My code:
>>>>>
>>>>> context = ServiceUtil.returnSuccess("Success");
>>>>> context.put("heading", new String("HELLO"));
>>>>> return context;
>>>>>
>>>>> After returning the context what should i do with my SuccessForm
>>>>> so
>>>>> that I
>>>>> get the heading displayed
>>>>> When i use the following success form i dont get the value of
>>>>> heading
>>>>> displayed.
>>>>>
>>>>> <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>
>>>>>
>>>>> madppiper wrote:
>>>>>>
>>>>>> well thats rather simple:
>>>>>>
>>>>>> use the serviceUtil classes to return a success or Error like the
>>>>>> following
>>>>>>
>>>>>>
>>>>>> context = ServiceUtil.returnSuccess("Your Sucess message");
>>>>>>
>>>>>>
>>>>>> then return the context as appropriate... you may also want to
>>>>>> add
>>>>>> any
>>>>>> other out parameter to the context as you wish
>>>>>>
>>>>>> context.put("out1",out1);
>>>>>>
>>>>>> whereas "out1" is the key and out1 is the object
>>>>>>
>>>>>
>>>>> --
>>>>> 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-tp23310231p23343286.html
>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> 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-tp23310231p23343499.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>
>>
>>
>>
>
> --
> 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-tp23310231p23343802.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Re: How do i get the value of OUT parameter from service method to
the success form
Posted by "tanzeem.mb" <ta...@hotmail.com>.
Hi Scott
Im calling the service by defining the following request map in my
controller.xml
<request-map uri="Test">
<security https="true" auth="true"/>
<event type="service" invoke="crmsfa.Test"/>
<response name="success" type="view" value="successViewMap"/>
</request-map>
My view map is defined as below
<view-map name="successViewMap" type="screen"
page="component://pathtoScreensFolder/MyScreens.xml#MySuccessScreen"/>
Thanks
-Tanzeem
Scott Gray-2 wrote:
>
> No that's how you're defining your service, what I'm asking is where
> and how are you calling it? e.g. from a request event, a screen def, a
> script file, in the form actions, etc.
>
> Regards
> Scott
>
> On 2/05/2009, at 6:35 PM, tanzeem.mb wrote:
>
>>
>> <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>
>>
>> Scott Gray-2 wrote:
>>>
>>> How are you calling the service?
>>>
>>> Regards
>>> Scott
>>>
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>>
>>> On 2/05/2009, at 5:47 PM, tanzeem.mb wrote:
>>>
>>>>
>>>> Thank you for the tips.
>>>> My code:
>>>>
>>>> context = ServiceUtil.returnSuccess("Success");
>>>> context.put("heading", new String("HELLO"));
>>>> return context;
>>>>
>>>> After returning the context what should i do with my SuccessForm so
>>>> that I
>>>> get the heading displayed
>>>> When i use the following success form i dont get the value of
>>>> heading
>>>> displayed.
>>>>
>>>> <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>
>>>>
>>>> madppiper wrote:
>>>>>
>>>>> well thats rather simple:
>>>>>
>>>>> use the serviceUtil classes to return a success or Error like the
>>>>> following
>>>>>
>>>>>
>>>>> context = ServiceUtil.returnSuccess("Your Sucess message");
>>>>>
>>>>>
>>>>> then return the context as appropriate... you may also want to add
>>>>> any
>>>>> other out parameter to the context as you wish
>>>>>
>>>>> context.put("out1",out1);
>>>>>
>>>>> whereas "out1" is the key and out1 is the object
>>>>>
>>>>
>>>> --
>>>> 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-tp23310231p23343286.html
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>>>
>>
>> --
>> 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-tp23310231p23343499.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>
>
>
>
--
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-tp23310231p23343802.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: How do i get the value of OUT parameter from service method to the success form
Posted by Scott Gray <sc...@hotwaxmedia.com>.
No that's how you're defining your service, what I'm asking is where
and how are you calling it? e.g. from a request event, a screen def, a
script file, in the form actions, etc.
Regards
Scott
On 2/05/2009, at 6:35 PM, tanzeem.mb wrote:
>
> <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>
>
> Scott Gray-2 wrote:
>>
>> How are you calling the service?
>>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> On 2/05/2009, at 5:47 PM, tanzeem.mb wrote:
>>
>>>
>>> Thank you for the tips.
>>> My code:
>>>
>>> context = ServiceUtil.returnSuccess("Success");
>>> context.put("heading", new String("HELLO"));
>>> return context;
>>>
>>> After returning the context what should i do with my SuccessForm so
>>> that I
>>> get the heading displayed
>>> When i use the following success form i dont get the value of
>>> heading
>>> displayed.
>>>
>>> <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>
>>>
>>> madppiper wrote:
>>>>
>>>> well thats rather simple:
>>>>
>>>> use the serviceUtil classes to return a success or Error like the
>>>> following
>>>>
>>>>
>>>> context = ServiceUtil.returnSuccess("Your Sucess message");
>>>>
>>>>
>>>> then return the context as appropriate... you may also want to add
>>>> any
>>>> other out parameter to the context as you wish
>>>>
>>>> context.put("out1",out1);
>>>>
>>>> whereas "out1" is the key and out1 is the object
>>>>
>>>
>>> --
>>> 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-tp23310231p23343286.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>
>>
>>
>>
>
> --
> 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-tp23310231p23343499.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Re: How do i get the value of OUT parameter from service method to
the success form
Posted by "tanzeem.mb" <ta...@hotmail.com>.
<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>
Scott Gray-2 wrote:
>
> How are you calling the service?
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 2/05/2009, at 5:47 PM, tanzeem.mb wrote:
>
>>
>> Thank you for the tips.
>> My code:
>>
>> context = ServiceUtil.returnSuccess("Success");
>> context.put("heading", new String("HELLO"));
>> return context;
>>
>> After returning the context what should i do with my SuccessForm so
>> that I
>> get the heading displayed
>> When i use the following success form i dont get the value of heading
>> displayed.
>>
>> <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>
>>
>> madppiper wrote:
>>>
>>> well thats rather simple:
>>>
>>> use the serviceUtil classes to return a success or Error like the
>>> following
>>>
>>>
>>> context = ServiceUtil.returnSuccess("Your Sucess message");
>>>
>>>
>>> then return the context as appropriate... you may also want to add
>>> any
>>> other out parameter to the context as you wish
>>>
>>> context.put("out1",out1);
>>>
>>> whereas "out1" is the key and out1 is the object
>>>
>>
>> --
>> 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-tp23310231p23343286.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>
>
>
>
--
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-tp23310231p23343499.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: How do i get the value of OUT parameter from service method to the success form
Posted by Scott Gray <sc...@hotwaxmedia.com>.
How are you calling the service?
Regards
Scott
HotWax Media
http://www.hotwaxmedia.com
On 2/05/2009, at 5:47 PM, tanzeem.mb wrote:
>
> Thank you for the tips.
> My code:
>
> context = ServiceUtil.returnSuccess("Success");
> context.put("heading", new String("HELLO"));
> return context;
>
> After returning the context what should i do with my SuccessForm so
> that I
> get the heading displayed
> When i use the following success form i dont get the value of heading
> displayed.
>
> <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>
>
> madppiper wrote:
>>
>> well thats rather simple:
>>
>> use the serviceUtil classes to return a success or Error like the
>> following
>>
>>
>> context = ServiceUtil.returnSuccess("Your Sucess message");
>>
>>
>> then return the context as appropriate... you may also want to add
>> any
>> other out parameter to the context as you wish
>>
>> context.put("out1",out1);
>>
>> whereas "out1" is the key and out1 is the object
>>
>
> --
> 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-tp23310231p23343286.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>