File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "What component should I use?" Watch "What component should I use?" New topic
Author

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

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

Joined: Aug 31, 2012
Posts: 12
You could try PrimeFaces datatable with expandable rows:
http://www.primefaces.org/showcase/ui/datatableExpandableRows.jsf
Marco Noronha
Ranch Hand

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

Joined: Jun 25, 2001
Posts: 16160
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What component should I use?