File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Problem with commandButton inside dataTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with commandButton inside dataTable" Watch "Problem with commandButton inside dataTable" New topic
Author

Problem with commandButton inside dataTable

                      
Greenhorn

Joined: Apr 10, 2008
Posts: 7
I have a dataTable, inside that i have one commandButton for each row. When i click the commandButton, it is not calling the action method/actionListener. My managed bean is in request scope. If i change the scope to session scope, it will work. But i cannot set the scope to request scope according to the requirement. Any work around for this?
                      
Greenhorn

Joined: Apr 10, 2008
Posts: 7
Finally I got a good and simple solution for this.

I used the Ajax 4 JSF's keepAlive tag. So it will keep keeping the bean in the subsequent requests.

You can use actionListener for getting which row is selected.

<a4j:keepAlive beanName="requestScopedBean" ajaxOnly="false"></a4j:keepAlive>
Piya Bahendra
Greenhorn

Joined: Dec 25, 2008
Posts: 1
Hi,
Is it possible to use Ajax 4 JSF's keepAlive tag in websphere portal 6.0?

Thanks




Originally posted by Green Beret:
Finally I got a good and simple solution for this.

I used the Ajax 4 JSF's keepAlive tag. So it will keep keeping the bean in the subsequent requests.

You can use actionListener for getting which row is selected.

<a4j:keepAlive beanName="requestScopedBean" ajaxOnly="false"></a4j:keepAlive>
 
GeeCON Prague 2014
 
subject: Problem with commandButton inside dataTable