私はPrimefaces 6.1を学習しており、ui:repeat
コンポーネントを更新したいと考えています。 Alexandre's answerによれば、h:panelGroup
のように、コンポーネント内にui:component
をラップする必要があります。私はプロジェクトを実行するときただし、エラーがあると言う:コンポーネントのblogList "コンポーネントの式が見つかりません
誰もが知っている理由のため
式を見つけることができませんか?以下は私のコードの一部です。
<h:form> <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5" > <h:outputLabel value="Keyword: " for="keyword" /> <p:inputText id="keyword" class="searchbox" value="#{viewManagedBean.keyword}"></p:inputText> <p:commandButton value="Search" actionListener="#{viewManagedBean.search(event)}" update="blogList"/> </h:panelGrid> <h:panelGroup id="blogList"> <ui:repeat value="#{viewManagedBean.guestBlogs}" var="blog"> <p:panel id="toggleable" header="#{blog.title}" footer="Created Date:#{blog.createdTime}" widgetVar="panel" style="margin-bottom:20px"> <h:outputText escape="false" value="#{blog.body}" style="font-weight: bold"/><hr /> </p:panel> </ui:repeat> </h:panelGroup> </h:form>
こんにちは、質問ごとに1つ質問してください...そして、https://www.google.nl/search?q=cannot+find+expression+for+component+jsfで提供されるリンクを試しましたか? – Kukeltje
'widgetVar'がユニークでなければならないので' guestBlogs.size()> 1'ならば 'widgetVar =" panel "'はうまくいきません –
@Kukeltjeええ、私は試しました:blogList、まだできません。しかし、私は午後にもう一度試してみるとうまくいきます。 –