• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Hash Map containing a list in managed-bean config file

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

Is there a way we can define a map containing a list in the faces-config.xml file. I have tried the following way it gives a parse exception.
Hash map contains a key, "value" pair and it expects "value" to be string.

can i place a list inside "value"?

<managed-bean>
<managed-bean-name>buttonMap</managed-bean-name>
<managed-bean-class>java.util.HashMap</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
<map-entries>
<key-class>java.lang.String</key-class>
<value-class>java.util.List</value-class>
<map-entry>
<key>pagename</key>
<value>
<list-entries>
<value-class>java.lang.String</value-class>
<value>value1</value>
<value>value2</value>
<value>value3</value>
</list-entries>
</value>
</map-entry>
</map-entries>
</managed-bean>
 
Do not threaten THIS beaver! Not even with this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic