Problems with values refreshing.
doubledenim Aug 19, 2008 11:14 AMI've only just started messing about with seam and I'm still trying to get my head around how it operates. I've basically been making changes to a crud app i generated with eclipse.
I've got the following bit of code which is a select list with a bunch of articles in it and a data table which displays all results of related articles to a page (yes i'm trying to build an admin front end for my cms).
The problem I'm having is that the data table doesn't update after I've added values to the page via the select list. Is there anything i can/should be doing to make pageRelatedArticleList.getPageRelatedArticles(pageHome.instance.pageId)
get executed so the list can be updated?
<rich:tab label="related articles"> <h:form id="addArticle" styleClass="edit"> <rich:panel> <f:facet name="header">Add Faq Item</f:facet> <s:decorate id="articleDecoration" template="layout/edit.xhtml"> <ui:define name="label">article</ui:define> <h:selectOneMenu value="#{pageRelatedArticleHome.instance.article}"> <f:selectItems value="#{pageHome.relatedArticles}" /> <s:convertEntity /> </h:selectOneMenu> </s:decorate> <div style="clear:both"> <span class="required">*</span> required fields </div> </rich:panel> <div class="actionButtons"> <h:commandButton id="save" value="Save" view="/PageEdit.xhtml" action="#{pageRelatedArticleHome.persist(pageHome.instance)}"/> </div> </h:form> <rich:dataTable value="#{pageRelatedArticleList.getPageRelatedArticles(pageHome.instance.pageId)}" var="pageRelatedArticle" rendered="#{not empty pageHome.pageRelatedArticles}" rowClasses="rvgRowOne,rvgRowTwo" id="pageRelatedArticlesTable"> <h:column> <f:facet name="header">ID</f:facet> <h:outputText value="#{pageRelatedArticle.pageRelatedArticleId}"/> </h:column> <h:column> <f:facet name="header">articleId</f:facet> <h:outputText value="#{pageRelatedArticle.article.articleId}"/> </h:column> <h:column> <f:facet name="header">title</f:facet> <h:outputText value="#{pageRelatedArticle.article.title}"/> </h:column> <h:column> <f:facet name="header">action</f:facet> <s:link view="/#{empty from ? 'PageRelatedArticle' : from}.xhtml" value="Select" id="pageRelatedArticle"> <f:param name="pageRelatedArticlePageRelatedArticleId" value="#{pageRelatedArticle.pageRelatedArticleId}"/> </s:link> </h:column> </rich:dataTable> </rich:tab>