This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JSF and the fly likes Issue with command button image in data table. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Reply locked New topic

Issue with command button image in data table.

prasad kakani
Ranch Hand

Joined: Jul 15, 2008
Posts: 59
Hi ,

I have a data table, where it contains 4 columns and 4 rows. each row has one image button column.On click of this image, on a perticuler row, the image should be changed to another image. But issue is all images in all rows are getting changed on click of image in a perticuler row .How this can be achieved. so that only that clicked image should be changed.

For a command button tag, we have a action listener, that calls the some method, inside the method we can get the command button from the binded datatable by using getChildrens, and setting the image and adding this button back to datatable. Is this correct approch are not?

Help would be greatly appreciated.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16897

Duplicate. Locked.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Issue with command button image in data table.
It's not a secret anymore!