RE: Barracuda: setVisible
Kirk Daries <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <D09B591872D1D611AF2B0010B5A1AAD0263305@WCSMAIL> |
Thanx Guys, Lesson learnt and commited to memory! Regards KD -----Original Message----- From: Christian Cryder [mailto:[email protected]] Sent: 10/December/2002 03:25 To: [email protected] Subject: RE: Barracuda: setVisible Hi Kirk, If you return a BComponent and use that to control visibility, the underlying nodes will still be processed; as Stefan noted a custom directive is the way to go here - if you return true, everything gets processed; if you return false, everything beneath the node containing the custom directive gets skipped. This is obviously much more efficient for situations like this. Holler if you have questions about how to implement a custom directive... Christian ---------------------------------------------- Christian Cryder [[email protected]] Internet Architect, ATMReports.com Barracuda - http://barracuda.enhydra.org <http://barracuda.enhydra.org/> ---------------------------------------------- "Coffee? I could quit anytime, just not today" -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Kirk Daries Sent: Tuesday, December 10, 2002 3:50 AM To: [email protected] Subject: Barracuda: setVisible Hi, I've noticed some strange behaviour... or at least... what I assume to be strange with the BComponent setVisible method. Here's a extract from my html. <table class="Dir::Get_Data.BrowsePage.p_mastertable"> <tr> <td class="Dir::Iterate_Start.MasterBrowseHeading Dir::Iterate_Next.MasterBrowseHeading Dir::Discard">[DISCARD]</td> ...... #Other Directives follow here. </tr> </table> Pretty Simple. I'd like to hide or display a table. Notice the 'p_mastertable' key on the table node. My understanding is that 'setVisible(false)' will hide the table. And I think it does in fact do this. To the extent that the table isn't rendered. The 'problem' I have however.. is that the 'child nodes'... in this case from the model 'MasterBrowseHeading' is still being processed. Is this normal? I solved this by 'returning null' in my BTemplate instead of a BComponent with 'setVisible(false)'. Hmmmm....? Regards KD