Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What component should I use?

 
Marco Noronha
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guys!

Guys, I have an entity that was one relationship many to many with another entity. Lets say:
person <--> document

And In that n-n relationship I hve an attribute like:
- documentValue

Imagine:
Document
Id - 1
Description - Person Identifier

Person:
Id - 293
Name - Optimus Prime


AND the relationship means:

personID - 293
documentID - 1
documentValue - 10024512414

.. and so on.

Now I need a component that alows to show me for ALL the documents from all "persons".
Like a datatable... Or something like that.

The problem is:
One person can have 1 document
and anothe person can have 20 documents.

How to show that nicely on the view? PS: its not mandatory that all documents have to be shown by default.
I can just show them when I click on a button, or do something like that. It would be better if I could show them all
in a pretty way, and paginated way (lazy loading)!!

Thankss!
 
Vladimir Mokrozub
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try PrimeFaces datatable with expandable rows:
http://www.primefaces.org/showcase/ui/datatableExpandableRows.jsf
 
Marco Noronha
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vladimir Mokrozub wrote:You could try PrimeFaces datatable with expandable rows:
http://www.primefaces.org/showcase/ui/datatableExpandableRows.jsf


that was my first try...but the toggle event is called after the content is rendered.. So i always get a null pointer.

So now I donĀ“t know how to do it
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18214
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not up on PrimeFaces, but I would suspect that they provided some sort of AJAX post-action re-rendering option for toggle buttons.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic