ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tuvok <test.subject...@gmail.com>
Subject accessing context from service
Date Thu, 10 Nov 2011 12:23:49 GMT

I have a screen in wich I set some variables:

<screen name="myScreen">
			*<set field="myVariable" value="test_value" to-scope="user"
				<include-form location="component://myExample/widget/Forms.xml"

and if I understand the field *myVariable* is accessible in context, but
when I want to retrieve *myVariable* from service *myJavaService* using*
context.get("myVariable")* I got null. Is it possible to access such a
variable from my service and how?

Form *myForm*:

<form name="myForm" type="single" target="submitMyForm">
	<field name="param_1"><text/></field>
	<field name="param_2"><text/></field>
	<field name="Do something"><submit/></field>		


<request-map uri="submitMyForm">
	<security https="true" auth="true"/>
	<event type="service" path="org.ofbiz.myApplication"
	<response name="success" type="view" value="myScreen"/>

*Service definition*:

 public static Map<String, Object> myJavaService(DispatchContext ctx,
Map<String, Object> context) {
	Map<String, Object> result = FastMap.newInstance();
	Delegator delegator = ctx.getDelegator();
	*Map<String, Object> myVariable= (Map<String, Object>)
	return result;

View this message in context: http://ofbiz.135035.n4.nabble.com/accessing-context-from-service-tp4023436p4023436.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

View raw message