myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "simon.kitching@chello.at" <simon.kitch...@chello.at>
Subject Re: getting java.util.NoSuchElementException occasionally
Date Wed, 07 May 2008 15:31:06 GMT
Nitin Deshmukh schrieb:
> ok... it sounds better than what I currently have. two question though - will right click
on a commandLink cause the action of the link to be executed, because in current scenario
it doesn't?  second question - will it pass the parameters in case of right click if I have
any?
>
> currently, how I do things is - I have a param in each of the commandLinks and the links
point to the same action. on the basis of the param received, I decide the action to be performed
and return to a page. In this situation, if user right clicks on any of the links, the action
is not performed and the parameter is not passed. instead it opens the new window in the previous
page.

Plain JSF will not execute any actions on a GET http operation; the only
thing it does for a GET is to render the page.

This also happens to be the recommended behaviour for RESTful webapps;
GET is supposed to be an operation that does not change any system state.

I think this is also the cause of your "render the previous page" issue.
When the user clicks normally on the link, what happens is actually a
form postback; this triggers an action method that then performs
navigation to the next page.  But when the user right-clicks on the
link, what happens is a GET; this does not trigger any action methods,
so no nagivation to the "next page" takes place. Instead, the current
view gets rendered again.

Regards,
Simon


Mime
View raw message