This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

How to set the icon for JSF Tree Node in the backing bean

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am adding the tree nodes dynamically in the prerender method of the backing bean to the JSF Tree. The nodes are getting added successfully but the icon is not visible.

The icons are visible for the nodes that are added to the JSF Tree using the netbeans editor. The following code is added the JSF tag of the tree node for which the icon is visible.

<f:facet name="image">
<webuijsf:image icon="TREE_DOCUMENT" id="image4"/>
</f:facet>

How we can add this facet to the tree node i am creating in the prerender method?

Can you please help me?

Regards
Vinoth Selvaraj
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gurus,

I have the same problem too.. the node is added to the Tree but image is missing. My requirement is to enable the user to add TreeNodes dynamically by clicking ADD button and the TreeNodes are added at subsequent levels but how to get the page image besides each added TreeNode.

Any idea.

Thanks in advance,
Murali.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i too have a similar problem, I am not able to set the image for the tree nodes. I have tried a lot but no success. Does it ring bells to any one..
can you through some light on it.
 
muraliRaj lakkaraju
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

how can the tree component in JSF page Fragment be made dynamic depending on the data from the database? I could not be able to execute the page fragment which contains Tree component in it and my requirement is to change it dynamically. I followed the example in this url below

web page

but this is on JSF page, i need this with JSF page fragment. How to do it?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Murali,

i could help if you provide more information but, according to your first post i could suggest you to put the code of jsf page's render method in a public method called, for example myUpdateMethod(Param p) that you will place in page fragment. Then in jsf page's render method put :

myappsource.xxx.fragmentName myFragment (myappsource.xxx.fragmentName)getBean("myappsource$myFragment");
myFragment.myUpdateMethod(myParamToPerformUpdate);

Hope i understood your problem otherwise tell me more.
 
muraliRaj lakkaraju
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello Leytier,

thank you for your reply. I got a new problem with JSF Tree. The Tree worked well until i fixed images for each level of Tree (for each TreeNode at different levels). Now i try to delete the TreeNode (with image) after deleting the TreeNode I am rebuilding the Tree - but the problem is the node which is deleted is still appearing at the same place and when i click it obviously jsf is searching for the deleted node and ends up with null pointer. The question i don't want the deleted Node to be displayed (Tree must dynamically update according the user operations). This problem won't appear when i restart my application server - does the old instance is held at somewhere and the new changes are not updated?? i dont know how to solve it?
reply
    Bookmark Topic Watch Topic
  • New Topic