[jboss-user] [JBoss Seam] - Re: #{conversationList} appears to be empty
djfjboss
do-not-reply at jboss.com
Thu Sep 27 12:19:23 EDT 2007
Many thanks for your suggestions. In the light of this I've modified the XHTML to:
<rich:panel rendered="true">
<s:link value="Begin conversation"
action="#{personAction.beginConversation}" />
 
<s:link value="End conversation"
action="#{personAction.endConversation}" />
<f:facet name="header">Conversations</f:facet>
<f:subview id="conversations">
<ui:repeat value="#{conversationList}" var="conv">
ID: <h:outputText value="#{conv.id}"></h:outputText>
Descr: <h:outputText value="#{conv.description}"></h:outputText>
</ui:repeat>
</f:subview>
</rich:panel>
and the 'begin conversation' method to the following abomination:
@Begin(join=true)
public String beginConversation() {
Conversation c = Conversation.instance();
boolean started = c.begin();
log.info("### begun a new conversation: " + started);
ConversationEntries entries = ConversationEntries.instance();
log.info("### Have " + entries.size() + " conversations");
Collection cce = entries.getConversationEntries();
Iterator it = cce.iterator();
while (it.hasNext()) {
ConversationEntry ce = (ConversationEntry)it.next();
log.info("### Conversation id: " + ce.getId() + ", descr: " + ce.getDescription());
}
return null;
}
The log file now has entries such as:
17:09:31,788 INFO [PersonActionImpl] ### Beginning conversation
17:09:31,788 INFO [PersonActionImpl] ### begun a new conversation: false
17:09:31,788 INFO [PersonActionImpl] ### Have 2 conversations
17:09:31,788 INFO [PersonActionImpl] ### Conversation id: 5, descr: null
17:09:31,788 INFO [PersonActionImpl] ### Conversation id: 9, descr: null
Originally I was only displaying the description - seeing that this is null I thought that might explain the absence of output (even though I have given my pages a description in pages.xml), however as you can see the id is not null but still no output!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089395#4089395
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089395
More information about the jboss-user
mailing list