java - <h:commandButton> inside <c:forEach> doesn't trigger method -
this question has answer here:
i'm beginner jsf , i've small problem, if use h:commandbutton inside c:foreach doesn't trigger method if use outside c:foreach works. in code below "first test" works not "second test".
do guys have idea why doesn't work?
thanks in advance
<p:panel> <h:panelgrid id="searchresult"> <!-- first test --> <h:commandbutton value="id" action="#{database.addshow(257655)}"> <f:ajax execute="@this"/> </h:commandbutton> <!-- second test --> <c:foreach items="#{thetvdb.series}" var="item"> <h:panelgroup styleclass="searchresultelement" layout="block"> <h:outputtext value="#{item.name}"/><br/> <h:graphicimage value="#{item.banner}" /> <h:commandbutton value="#{item.id}" action="#{database.addshow(257655)}"> <f:ajax execute="@this"/> </h:commandbutton> </h:panelgroup> </c:foreach> </h:panelgrid> </p:panel>
update : answer in topic doesn't work
Comments
Post a Comment