[jboss-user] [JBoss Seam] - problem using the pages.xml to call action method?
FredF
do-not-reply at jboss.com
Thu Dec 21 10:08:50 EST 2006
Hello all.
I am having problem using the action attribute in the page element in the file pages.xml.
I have a view-file which has a form and a datatable element.
I want to populate this datatable with data from a seam component when the user loads the page, not in the response of the form submit.
I have defined a method initAllMessages that populates my list (my list has @Out @DataModel) with data
and I use that list in the datatable
<h:dataTable value="#{allMessages}" var="message">
| <h:column>
| <h:outputText value="#{message.text}" />
| </h:column>
| </h:dataTable>
I instruct seam to call the initAllData with the action parameter
in a page element in pages.xml like this:
<pages>
| <page view-id="/input.jsp" action="#{post.initAllMessages}" />
| </pages>
The problem is that I get an exception:
2006-12-21 10:42:39,640 ERROR [org.jboss.portal.portlet.container.org_apache_myfaces_portlet_MyFacesGenericPortlet] The portlet threw an exception
javax.faces.el.EvaluationException: Exception while invoking expression #{post.initAllMessages}
The class in where I define my method to call implements an interface, has conversation scope and the Name annotation. The method it self has the @Create annotation
The seam view-file is loaded in a portlet contained in JBoss Portal.
Why am I getting this exception when seam tries to call the method?
Is there better/another way to populate data in a datatable on a non-faces get request?
thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995620#3995620
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995620
More information about the jboss-user
mailing list