Re: [1.5 MIGRATION] - Where did StringHeaderContributor / TextTemplateHeaderContributor go?

2014-07-21 Thread Shweta Agrawal
Hi I'm facing issue with StringHeaderContribuor will migration from 1.4 to 1.5. Can you please help me ? 1. I'm using StringHeaderContribuor for Google analytic code public class GoogleAnalyticsHeaderContributor extends StringHeaderContributor { public

Re: [1.5 MIGRATION] - Where did StringHeaderContributor / TextTemplateHeaderContributor go?

2014-07-21 Thread Martin Grigorov
Hi, This has been simplified. You should extend Behavior and contribute via #renderHead() method. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jul 21, 2014 at 9:12 AM, Shweta Agrawal shweta.agra...@lntinfotech.com wrote: Hi I'm facing issue with

Re: StringResourceModel with a defaultValue as model

2014-07-21 Thread Patrick Davids
Hi François, what I try to do is a bit different... I would like to provide a default per component sub-class, before wicket cascades the property files up to application.properties. Something like this: add(new Label(, new StringResourceModel(key.${someInfoFromBean}, Component.this,

Re: StringResourceModel with a defaultValue as model

2014-07-21 Thread Martin Grigorov
On Mon, Jul 21, 2014 at 10:39 AM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi François, what I try to do is a bit different... I would like to provide a default per component sub-class, before wicket cascades the property files up to application.properties. Something like this:

[SOLVED] Re: StringResourceModel with a defaultValue as model

2014-07-21 Thread Patrick Davids
Yes, already implemented this way. :-) Added a todo now, waiting for wicket7 to improve it. Thanx for the hint anyway... regards Patrick For now you can workaround it with: add(new Label(, new StringResourceModel(key.${someInfoFromBean}, Component.this, Model.of(anyBean), new

Re: Behavior to modify attributes

2014-07-21 Thread Entropy
Instead of doing: page.add(new MyBehavior(components)) do Behavior b = AttributeModifier.append(); for (Component c : components) { c.add(b) } Certainly that would work, I am trying to create a re-usable Behavior for my app that any page wishing to incorporate this

Re: Behavior to modify attributes

2014-07-21 Thread Entropy
Oh, I just tried it in my common page's onBeforeRender. Evidently I can do this from the page.onBeforeRender, just not from the behavior onBeforeRender. Which is probably what you meant. Okay, I can work with that. -- View this message in context:

Re: Behavior to modify attributes

2014-07-21 Thread Martin Grigorov
Hi, You are using Behavior in a strange way. component.add(behavior) will call behavior#onBind(component) because Wicket knows that the behavior is used by this component. Later when Wicket starts to render the components it calls the Behavior's methods like: beforeRender(), afterRender(), etc.

DropDownChoice closes on target.add(...)

2014-07-21 Thread Rune Stilling
Hi list I’m using the TabbedPanel component to show a couple of tabs each of them containing a form. The form among other things contains a DropDownChoice. I have also set up a AbstractAjaxTimerBehavior instance to do some updates along the way. On of the updates i the TabbedPanel, that I add

Re: DropDownChoice closes on target.add(...)

2014-07-21 Thread Patrick Davids
Hi Rune, for me it looks like the feature of updating parts of your UploadFormPanel by using a timer should be a behavior of your UploadFormPanel itself. Put it inside, and you have access the particular container to refresh. No need to refresh the whole panel from outside, which side-affects