File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes What component should I use? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "What component should I use?" Watch "What component should I use?" New topic

What component should I use?

Marco Noronha
Ranch Hand

Joined: Oct 30, 2012
Posts: 50
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

Id - 1
Description - Person Identifier

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)!!

Vladimir Mokrozub

Joined: Aug 31, 2012
Posts: 12
You could try PrimeFaces datatable with expandable rows:
Marco Noronha
Ranch Hand

Joined: Oct 30, 2012
Posts: 50
Vladimir Mokrozub wrote:You could try PrimeFaces datatable with expandable rows:

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

Joined: Jun 25, 2001
Posts: 17280

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: What component should I use?
It's not a secret anymore!