-
1. Re: RF 4.1.0 Final rich:pickList have a problem with composite components
jadtn Jan 3, 2012 6:04 PM (in response to hicranekdi)I have not exactly the same problem :
Use a picklist directely in a composite works form me:
<rich:pickList value="#{cc.attrs.ctrlVisi.selectedWestEurope}" defaultLabel="DEFAULT LABEL" targetCaption="TARGET CAPTATION" sourceCaption="SRC CAPTATION" disabled="#{!cc.attrs.ctrlVisi.userDatas.visibilityCtyFilter}" > <f:selectItems value="#{selectBean.countriesSelectEuropeOuest}" /> </rich:pickList>
But i have the same error like you if I use a composite of composite.
page-----use---->composite-----use -------->composite with picklist
Did you find the cause of your problem?
-
2. Re: RF 4.1.0 Final rich:pickList have a problem with composite components
hicranekdi Jan 3, 2012 8:23 AM (in response to jadtn)I used pickList like this:
in user.xhtml
<!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:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:aym="http://java.sun.com/jsf/composite/components">
<aym:report
list1="#{userBean.list1}"
list2="#{userBean.list2}" />
</ui:composition>
in report.xhtml
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:aym="http://java.sun.com/jsf/composite/components">
<composite:interface>
<composite:attribute name="list1" required="true" />
<composite:attribute name="list2" required="true" />
</composite:interface>
<composite:implementation>
<rich:pickList value="#{cc.attrs.list2}" sourceCaption="Available cities" targetCaption="Selected cities" listWidth="165px" listHeight="100px" orderable="true">
<f:selectItems value="#{cc.attrs.list1}" var="capital" itemValue="#{capital}" itemLabel="#{capital.name}" />
</rich:pickList>
</composite:implementation>
</html>
-
3. Re: RF 4.1.0 Final rich:pickList have a problem with composite components
bleathem Jan 3, 2012 6:12 PM (in response to hicranekdi)Have you tried specifying the type of the <composite:attribute>?
Would you mind filing a jira issue for this, with a self-contained simplest possible example that reproduces this behaviour?
Thanks
Brian Leathem
-
4. Re: RF 4.1.0 Final rich:pickList have a problem with composite components
jadtn Jan 5, 2012 6:30 AM (in response to bleathem)It's works for me, it's an error from my code, i simply pass a list in parameter of my component for the source and target. Now I 've put the list in a wrapper and i pass the wrapper as paramerter of my component, it s works.
-
5. Re: RF 4.1.0 Final rich:pickList have a problem with composite components
hicranekdi Jan 5, 2012 7:04 AM (in response to jadtn)Sorry, I forgot to say click the button. I rewrite the example code.
in user.xhtml
<!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:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:aym="http://java.sun.com/jsf/composite/components">
<rich:panel styleClass="anaPanel">
<aym:user-report list1="#{kullaniciBean.kullaniciRolleri}"
list2="#{kullaniciBean.sistemRolleri}"
raporOlustur="#{kullaniciBean.raporOlustur}" />
</rich:panel>
</ui:composition>
in user-report.xhtml
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:aym="http://java.sun.com/jsf/composite/components">
<composite:interface>
<composite:attribute name="list1" required="true" />
<composite:attribute name="list2" required="true" />
<composite:attribute name="raporOlustur"
method-signature="void action()"></composite:attribute>
</composite:interface>
<composite:implementation>
<rich:pickList value="#{cc.attrs.list2}"
sourceCaption="Available roles" targetCaption="Selected roles"
listWidth="165px" listHeight="100px" orderable="true">
<f:selectItems value="#{cc.attrs.list1}" var="rol" itemValue="rol"
itemLabel="#{rol.adi}" />
</rich:pickList>
<h:commandButton value="Report"
styleClass="aymButton" action="#{cc.attrs.raporOlustur}">
</h:commandButton>
</composite:implementation>
</html>
When click the Report button, this error message appeared on the browser.
An Error Occurred:
ModelType (class java.lang.Object) must be either an Array, or a Collection
+ Stack Trace
+ Component Tree
+ Scoped Variables
-
6. Re: RF 4.1.0 Final rich:pickList have a problem with composite components
kwutzke Mar 1, 2012 12:00 PM (in response to hicranekdi)I have the same problem, however without using composite components.
Were you able to locate the problem? Did you find a workaround?
Karsten
-
7. Re: RF 4.1.0 Final rich:pickList have a problem with composite components
kwutzke Mar 1, 2012 6:42 PM (in response to kwutzke)Hmmm I was able to solve this for me. Maybe it helps: I forgot to pass several ui:param's to my ui:included subview or at least some had invalid names, so maybe you can look into that direction.
Karsten -
8. Re: RF 4.1.0 Final rich:pickList have a problem with composite components
christophe2 Jun 25, 2012 9:21 AM (in response to hicranekdi)Opened an issue here: