You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by "Baker,Jonathan" <Ba...@oclc.org> on 2007/02/27 18:25:19 UTC
View Controller postbacks
I am having an issue where new pages are returning true from the
isPostback method.
I was looking at the source for ViewHandlerHandler, and saw that the
setupViewController method sets a context parameter if the view is a
postback
// Cache the postback flag so that it can be used inside
// the AbstractViewcontroller implementation
if (postBack) {
context.getExternalContext().getRequestMap().
put(FacesConstants.VIEW_POSTBACK, Boolean.TRUE);
}
I believe the problem I am seeing, is that this context parameter is not
removed if postback is false.
E.g.
if (!postBack) {
context.getExternalContext().getRequestMap().
remove(FacesConstants.VIEW_POSTBACK);
}
When I go to a new page, createView is being called, so
setupViewController is being called with postback=false. Unfortunately,
the context already contains the VIEW_POSTBACK variable from the
previous page, that we reloaded when I clicked the commandLink to come
to the new page.
I am using standalone-tiles and trinidad if that makes any difference.
I found this jira issue but it was changed to not a problem:
https://issues.apache.org/struts/browse/SHALE-284
JB