This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with commandButton inside dataTable