• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dynamic JSF, programatically adding components

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post your .xhtml file
 
Rui Azevedo
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


This may shed some light... in the right direction ... i hope ;-)

For PrimeFaces i do the following...




Full example in this blog post
 
Whatever you say buddy! And I believe this tiny ad too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic