1 Reply Latest reply on Jul 31, 2006 9:10 PM by Gavin King

    Conversation List

    Chris Hane Novice

      Do I have to set a configuration parameter to get the conversationList populated in seam?

      I ask because I grabed the following code from the booking example (which I can deploy and works great on my machine). However, when I paste the following into my facelets xhtml, the conversation list is not generated:

       <h:form>
       <h:dataTable value="#{conversationList}" var="entry">
       <h:column>
       <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
      
       <h:outputText value="[current]" rendered="#{entry.current}"/>
       </h:column>
       <h:column>
       <h:outputText value="#{entry.startDatetime}">
       <f:convertDateTime type="time" pattern="hh:mm"/>
       </h:outputText>
       -
       <h:outputText value="#{entry.lastDatetime}">
       <f:convertDateTime type="time" pattern="hh:mm"/>
       </h:outputText>
       </h:column>
       </h:dataTable>
       </h:form>
      


      My facelet is the following. I have the conversationList in the same form and in it's own form. Niether form worked in my example.
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:c="http://java.sun.com/jstl/core"
       xmlns:t="http://myfaces.apache.org/tomahawk"
       xmlns:its="http://itsolut.com/jsf/components/taglib"
       xmlns:s="http://jboss.com/products/seam/taglib"
       template="/template.xhtml">
      
       <ui:define name="title">
       Fulfillment - #{conversation.id}
       </ui:define>
      
       <ui:define name="content">
       <h:form id="f1">
      
       <TABLE class="edit">
       <TR>
       <TD align='center' colSpan='5'>
       <div class="buttons">
       <h:commandLink action="#{editor.save}" value="Save" rendered="#{!bo$fulfill$editor.editDisabled}"/>
       </div>
       </TD>
       </TR>
       <TR>
       <!-- snip a bunch of stanard input/output fields -->
       </TR>
       </TABLE>
      
       <h:dataTable value="#{conversationList}" var="entry" rendered="#{not empty conversationList}">
       <h:column>
       <f:facet name="header">Workspace</f:facet>
       <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
       <h:outputText value="[current]" rendered="#{entry.current}"/>
       </h:column>
       <h:column>
       <f:facet name="header">Activity</f:facet>
       <h:outputText value="#{entry.startDatetime}">
       <f:convertDateTime type="time" pattern="hh:mm a"/>
       </h:outputText>
       <h:outputText value=" - "/>
       <h:outputText value="#{entry.lastDatetime}">
       <f:convertDateTime type="time" pattern="hh:mm a"/>
       </h:outputText>
       </h:column>
       <h:column>
       <f:facet name="header">Action</f:facet>
       <h:commandButton action="#{entry.select}" value="#{msg.Switch}"/>
       <h:commandButton action="#{entry.destroy}" value="#{msg.Destroy}"/>
       </h:column>
       </h:dataTable>
       </h:form>
       <h:form>
       <TABLE>
       <TR><TD>
       <h:selectOneMenu value="#{switcher.conversationIdOrOutcome}">
       <f:selectItems value="#{switcher.selectItems}"/>
       </h:selectOneMenu>
       <h:commandButton action="#{switcher.select}" value="Switch"/>
       <h:outputText value="NO CONVERSATIONS" rendered="#{empty conversationList}"/>
       <h:outputText value="HAVE CONVERSATIONS" rendered="#{not empty conversationList}"/>
       </TD></TR>
       </TABLE>
       <h:dataTable value="#{conversationList}" var="entry">
       <h:column>
       <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
      
       <h:outputText value="[current]" rendered="#{entry.current}"/>
       </h:column>
       <h:column>
       <h:outputText value="#{entry.startDatetime}">
       <f:convertDateTime type="time" pattern="hh:mm"/>
       </h:outputText>
       -
       <h:outputText value="#{entry.lastDatetime}">
       <f:convertDateTime type="time" pattern="hh:mm"/>
       </h:outputText>
       </h:column>
       </h:dataTable>
       </h:form>
       </ui:define>
      
      </ui:composition>