I'm not sure what you're asking.
First, the client-side is memoryless, so no state is saved on the client. It's like flash memory that's erased every time information is submitted to the server.
Anything that is "remembered" has to be saved on the server-side, usually in a session bean.
For example, suppose you display a page with a textfield and a submit button. Suppose also that the server echoes what the user typed in the textbox on a different page.
When the user clicks the submit button, the contents of the textfield are sent to the server. At this point the client's memory is essentially erased. The server has to figure out what to do with the information it receives. When the server gets this information from the client, the server can save it so it can be retrieved later. The server creates the content of the next page and sends it to the client.
In this example, the client has no idea that the next page reflects what was in the textfield. In fact, the client has no recollection of the textfield.
Thanks for your responses
Here is the issue i was having:
On my page I have 2 radio buttons with Auto-submit on change activated for the 2 radio buttons, if any of the 2 radio button is check its sets some values picked from the database to some static text components,the logic is working fine but after clicking any of the radio button alternatively for some time it throws an IndexOutOfBoundsException, here is the error page below:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Index: 0, Size: 0
javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
root cause
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.util.ArrayList.RangeCheck(ArrayList.java:547)
java.util.ArrayList.remove(ArrayList.java:387)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:253)
javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:307)
com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase .java:79)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
And this is the advise someone give me:
This looks like simultaneous access from multiple threads active in the CachedRowSet instance at the same time, generated in this case by toggling the radio buttons rapidly enough to generate this state.
This is inherent in the JSF implementation. A workaround would be to change component state saving from client side to server side if this is acceptable for the application.
Hi,
> This looks like simultaneous access from multiple threads active in the
> CachedRowSet instance at the same time, generated in this case by
> toggling the radio buttons rapidly enough to generate this state.
>
> This is inherent in the JSF implementation. A workaround would be to
> change component state saving from client side to server side if this is
> acceptable for the application.
I'm facing exactly the same problem.
You can change component state saving in your web.xml:
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
However, this won't solve simultaneous acces problem.
regards
Grzegorz