• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How to create a tree component in JSF

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I am using JSF with Facelets with Spring web-flow.I want to create a tree which is equivalent to ICEFaces' <ice:tree> .I don't want to use ICEFaces. Please help me to solve this.
 
author and cow tipper
Posts: 5001
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy Greeenhorn! Welcome to the ranch. And that's a great question - not an uncommon one.

So, you have a design that you want, and it's a design that largely relies on JavaScript, correct? I mean, all of those trees that expand and contract are largely JavaScript running on the client machine, with the occassional call back to the server.

How are you going to do it? Well, as you mentioned, many JSF extensions like IceFaces provide that type of functionality. But you don't want to use IceFaces, which is understandable. But, you still need that functionality! Well, you're going to have to write it yourself, and perhaps put the code in your own custom tag - essentially, you'll write your own component that is very similar to the IceFaces one. I mean, how else could you really do it.

You can get the source for IceFaces. If you're looking to roll your own, you may as well leverage what people much better looking than you and me have already coded and tested. But really, if you're not going to use a third-pary library, well, then you'll have to write one on your own.

Keep posting question! And if I said something you disagree with, please challenge it. That way we all get the very best out of this message forum.

-Cameron McKenzie
 
Saloon Keeper
Posts: 24325
167
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
Funny you should ask. I'm looking at the source code of the RichFaces tree control right now.

RichFaces has a very nice development kit with a decent manual to tell how to use it. But custom JSF controls are not for the "All you have to do is/Git 'R Dun" crowd. Even "simple" JSF controls can be pretty complicated and nasty, and if you want the level of interactivity that you'd get from JavaScript support....

Let's put it this way. I've done custom JSF controls before. I'm subclassing a control that's mostly already complete - it's mainly just a matter of changing the look and feel.

I doubt I'll get it "Dun" in less than a week.

Unless there's a really compelling reason, Don't Reinvent it Yourself (DRY).
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic