On 7/30/07, Jan Kriesten <[EMAIL PROTECTED]> wrote:
>
>
> Hi Igor,
>
> > i really dont think oncomponenttagbody() belongs in behaviors. this
> should
> > be done without a behavior by subclassing the component and overriding
> > oncomponenttagbody() there. that said you can still hack it by using
> > AbstractTransformerBehavior and some string manipulation code.
>
> I don't think this should belong in a subclass. IMHO manipulating
> attributes for
> a certain type of object should be handled by simply adding a Behaviour.


yes i agree 100%. but, you are not manipulating attributes, you are
generating additional markup int component's body.

SWF's
> are only one example. Other Objects (QuickTime, Real, WMV) have other
> Attributes
> and parameter needs which is where Behaviours do what they do best:
> manipulating them. The Problem is, that Objects aren't handled Browser
> independend. So it's enough for FF & Co. to have a 'data'-Attribute for
> the SWF,
> whereas IE needs the  <param name="movie"...> and no 'data' to have the
> movie
> streamed.
>
> ATM it looks like this:
>
> WebMarkupContainer swf = new WebMarkupContainer( "swf" );
> ResourceReference resRef = new ResourceReference( HeaderPanel.class,
> "res/mymovie.swf" );
> swf.add( new FlashAttributes( urlFor( resRef ).toString(), "700", "70" )
> );
> add( swf );
>
> It really looks messy if you subclass it and take into account the 20
> other
> parameters you could add the Object...


well the logic has to go somewhere so just do

SwfObject object=new SwfObject("swf", resRef, 700, 70); instead of putting
it into a behavior put it into a custom webmarkupcontainer subclass instead.

-igor



Best regards, --- Jan.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to