This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSF and the fly likes Dynamic JSF, programatically adding components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Dynamic JSF, programatically adding components" Watch "Dynamic JSF, programatically adding components" New topic
Author

Dynamic JSF, programatically adding components

Rui Azevedo
Greenhorn

Joined: May 30, 2010
Posts: 20
Hey guys!

In a project I'm ivolved in I have to dynamically add some components. All was going well until I had to generate data tables dynamically. I'm iterating a list of "SomeObject" and when I try to access a property of that object Glassfish tells me that object doesn't have such a property that is readable. I have getters for those properties and SomeObject implements Serializable as well. I used BalusC resources but I'm having no luck. Tell me if you need any more detail. Thanks.
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Please post your .xhtml file
Rui Azevedo
Greenhorn

Joined: May 30, 2010
Posts: 20
Hmm.. My .xhtml is this:


and this is the DynamicForm bean:


And this is the data table component, the one that's giving me problems:


The addComponent method ignores the bindingValue parameter, and the selectableOptions here evaluates to a list a of KeyValueItem. Which I present next:


When i try to run the project Glassfish tells me KeyValueItem doesn't have a readable property 'chave'.

It's a lot of code to go through, so if you can sort through it you have my deepest thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic JSF, programatically adding components
 
Similar Threads
Object, load thyself!
null == someobject
Vector and ArrayList Behavior got me in a loop...
Object memory
Sorted TreeSet from HashSet