f:ajax problem JSF
Posted
by Nitesh Panchal
on Stack Overflow
See other posts from Stack Overflow
or by Nitesh Panchal
Published on 2010-03-31T10:51:29Z
Indexed on
2010/03/31
10:53 UTC
Read the original article
Hit count: 543
jsf
This is my code :-
<p:carousel var="item" animate="true" circular="true" rows="2" effect="easeOutStrong" value="#{RegisterBean.objBlogTemplateList}">
<h:inputHidden id="hdnBlogTemplateId" binding="#{RegisterBean.hdnBlogTemplateId}" value="#{item.templateId}"/>
<h:graphicImage alt="#{item.templatePicName}" style="border: solid 5px white;width: 200px;height: 200px;" value="#{app:getCommonImagePath(item.templatePicName)}">
<f:ajax event="click" execute="hdnBlogTemplateId" listener="#{RegisterBean.setBlogTheme}"/>
</h:graphicImage>
</p:carousel>
This is my managed bean code :-
private HtmlInputHidden hdnBlogTemplateId;
public HtmlInputHidden getHdnBlogTemplateId() {
return hdnBlogTemplateId;
}
public void setHdnBlogTemplateId(HtmlInputHidden hdnBlogTemplateId) {
this.hdnBlogTemplateId = hdnBlogTemplateId;
}
public void setBlogTheme(AjaxBehaviorEvent e){
System.out.println("Hello");
//System.out.println(hdnBlogTemplateId.getValue());
//System.out.println(objGraphic.toString());
}
Hello is never printed in my console. Please help.
© Stack Overflow or respective owner