Re: BImage ?

Jacob Kjome <[email protected]> Mon, 11 Dec 2006 12:06:05 -0600
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1165861507-11279-119
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Quoting Franck Routier <[email protected]>:

> Franck Routier a =E9crit :
> > Yes, I noticed this interface, but I have not yet found how it is used
> > in the code... I am looking at this.
>
> Well, here is what I found :
> - BCompoundComponent isimplemented by BTemplate, BList and BTable.
> - it is used as a marker interface in two places :
>
> 1) TemplateHelper getNode : if a node has a child that is NOT a
> BCompoundComponent, then it will be added as a BTemplate, to process its
> directives if any.
> So as I understand it, if a directive is embedded in a BList or a
> BTable, it won't get processed. If it is already a BTemplate, then I
> think it will be processed anyway.
>
> 2) HTMLListRenderer : if the list has BComponent items, they will be
> added to the view, except if they are BCompoundCompnent items and
> already are bound to a view... Huhh. I don't really understand this
> piece of code.
>
>
> So as I see it, regarding nested components, I think I might have to
> implement BCompoundComponent, so that BTemplate won't try to process
> each child as a BTemplate. This would mean nestaed components could not
> have directives embedded... But it's nott he purpose.
>
> Or am I missing something ?
>

I haven't looked at the stuff in a while, but I'll give a little background=
 on
why I added the marker interface.  There had been some users that wanted to
write custom components that failed to render.  They failed because the
rendering code didn't have a generic way of reacting to complex components
generically.  I took at look at the existing code and found that BList, BTa=
ble,
and BTemplate were specifically called out as exceptions to certain renderi=
ng
logic.  So, I decided to create the BCompundComponent interface as a way for
the rendering code to recognize custom compound components in the same way =
it
does the core compound component exceptions.  So, I didn't change the rende=
ring
logic.  I only made it so it wasn't so unforgiving to custom components.

The solution may have been naive on my part because I can't say that I real=
ly
dug in to understand the reasons why said core components were exceptions in
rendering; I only genericized their treatment.  Why the rendering code is t=
he
way it is, is something to research and/or bring up with Christian or other
original writers of that code.  As you found, the code is very complex, and
simplification may be the order of the day.

BTW, if you decide to really start digging into Barracuda, I would certainly
consider proposing a vote for committer status.  Barracuda could use some m=
ore
active development.  Let me know if you are interested, for starters.

Jake

> Franck
>
>





------------=_1165861507-11279-119
Content-Type: text/plain; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: 8bit



--

Barracuda mailing list

[email protected]

http://www.objectweb.org/wws/lists/projects/barracuda


------------=_1165861507-11279-119--