I have created one demo application containing a single table with 5 columns. First row contains employee id along with an image. What i want is whenever i click on the table row the image corresponds to that row gets change to another image. could you please tell me how? I am using Jdeveloper12 version
af|image.customImage
{
background: url("../../Images/Search.png");
background-repeat: no-repeat;
width: 20pt;
height: 20pt;
}
af|image.customImage
{
background: url("../../Images/icTickActive.png");
background-repeat: no-repeat;
width: 20pt;
height: 20pt;
}
I have created a bean class and bind the StyleClass property of image into the style variable declared on the bean class.
public class SelectionBean {
public SelectionBean() {
}
private String imageStyle="customImageChecked";
public void setImageStyle(String imageStyle) {
this.imageStyle = imageStyle;
}
public String getImageStyle() {
return imageStyle;
}
public void changeImage(SelectionEvent selectionEvent) { //table selectionlistener event
if(imageStyle.equals("customImage")) {
setImageStyle("customImageChecked");
}else {
setImageStyle("customImage");
}
}}
could anyone please help me to correct my mistake???
您可能需要在表和图像之间添加partialTrigger连接,以便在选择行时图像将刷新。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.