Re: Behaviour adding to Component body

2007-07-30 Thread Eelco Hillenius
> yes, tried that already. strangely, gets an additional > xmlns:wicket="http://wicket.apache.org"-attribute?! but it doesn't seem to > hurt. Yeah, that happens in onComponentTag: public void onComponentTag(final Component component, final ComponentTag tag) { ta

Re: Behaviour adding to Component body

2007-07-30 Thread Jan Kriesten
Hi Eelco, > You should be able to pull that off if you use > AbstractTransformerBehavior. yes, tried that already. strangely, gets an additional xmlns:wicket="http://wicket.apache.org"-attribute?! but it doesn't seem to hurt. > Btw, if you ever get to it, a nice Flash > component with a demo f

Re: Behaviour adding to Component body

2007-07-30 Thread Eelco Hillenius
> I thought I could just concentrate on the last aspect and apply only the > needed > changes... (i.e. move an attribute to a ). You should be able to pull that off if you use AbstractTransformerBehavior. Btw, if you ever get to it, a nice Flash component with a demo for wicket-examples would be

Re: Behaviour adding to Component body

2007-07-30 Thread Jan Kriesten
Hi Martijn, > Yep, I was wondering why not create your own ShockWaveComponent that > exposes the parameters using some API, and renders them using a > repeating view? yes, I think there's no other clean way. The problem with is, that it allows nested/alternative content which the browsers show

Re: Behaviour adding to Component body

2007-07-30 Thread Eelco Hillenius
> since I haven't overridden onComponentTagBody yet - what happens to child-Tags > then, do I have to manage these, too? If that's an issue, it's better to follow Martijn's advice and make this component a panel with a list view for the parameters. Eelco -

Re: Behaviour adding to Component body

2007-07-30 Thread Jan Kriesten
Hi Eelco, > Well, what you can do is rather than using a generic > WebMarkupContainer, create a custom class that overrides > onComponentTagBody, create some interface for parameters that this > class understands, expose the ability to add instances of this > interface, and then when the componen

Re: Behaviour adding to Component body

2007-07-30 Thread Eelco Hillenius
On 7/30/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: > Yep, I was wondering why not create your own ShockWaveComponent that > exposes the parameters using some API, and renders them using a > repeating view? Yeah, you could do that as well. Though directly writing them out in onComponentTagBody

Re: Behaviour adding to Component body

2007-07-30 Thread Igor Vaynberg
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 >

Re: Behaviour adding to Component body

2007-07-30 Thread Martijn Dashorst
Yep, I was wondering why not create your own ShockWaveComponent that exposes the parameters using some API, and renders them using a repeating view? Martijn On 7/30/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > I don't think this should belong in a subclass. IMHO manipulating > > attributes

Re: Behaviour adding to Component body

2007-07-30 Thread Eelco Hillenius
> 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. SWF's > are only one example. Other Objects (QuickTime, Real, WMV) have other > Attributes > and parameter needs which is where Behaviou

Re: Behaviour adding to Component body

2007-07-30 Thread Jan Kriesten
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

Re: Behaviour adding to Component body

2007-07-30 Thread Eelco Hillenius
> i really dont think oncomponenttagbody() belongs in behaviors. this should > be done without a behavior by subclassing the component and overriding > oncomponenttagbody() there. I'm also a bit afraid that exposing that would be too dangerous (not to mention that the interface is already pretty b

Re: Behaviour adding to Component body

2007-07-30 Thread Igor Vaynberg
On 7/30/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > On 7/30/07, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > > > Hi Eelco, > > > > > You can use onRendered and write directly to the response using > > > Response response = component.getResponse(); > > > > not really. I tried that before, But

Re: Behaviour adding to Component body

2007-07-30 Thread Eelco Hillenius
On 7/30/07, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > Hi Eelco, > > > You can use onRendered and write directly to the response using > > Response response = component.getResponse(); > > not really. I tried that before, But that only writes the param after the > close > tag which isn't what is i

Re: Behaviour adding to Component body

2007-07-30 Thread Jan Kriesten
Hi Eelco, > You can use onRendered and write directly to the response using > Response response = component.getResponse(); not really. I tried that before, But that only writes the param after the close tag which isn't what is intended. :-) Result: The param belongs inside the object-tag.

Re: Behaviour adding to Component body

2007-07-30 Thread Eelco Hillenius
> I only can use onComponentTag or onRendered. onRendered already closed the > object-Tag again. onComponentTag seems to be the point to start. But there > doesn't seem to be a way to have the component open tag be rendered and then > have something written to the stream... You can use onRendered

Behaviour adding to Component body

2007-07-30 Thread Jan Kriesten
Hi, I have the following situation and haven't found a solution yet: My Panel gets the following Markup from the designer: I'm now looking for a way to add a behaviour to the swf-MarkupContainer, which changes the attributes/body depending on the browser. My problem is with changing the body