| java.lang.Object uk.org.ponder.rsf.state.ErrorStateManager
ErrorStateManager | public class ErrorStateManager (Code) | | Holds the token-related state which is stored DURING a request. After the
request is completed, some of this information may be copied to a
TokenRequestState entry for the token, stored in the TokenStateHolder.
Keyed by a token which identifies a view that has been presented to the user.
The token is allocated afresh on each POST, and redirected to a GET view that
shares the same token. If the POST is non-erroneous, the rsvc can be blasted,
however if it is in error, it will be kept so that the values can be
resubmitted back to the user. We should CHANGE the old behaviour that carried
along the old token - we simply want to make a new token and erase the entry
for the old one.
When a further POST is made again from that view, it should mark that token
as USED, possibly by simply removing the values from the cache.
When the user tries to make a submission from an erased token, there should
be some (ideally) application-defined behaviour. But in general we don't have
much option but to erase their data, since it will probably conflict somehow.
NB RequestStateEntry is now a request-scope bean.
author: Antranig Basman (antranig@caret.cam.ac.uk) |
globaltargetid | public String globaltargetid(Code) | | The id of the submitting control responsible for this POST cycle, if there
is one. This will be used to target the error messages delivered to the
following RENDER cycle.
|
allocateOutgoingToken | public String allocateOutgoingToken()(Code) | | |
requestComplete | public String requestComplete()(Code) | | Signal that all errors for this request cycle have been accumulated into
the current ese. It will now be cached in the tokenrequeststate for
reference by further requests, under the OUTGOING token ID, and cleared
from the current thread.
This is called at the end of both render and action cycles.
The error token ID to be used for the outgoing request, or null ifthere is no error. |
|
|