Here it is. Also, when more then one element in the list the suggestionBox 
stops working.

<rich:dataTable id="cardList" var="card" value="#{cardList.resultList}"
  |                             rendered="#{not empty cardList.resultList}"
  |                             width="300px">
  |                     
  |                             <h:column>
  |                                     <f:facet name="header">Id</f:facet>
  |                                     <h:outputText>#{card.id}</h:outputText>
  |                             </h:column>
  |                             <h:column>
  |                                     <f:facet name="header">Name</f:facet>
  |                                     <s:link id="card" value="#{card.name}" 
view="/card.xhtml"
  |                                             propagation="">
  |                                             <f:param name="cardId" 
value="#{card.id}" />
  |                                     </s:link>
  |                                     <rich:panel rendered="#{not empty 
card.tagLinks}" id="tagsPanel">
  |                                             
<h:outputText>Tags:</h:outputText>
  |                                             <a4j:repeat id="detail" 
value="#{card.tagLinksAsList}" var="detail">
  |                                                     <h:outputText 
value="#{detail.tag.name} " />
  |                                             </a4j:repeat>
  |                                             <h:messages />
  |                                     </rich:panel>
  | 
  |                                     <h:form>
  |                                             <rich:panel>
  |                                                     <h:panelGrid 
columns="2">
  |                                                             <h:panelGroup>
  |                                                                     
<h:inputText value="#{tagHome.instance.name}" id="suggestion" />
  |                                                                     
<rich:suggestionbox for="suggestion"
  |                                                                             
suggestionAction="#{tagHome.autocomplete}" var="tag"
  |                                                                             
tokens="," width="200" height="100"
  |                                                                             
frequency="1000"
  |                                                                             
>
  |                                                                             
<h:column>
  |                                                                             
        <h:outputText value="#{tag.name}" />
  |                                                                             
</h:column>
  |                                                                             
<h:column>
  |                                                                             
        <h:outputText value="#{tag.id}" />
  |                                                                             
</h:column>
  |                                                                     
</rich:suggestionbox>
  |                                                                     
  |                                                             </h:panelGroup>
  |                                                             
<a4j:commandButton value="Add Tag" reRender="tagsPanel" 
action="#{tagHome.persist}">
  |                                                                     
<a4j:actionparam name="cardID" value="#{card.id}"
  |                                                                             
assignTo="#{tagHome.cardID}" />
  |                                                             
</a4j:commandButton>
  |                                                     </h:panelGrid>
  |                                             </rich:panel>
  |                                     </h:form>
  | 
  |                             </h:column>
  |                     </rich:dataTable>

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114487#4114487

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114487
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to