Re: Barracuda: setVisible

Stefan Armbruster <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi Kirk,

a custom directive solves this. <table
class="Dir::Is_Visible.ModelName">
Make sure, the model "ModelName" overrides processDirective. Depending
if the table should be visible or not, processDirective returns true or
false.
Check out
src/org/enhydra/barracuda/examples/xmlc/TemplateTableScreen.java there
you'll find an example for this.

Regards,
Stefan
Am Die, 2002-12-10 um 09.50 schrieb Kirk Daries:
> 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


_______________________________________________
Barracuda mailing list
[email protected]
http://www.enhydra.org/mailman/listinfo.cgi/barracuda
FAQ - http://www.jguru.com/faq/Barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.