Hi
I have a page with a jqgrid and my own search form. Nothing fancy, just
an input box, submit button and clear button. I'm trying to implement
so that the following can happen:
* User enters search phrase and clicks submit - Grid is refetched
displaying filtered results
* User can double-click on a row to go to a new page to edit the record
* User returns to search page and previous search phrase is redisplayed
in search field and list is filtered
* User can click on the Clear button to clear the search and redisplay
results with no filtering
* If user leaves the page and returns the search phrase is forgotten
and full list is displayed
I'm implementing this currently saving the name of the page and the last
used search phrase in session variables.
It is all working as desired except that when I click on the Clear
button my code (called via JQuery using script below) resets my session
variables to ''. The problem is that my change to the session variables
do not get saved somehow.
$("#list").setGridParam({postData:{'searchText':'..clear..'}});
$("#list").trigger("reloadGrid");
$("#searchText").val('');
So, my question is - Am I understanding correctly that session variables
are valid for my 'session' and are not function-specific? Also, would
the fact that I'm setting the session variables back to their default in
a function with the "@service.json" decorator change the behavior of the
session object and cause my changes to not be saved?
Any pointers would be appreciated.
-Jim