This content has been marked as final.
Show 8 replies
-
1. Re: ListShuttle with Entities and Seam
trouby Jan 1, 2008 10:12 AM (in response to trouby)Eh, looks like it's working without any special coding :)
Thanks. -
2. Re: ListShuttle with Entities and Seam
seammm Jan 28, 2008 6:57 PM (in response to trouby)trouby - do you mind sharing how u used the entityconverter with list shuttle. i am writing converters for everything (that i will put into list shuttle) here. thanks.
-
3. Re: ListShuttle with Entities and Seam
franciscoacb Mar 7, 2008 7:36 AM (in response to trouby)Hi!
<rich:listShuttle var="papel" sourceValue="#{papelList.resultList}" targetValue="#{usuarioHome.instance.papeis}" sourceCaptionLabel="Permissões disponÃÂÂveis" targetCaptionLabel="Permissões atribuÃÂÂdas" copyAllControlLabel="#{messages.CopiarTudo}" copyControlLabel="#{messages.Copiar}" removeAllControlLabel="#{messages.RemoverTudo}" removeControlLabel="#{messages.Remover}" orderControlsVisible="false" fastOrderControlsVisible="false" converter="#{org.jboss.seam.ui.EntityConverter}"> <rich:column>#{papel}</rich:column> </rich:listShuttle>
Cheers,
Francisco Barros
"Although nobody can come back and make a new start, anyone can start now and make a new end." (Chico Xavier, Brazil's most famous medium) -
4. Re: ListShuttle with Entities and Seam
joseberardo Jan 18, 2009 3:13 PM (in response to trouby)Francisco,
Hi!
Code:
<rich:listShuttle var="papel" sourceValue="#{papelList.resultList}" targetValue="#{usuarioHome.instance.papeis}"
sourceCaptionLabel="Permissoes disponiveis" targetCaptionLabel="Permissoes atribuidas"
copyAllControlLabel="#{messages.CopiarTudo}" copyControlLabel="#{messages.Copiar}"
removeAllControlLabel="#{messages.RemoverTudo}" removeControlLabel="#{messages.Remover}"
orderControlsVisible="false" fastOrderControlsVisible="false"
converter="#{org.jboss.seam.ui.EntityConverter}
">
<rich:column>#{papel}</rich:column>
</rich:listShuttle>
It doesn't work with me.
I'm getting java.lang.IllegalArgumentException. -
5. Re: ListShuttle with Entities and Seam
nbelaevski Jan 18, 2009 4:45 PM (in response to trouby)Try using <s:convertEntity />
-
6. Re: ListShuttle with Entities and Seam
joseberardo Jan 18, 2009 7:22 PM (in response to trouby)It didn't work too
-
7. Re: ListShuttle with Entities and Seam
meetoblivion Jan 18, 2009 7:49 PM (in response to trouby)how do you have your entity manager configured in seam? i believe s:convertEntity requires you to use the @In style, and only one entityManager bound to the name "entityManager"
-
8. Re: ListShuttle with Entities and Seam
joseberardo Jan 19, 2009 4:23 AM (in response to trouby)My bean:
@Name("perguntasAction")public class PerguntasAction { @In private EntityManager entityManager; @In private FacesMessages facesMessages; @Logger private Log log; @DataModel private List<Pergunta> perguntas; @DataModelSelection private Pergunta perguntaAtual; @Factory(value="perguntas") public void loadPerguntas() { perguntas = entityManager.createQuery("from Pergunta") .getResultList(); } }
My view:<rich:orderingList value="#{perguntas}" var="_pergunta"> <s:convertEntity></s:convertEntity> <rich:column> <f:facet name="header">Id</f:facet> <h:outputText value="#{_pergunta.id}" /> </rich:column> </rich:orderingList>
In this case, I'm using an orderingList, but I'm having the same error (IllegalArgumentException) using listShuttle