Users - Does this statement get a value from session data?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - Does this statement get a value from session data?

Vinay Agarwal

Hello,

 

I am struggling with syntax in the screen widget for setting and getting session data. After searching the project, I ran across this statement in party/widget/partymgr/PartyScreens.xml.

<set field="previousParams" from-field="sessionAttributes._PREVIOUS_PARAMS_"/>

 

Is it similar to the following bsh statement?

previousParams = session.getAttribute("_PREVIOUS_PARAMS_");

 

Regards,

Vinay Agarwal

 


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Does this statement get a value from session data?

David E. Jones

Yes, those are pretty much the same. We have created a Map wrapper  
for session attributes so they can be treated like a Map, which is  
applicable in many places in OFBiz, which is not true of method calls.

-David


On Jan 25, 2006, at 4:09 PM, Vinay Agarwal wrote:

> Hello,
>
>
> I am struggling with syntax in the screen widget for setting and  
> getting session data. After searching the project, I ran across  
> this statement in party/widget/partymgr/PartyScreens.xml.
>
> <set field="previousParams" from-
> field="sessionAttributes._PREVIOUS_PARAMS_"/>
>
>
> Is it similar to the following bsh statement?
>
> previousParams = session.getAttribute("_PREVIOUS_PARAMS_");
>
>
> Regards,
>
> Vinay Agarwal
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Does this statement get a value from sessiondata?

Vinay Agarwal
But it doesn't seem to work as I expect in the screen widget action part. I
have this single statement in my maincatalog.bsh file:
        session.setAttribute("CURRENT_CATALOG_ID", "Tutoring");
I call this from the screen widget's action part like this:
        <script
location="component://grayzilla/webapp/grayzilla/WEB-INF/actions/maincatalog
bsh"/>

Which correctly sets the catalog to "Tutoring" for this screen. But if I
replace the above statement by the following statement in the same screen
widget
        <set field="sessionAttributes.CURRENT_CATALOG_ID" value="Tutoring"/>

That does not set the catalog to "Tutoring". What am I missing?

Regards,
Vinay Agarwal

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of David E. Jones
Sent: Thursday, January 26, 2006 1:12 AM
To: OFBiz Users / Usage Discussion
Subject: Re: [OFBiz] Users - Does this statement get a value from
sessiondata?


Yes, those are pretty much the same. We have created a Map wrapper  
for session attributes so they can be treated like a Map, which is  
applicable in many places in OFBiz, which is not true of method calls.

-David


On Jan 25, 2006, at 4:09 PM, Vinay Agarwal wrote:

> Hello,
>
>
> I am struggling with syntax in the screen widget for setting and  
> getting session data. After searching the project, I ran across  
> this statement in party/widget/partymgr/PartyScreens.xml.
>
> <set field="previousParams" from-
> field="sessionAttributes._PREVIOUS_PARAMS_"/>
>
>
> Is it similar to the following bsh statement?
>
> previousParams = session.getAttribute("_PREVIOUS_PARAMS_");
>
>
> Regards,
>
> Vinay Agarwal
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users