aspose file tools*
The moose likes JSF and the fly likes Hash Map containing a list in managed-bean config file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Hash Map containing a list in managed-bean config file" Watch "Hash Map containing a list in managed-bean config file" New topic
Author

Hash Map containing a list in managed-bean config file

prasad kolla
Greenhorn

Joined: Jul 19, 2008
Posts: 12
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>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hash Map containing a list in managed-bean config file