繰り返しの外でアクセスできる userProfileBean がありますが、そうすると
<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>
次に、allowFriend メソッドが呼び出されず、netbeans が不明なプロパティを示します。何か不足していますか?
編集:返信ありがとうございます。それでもうまくいきません。今はこんな状態です。
<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>
最初の<p:commandButton>
ものは機能し、メソッドを適切に呼び出します (ページのリロードあり)。2 番目のボタンはページをリロードしますが、メソッドは呼び出しません。問題は、繰り返し内から userProfileBean にアクセスすることにあるようです。しかし、説明をググることはできません。