Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Creating gridview dynamically with hierarchy of depth N
posted

Hi,

I would like to know is there any way to create a webgridview with hierarchical structure with depth of hierarchy as N(ie provided at runtime). If so pls provide me sample jsp, backingbean, dao, faces-config.xml and other relevant data.

For example, if I pass N value as 2, it should display parent(expandable), children(expandable), grandchildren data. If I pass N value as 1, it should display parent(expandable) and children 

 

Parents
  • 2301
    posted

     Hi:

    Yes you can certainly do that. The components can be constructed dynamically on the server s that there is little or no dependency on the tags i the jsp. Basically, you would have a gridView tag with no child tags, and a binding attribute pointing to a server-side method that would deliver your dynamically hierarchical grid.

    Honestly, thi is not somehting I'd recommend for anyone who is new to JSF, but it can definitely be done.

    Thanks,
    Jim

Reply Children