File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 17417

Duplicate. Locked.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Issue with command button image in data table.
It's not a secret anymore!