Hi Adrian,

How can I access fromDate and thruDate in Form xml? I tried using fromDate
but did not work.

Thanks for your help.
Su-



Adrian Crum wrote:
> 
> In the screen xml:
> 
> <actions>
>    <set field="fromDate" from-field"parameters.fromDate"/>
>    <set field="thruDate" from-field"parameters.thruDate"/>
> </actions>
> 
> In the form xml:
> 
> <actions>
>    <!-- Do something with fromDate and thruDate -->
>    ...
> </actions>
> 
> -Adrian
> 
> su2 wrote:
>> Sorry, I was not able to understand - keep the information in the
>> context.
>> Can you please explain in detail.
>> 
>> I really appreciate your help.
>> 
>> Thank you.
>> Su-
>> 
>> 
>> Adrian Crum wrote:
>>> Why not keep that information in the context? Trying to access session 
>>> information in the presentation layer breaks the MVC boundaries.
>>>
>>> -Adrian
>>>
>>> su2 wrote:
>>>> Hi Adrian,
>>>>
>>>> I have a screen which has bsh file in <actions> and FormWidget in
>>>> <widgets>
>>>> tag. I am capturing fromDate and thruDate in Session in .bsh file.
>>>>
>>>> Now from FormWidget I am calling Java Methods for the data
>>>> manipulation.
>>>> For
>>>> the data manipulation I need to have access to fromDate and thruDate
>>>> selected by the user.
>>>>
>>>> So here in Java method I am trying to access session variables.
>>>>
>>>> I hope it helps in understanding my scenario.
>>>>
>>>> Thank you.
>>>> Su-
>>>>
>>>> Adrian Crum wrote:
>>>>> You haven't provided enough information. Where in the program flow is 
>>>>> the Java method? What are you trying to retrieve? What are you trying
>>>>> to 
>>>>> achieve?
>>>>>
>>>>> -Adrian
>>>>>
>>>>> su2 wrote:
>>>>>> Hello Friends,
>>>>>>
>>>>>> I was trying to retrieve the session value using following code in
>>>>>> Java
>>>>>> Method. But it gives me error -"session" can not be resolved.
>>>>>>
>>>>>> -------------------------------------------------------------
>>>>>> String fromDate = session.getAttribute("fromDate");
>>>>>> -------------------------------------------------------------
>>>>>>
>>>>>> Am I missing something?
>>>>>>
>>>>>> Thank you for the help in advance.
>>>>>>
>>>>>> Su-
>>>>>>
>>>
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-get-session-variable-value-in-Java-Method--tp25774516p25793935.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to