Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting the functionality of div tag in JSF

843844Feb 28 2007 — edited Oct 29 2007
Hi,

I want that when my page loads, some of my div tags are hidden. I would like to render them later with my response. right now I am using HTML div for this purpose. To get rid of HTML div I tried to use a custom div tag, which i initially set to render="false". Later I want to rerender it using backing bean and custom tag properties.

to give an idea, right now in my command button I show hide my div like this :
oncomplete="document.getElementById('cm_nosearch').style.display='none'; document.getElementById('searchResults').style.display='block';"

pricisely I want to get rid above statement. I want to control this logic from managed bean only.

I think my understanding is not correct as if I set render="false" my component is never going to be rendered. I think I don't understand "render" atribute at all. If after once setting it to false I cant reset it to new values then what's the purpose of having it?

I am now 2 weeks old in JSF but there is way to go....

Please guide me as to how i can achieve this (custom div is hidden when the page loads and I can show it later or any other way if it is availabe in JSF). Also it would be great if clear understanding of render attribute can be given.

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2007
Added on Feb 28 2007
6 comments
431 views