Hi Robert,

I think you looking for :
<response name="response" type="request" value="json" />

Please refere the json request in common-controller.xml for json response 
handling. You can also trace the getConfigDetailsEvents request form ordermgr 
controller.

Instead of return isInSession or isNotSession as a response you can put value 
in request as request.setAttribute and get it from json resoponse.



Thanks & Regards
-- 
Deepak Dixit
HotWax Media Pvt. Ltd.
www.hotwaxmedia.com
Contact :- +91-98267-54548
Skype  :- deepakdixit

On Jul 3, 2012, at 9:50 PM, Robert G. wrote:

> hey guys,
> 
> I use javascript to do some things. To get a consistent status of the user
> preferences I want to store some variables in the session object.
> 
> I created java methods to check if the session key exists, to store a value
> or to remove them.
> 
> With an ajax call I call the java method with the way over the
> controller.xml. That works. But now I get the respons like:
> 
> <response name="isInSession"... />
> <response name="isNotInSession" ... />
> 
> I dont want to call with them a view, I want to get a response directly like
> a callback to my ajax request. Is that possible? Which type etc. I use in
> the response?
> 
> I want to check in the ajax "success" sth. like:
> 
> /
> if (...isInsession) {
> do this
> } else {
> do sth else
> }/
> 
> I know, that I can do the not that nice way, by calling a view, and request
> it from the header in the callback...but I hope this is going more easy :)
> 
> btw. I checked a lot of posts in that forum, but couldnt find a good answer
> for me (maybe cause its not possible)
> 
> pleeeeaasse help :)
> 
> Robert
> 
> 
> 
> 
> --
> View this message in context: 
> http://ofbiz.135035.n4.nabble.com/Response-from-java-Method-to-client-Ajax-call-tp4634402.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to