RE: Newbie question - BTemplate/Directives/Tables
"Christian Cryder" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Thorsten,
Well, if all you want to do is set the attribute, then just pass back a
BComponent, like this:
BComponent bcomp = new BComponent();
bcomp.setAttr("bgcolor", "...");
return bcomp;
That ought to do it (unless I am misunderstanding what you are asking).
Welcome to the community!
Christian
----------------------------------------------
Christian Cryder [[email protected]]
Internet Architect, ATMReports.com
Barracuda - http://barracudamvc.org
----------------------------------------------
"Coffee? I could quit anytime, just not today"
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Thorsten Dobelmann
> Sent: Monday, March 03, 2003 4:39 PM
> To: [email protected]
> Subject: [Barracuda] Newbie question - BTemplate/Directives/Tables
>
>
> Hi all !
>
> I'm new to this mailing list and I need some help
> when using the BTemplate component with tables:
>
> I have a table where some of the rows - not following a certain pattern -
> need to have
> a different color that the others depending on a certain condition.
> So I added a directive - Dir::Get_Data.SomeModel.row - to the <tr> element
> together
> with the Iterate_Start and Iterate_Next directives,
> so that I can define a bgcolor attribute when needed.
> But what do I need to return in my Model (which implements IterativeModel)
> in getItem(key) for the row directive ?
> I'd like to maintain the <tr> element as it is defined in my HTML file
> and just add a bgcolor="..." attribute to it depending on a certain
> condition.
>
> Any help is highly appreciated.
> Thanks and greets,
>
> Thorsten
>
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda