Re: Behavior modifying component body

2012-10-19 Thread Sven Meier
> AbstractTransformingBehavior ... gives me the the output for the whole component, not just the body Oh, I didn't think of that. > I would still need to parse that output I agree that this is not so nice :/. Sven On 10/19/2012 05:15 PM, Jesse Long wrote: Hi Martin, Sven, Thank you both f

Re: Behavior modifying component body

2012-10-19 Thread Jesse Long
Hi Martin, Sven, Thank you both for your feedback. I had not tried AbstractTransformerBehavior because I didn't know about it, and because when I looked at the Behavior API it was clear that there was no way for any Behavior to modify ONLY the body. Having said that, I have done some tests w

Re: Behavior modifying component body

2012-10-19 Thread Sven Meier
Why should we introduce a new API to just render *before* and *after* the body? AbstractTransformerBehavior offers a solution for this and allows you to do even more with the body. Best regards Sven On 10/19/2012 11:19 AM, Martin Grigorov wrote: Another way is by using BorderBehavior. See org

Re: Behavior modifying component body

2012-10-19 Thread Martin Grigorov
Another way is by using BorderBehavior. See org.apache.wicket.examples.forminput.BeforeAndAfterBorder for an example. The drawback here is that you will need an additional .java + .html pair for each icon type and you'll need to apply it on the Link/Button's label, so you cannot use AbstractLink#se

Re: Behavior modifying component body

2012-10-19 Thread Martin Grigorov
Hi Jesse, I see what you mean and I agree it will work and will be a simple solution for such requirements. My only concern is that the API of Behavior becomes bigger and component rendering will do some more things. Most of the time these methods will do nothing. Have you considered using org.ap

Behavior modifying component body

2012-10-18 Thread Jesse Long
Hi Wicket Community, I would like to modify the body of a Component from a Behavior. Specifically, I want to add: To the beginning of the of the body of a link, eg: [here] Some other body I dont want to extend AbstractLink etc, I want to add this functionality as a Behavior. I cannot se