Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

What component should I use?

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
if you think brussel sprouts are yummy, you should try any other food. And this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic