I have a userProfileBean which I can access outside of the repeat but when I do
<ui:repeat id="reqlistID" var="reqlist" value="#{userProfileBean.friendRequestsList}">
jmeno: #{reqlist.jmeno} <br/> prijmeni: #{reqlist.prijmeni} <br/> id: #{reqlist.id} <br/>
<p:commandButton id="allowFriendButton"
action="#{userProfileBean.allowFriend()}"
value="Přidat"
update="reqlistID">
</p:commandButton>
Then the allowFriend method doesn't get called and netbeans says unknown property. Am I missing something?
Edit: thanks for the replies. Still doesn't work. Now the state is this.
<h:form>
<p:commandButton id="allson"
action="#{userProfileBean.testt()}"
value="Přidat"
ajax="false">
</p:commandButton>
</h:form>
<c:if test="#{principalBean.p.login == userProfileBean.name}">
Žádosti přidání do přátel:<br/>
<ui:repeat id="reqlistID" var="reqlist" value="#{userProfileBean.friendRequestsList}">
jmeno: #{reqlist.jmeno} <br/> prijmeni: #{reqlist.prijmeni} <br/> id: #{reqlist.id} <br/>
<h:form>
<p:commandButton id="allowFriendButton"
action="#{userProfileBean.testt()}"
value="Přidat"
ajax="false">
</p:commandButton>
</h:form>
<br/>
</ui:repeat>
</c:if>
The first <p:commandButton>
works and calls the method properly (with page reload). The second button reloads the page but does not call the method. The problem seems to be with accessing the userProfileBean from inside the repeat. But I can't google out any explanation.