Re: Resolving nested properties

2015-03-04 Thread Rob Sonke
Hi, It took a while to dive into this but I wrote a simple solution based on the pattern/matcher example of Tobias and this seems to work well. It only wraps the default Localizer class in Wicket by overriding the getString method: getResourceSettings().setLocalizer(new Localizer() { public S

Re: Resolving nested properties

2015-03-04 Thread Tobias Soloschenko
Hi, maybe we can provide a new Localizer or change the existing default implementation. As far as I know the StringResourceModel uses the same Syntax for replacing which might lead to errors @others: What do you think? @Rob: the pattern should be modified a bit so that it is not greedy (.*?) -

Re: Resolving nested properties

2015-03-04 Thread Martin Grigorov
Hi, Since there were no many requests for this functionality I'd prefer if we use a specialization of Localizer as Rob did. The Pattern compilation is the slower operation, so it should be a static final field. The matching is usually fast so maybe there is no problem to put it directly in Localiz

Re: Resolving nested properties

2015-03-04 Thread Rob Sonke
Agree Martin, thanks for the tips (also Tobias). I'll look into an implementation of an extra Localizer, good names are welcome, and file a ticket. Rob On Wed, Mar 4, 2015 at 9:46 AM, Martin Grigorov wrote: > Hi, > > Since there were no many requests for this functionality I'd prefer if we > us

Re: Resolving nested properties

2015-03-04 Thread Tobias Soloschenko
Hi Rob, maybe we could name it KeyReplacingLocalizer. Here is the reference of the ReplacingResourceModel. It wasn't in html5 submodule but in minis. https://github.com/wicketstuff/core/blob/85bfa1b4bf67261ad4a7b07295c366c49733ad1f/jdk-1.7-parent/minis-parent/minis/src/main/java/org/wicketstuff/

Accessing Current Page In Custom Request Mapper

2015-03-04 Thread jahandideh_iman
I'm new to wicket and I must create a custom REST api for wicket. I managed to create a IRequestMapper for accepting REST messages but the problem is I can't find a way to have access to current page to update it based on the message. It seems wicket find the current page based on the pageID that

Re: Accessing Current Page In Custom Request Mapper

2015-03-04 Thread Sven Meier
Hi, there's no *current* page when a REST request comes in. Your page should always fetch the current state from a central shared place. It can use an Ajax timer to check for updates or just live with outdated data until the next page refresh. Regards Sven Am 04.03.2015 um 12:12 schrieb ja

Re: Accessing Current Page In Custom Request Mapper

2015-03-04 Thread jahandideh_iman
Thanks for your reply. But it's not a real REST service. I won't go to the details but to be honest this project is a mess. There is a lot couplings between application logic and wicket so they want a service to map JSON request to wicket. I will ask more about your note, but aside from that, can

Re: Accessing Current Page In Custom Request Mapper

2015-03-04 Thread jahandideh_iman
I think I get your point now. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Accessing-Current-Page-In-Custom-Request-Mapper-tp4669833p4669837.html Sent from the Users forum mailing list archive at Nabble.com. -

adding component Dynamically

2015-03-04 Thread avchavan
Hi, I want to add a link to my html dynamically via wicket. I have written code for that which works as far as displaying the link is concerned. But the onclick of the link doesnt work. final WebMarkupContainer more = new WebMarkupContainer("more"); final String to

Re: Resolving nested properties

2015-03-04 Thread Rob Sonke
Done: https://issues.apache.org/jira/browse/WICKET-5847 I'll create a pull request too and I'll mention that in the jira ticket. Rob On Wed, Mar 4, 2015 at 10:16 AM, Tobias Soloschenko < tobiassolosche...@googlemail.com> wrote: > Hi Rob, > > maybe we could name it KeyReplacingLocalizer. > > He

Re: Wicket 6 - Blank page while trying to show a generic error page onException

2015-03-04 Thread sameerkhanna
This worked. Thanks a lot Martin :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Blank-page-while-trying-to-show-a-generic-error-page-onException-tp4669813p4669842.html Sent from the Users forum mailing list archive at Nabble.com. -

Re: adding component Dynamically

2015-03-04 Thread Sven Meier
Hi, could you be more specific on how it doesn't work? Check your browser's network console whether the request is sent actually. Then put a breakpoint in ListenerInterfaceRequestHandler#respond() and check what happens on the server. BTW you should use new AjaxEventBehavior("click") instead

Using tags messes up css

2015-03-04 Thread Andreas Lundblad
I've noticed that tags such as messes up the CSS sometimes. In my particular example I have div.formRows > div { display: table-row; } and when I try to put an enclosure around a table row, the CSS child selector doesn't work. Is there an easy workaround (except switching deployment mode)

Re: Using tags messes up css

2015-03-04 Thread Tobias Soloschenko
Hi, try getMarkupSettings().setStripWicketTags(true); in the applications init. kind regards Tobias Am 04.03.15 um 22:03 schrieb Andreas Lundblad: I've noticed that tags such as messes up the CSS sometimes. In my particular example I have div.formRows > div { display: table-row; } a

Re: Using tags messes up css

2015-03-04 Thread Andreas Lundblad
That's a very crude solution. Almost as crude as switching deployment mode. The wicket tags are useful during debugging and I'd like them to be available (except possibly in this case) in development mode. best regards, Andreas Lundblad On Wed, Mar 4, 2015 at 10:11 PM, Tobias Soloschenko < tobia

Re: Using tags messes up css

2015-03-04 Thread Don Ferguson
I think: getMarkupSettings().setStripWicketTags(true); in your Application.init() would do the trick. -Don > On Mar 4, 2015, at 1:03 PM, Andreas Lundblad > wrote: > > I've noticed that tags such as messes up > the CSS sometimes. > > In my particular example I have > > div.formRows > div {

How to convert component model object to rendered HTML?

2015-03-04 Thread Thorsten Schöning
Hi all, I have my own subclass of RequiredTextField for very specific reasons and need to convert input after form submit to a Wicket model and vice versa from a Wicket model to a form input value in case of errors and such, when Wicket renders the form with the current values. I have overridden C

Re: Using tags messes up css

2015-03-04 Thread Thorsten Schöning
Guten Tag Andreas Lundblad, am Mittwoch, 4. März 2015 um 22:14 schrieben Sie: > That's a very crude solution. Almost as crude as switching deployment mode. From my point of view Wicket's tags are an implementation detail and don't belong to the HTML output, stripping them is therefore the only co

Re: Using tags messes up css

2015-03-04 Thread Andreas Lundblad
Thanks Thorsten, I understand what you're saying and I agree to some extent. They're present by default in development mode (which I think makes sense) so I've gotten used to having them. Maybe I should try to break this habit. On Mar 4, 2015 10:27 PM, "Thorsten Schöning" wrote: > Guten Tag And

Re: How to convert component model object to rendered HTML?

2015-03-04 Thread Martin Grigorov
Hi, On Wed, Mar 4, 2015 at 11:21 PM, Thorsten Schöning wrote: > Hi all, > > I have my own subclass of RequiredTextField for very specific reasons > and need to convert input after form submit to a Wicket model and vice > versa from a Wicket model to a form input value in case of errors and > su

Re: How to convert component model object to rendered HTML?

2015-03-04 Thread Thorsten Schöning
Guten Tag Martin Grigorov, am Donnerstag, 5. März 2015 um 08:05 schrieben Sie: > If the validation fails > then the *raw* input is rendered to the user and there is no usage of > #convertToString() because there is no need. Thanks, I wasn't aware of this and that explains why it looked like it wo

Re: How to convert component model object to rendered HTML?

2015-03-04 Thread Martin Grigorov
You can call formComponent#clearInput() in #onError() callback method. This way Wicket will use the last (valid) model value. You can also set custom model value in #onError() if you need. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Mar 5, 2015 at 9:39 AM