| Author |
Can I access pagecontext or session variables in an ajax service class?
|
firoza limbada
Greenhorn
Joined: Feb 19, 2010
Posts: 11
|
|
|
I am trying to update a table that was initially populated on the jsp using table tags. We are using Ajax to do the data refresh but I am having trouble accessing the full table content in the ajax service class. I can't pass the table object using javascript unless I break the data down into a Javascript object. I have investigated using the DWRUtil.AddRow function but would need to recode what the table tag currently does which is not feasible. Can someone please assist by letting me know if I can access the pagecontext or session variables in the Ajax service class - I would then be able to pass the table object from the jsp in this way, and then resuse the table tags to rebuild the table
|
 |
firoza limbada
Greenhorn
Joined: Feb 19, 2010
Posts: 11
|
|
I have managed to access the session variables as follows
However, I now get a null ponter exception when trying to execute the doEndTag() method as the JSPWriter out is null. If I set this manually during debug to PrintWriter it executes with no errors but the updated table is not displayed to the screen. Can you please tell me how to set the PrintWriter programmatically and what else I need to do to display the updated table data
|
 |
 |
|
|
subject: Can I access pagecontext or session variables in an ajax service class?
|
|
|