8 Replies Latest reply on Jul 21, 2006 1:01 PM by justinwalsh

    Problem starting converstaion and setting state from HTTP GE

    Eric Ray Novice

      I have a simple page using the standard login form using j_security_check. JBoss is configured to authenticate against an LDAP server. Once authenticated the <welcome-page> is rendered and it simply does this...

      <meta http-equiv="Refresh" content="0; URL=extract/index.jsf">

      When index.jsf is rendered I need some data retrieved from the database so I can display it immeditately. That's where I have a problem. I can't get the data loaded from the database and displayed in my page.

      I've tried all recommendations in Section 3.3 of the SEAM documentation. Nothing works. I'm sure I'm doing something wrong. Any ideas.

      Here's the code...
      public class PackageAction implements Package {
       private List<PackageEntity> packages = null;
       private EntityManager em;
       public PackageAction() {}
       @Begin(join=true) @Create
       public void load() {
       packages = em.createQuery("from PackageEntity").getResultList();
       @Destroy @Remove
       public void destroy() {}

      I even added a pages.xml file like so...
       <page view-id="/extract/index.jsf" action="#{package.load}"/>

      and that doesn't work either.

      Here's the web page...
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <f:view xmlns:h="http://java.sun.com/jsf/html"
       <f:loadBundle basename="bundle.packageTable" var="pkgHeaders" />
       <h:dataTable value="#{packages}" var="pkgEntity" styleClass="dataTableBody" headerClass="dataTableHeader"
       rowClasses="evenRow,oddRow" cellspacing="0">
       <f:facet name="header">
       <h:outputText value="#{pkgHeaders.id}" />
       <h:outputText value="#{pkgEntity.id}" />
       <f:facet name="header">
       <h:outputText value="#{pkgHeaders.status}" />
       <h:outputText value="#{pkgEntity.statusCode}" />
       <f:facet name="header">
       <h:outputText value="#{pkgHeaders.user}" />
       <h:outputText value="#{pkgEntity.user.username}" />

      Eric Ray