Any idea why attribute "collectionType" gets ignored?

UI Components for JSF
Post Reply
AndrewGr
Posts: 19
Joined: 22 Mar 2016, 08:49
Location: Hong Kong

17 Aug 2017, 20:41

Hi everyone,

have the following code:

Code: Select all

<p:selectCheckboxMenu id="sysRole" value="#{bean.modelDS.roles}" label="#{labels['general.role']}" multiple="true" filter="false" panelStyle="width:250px">
    <f:attribute name="collectionType" value="java.util.ArrayList" />
    <f:selectItems value="#{bean.allRoles}" />
</p:selectCheckboxMenu>
:? :?:
But mysteriously <f:attribute name="collectionType" value="java.util.ArrayList" /> is ignored and this and other similar components like <p:selectManyCheckbox/> anyway return object of type String[] .

I have another project where attribute "collectionType" worked like a charm, but today got this weird case...

Few notes:
1) value="#{bean.modelDS.roles}" actually binds to model which extends Map, so all getters/setters work via Object get(String) / put(String, Object) methods (not sure whether it is relevant ?!;
2) Payara 4.1.2.172 with manually updated JSF to v2.3.2

Will also try later on other project / JSF version, but currently will be very thankful for any ideas what to check!

Thank you!
Last edited by AndrewGr on 17 Aug 2017, 20:46, edited 1 time in total.
Best regards,
Andrew

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

17 Aug 2017, 20:45

PrimeFaces never implemented such a feature - probably it's only supported during inheritance from UISelectMany.
If it doesn't work for you, try to ask the mojarra guys. Could also be a bug in a newer mojarra version ;)
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

AndrewGr
Posts: 19
Joined: 22 Mar 2016, 08:49
Location: Hong Kong

17 Aug 2017, 20:48

Thank you for quick response! Yep, I have noticed that there is nothing about "collectionType" attribute could be found in PrimeFaces sources, only in JSF source.
Just was wondering - maybe I am missing something this time... As before it was working absolutely fine (in another project)!
Best regards,
Andrew

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests