Why does IceFaces seem to be eating my get request?
I have an IceFaces page which is powered by several Request scoped beans. When I make an initial GET request, I grab the external context via the faces context grab a GET parameter and use it to initialize my beans in their @PostConstruct
method.
However, if I try to link to the same page with a different get parameter, it seems to be eating my request and treating it as a postback. None of the request scoped beans go out scope (exactly like they don't go out of scope on a post back) and the new value is ignored.
How do I get i开发者_如何学Got to treat my link as a brand new request which needs new request scoped beans?
Use h:outputLink
instead of h:commandLink
.
By the way, a <managed-property>
in faces-config.xml
is the preferred way for setting GET parameters in a managed bean. Whenever you need to get ExternalContext
in a managed bean, then it's time to think twice if there aren't other builtin and more transparent ways to achieve the same.
精彩评论