Re: Serialization of DAO

2013-03-14 Thread Martin Grigorov
Hi, I don't see how you initialize blogDAO. If you don't use wicket-ioc module then you will need to lookup the DAO from the application whenever you need it: public void onSubmit() { BlogDAO blogDao = MyApplication.get().getBlogDAO(); blogDao.save(blog); } This way you wont keep reference

Re: Re: how to setup call context for every request

2013-03-14 Thread Martin Grigorov
Hi Tom, Please post to the mailing lists. The chance to get an answer is bigger ;-) Check Igor's series about Wicket-CDI at https://www.42lines.net/category/blog/software-engineering/ You may need the conversation scope. On Wed, Mar 13, 2013 at 11:59 PM, Tom Eicher t...@teicher.net wrote:

Re: wicket:for behavior

2013-03-14 Thread Martin Grigorov
Hi, Try with : textField.setOutputMarkupId(true). If this helps please file a ticket - 'wicket:for' should do this for you. On Thu, Mar 14, 2013 at 5:01 AM, Maxim Solodovnik solomax...@gmail.comwrote: Hello, I'm trying to use wicket:for as follows: input wicket:id=rememberMe type=checkbox

Re: wicket:for behavior

2013-03-14 Thread Bas Gooren
We're still on wicket 1.5, so I don't know if this still applies in 6.x, but the reason for this is that the wicket:for handler is executed in the same order as your html. That means that, since your wicket:for is after the input itself, calling setOutputMarkupId() on it no longer has any

Image.initModel() returns null and forbids attaching an image to a form CompoundPropertyModel - why?

2013-03-14 Thread Marios Skounakis
Hi all, I have created a component that extends NonCachingImage which overrides getImageResource(). The intent was to include this in a form, and retrieve the image data from a property of the form object. However this does not work because Image.initModel() returns null and as a result my

Re: wicket:for behavior

2013-03-14 Thread Martin Grigorov
On Thu, Mar 14, 2013 at 9:42 AM, Bas Gooren b...@iswd.nl wrote: We're still on wicket 1.5, so I don't know if this still applies in 6.x, but the reason for this is that the wicket:for handler is executed in the same order as your html. That means that, since your wicket:for is after the

Re: how to setup call context for every request

2013-03-14 Thread Tom Eicher
Reposting to the list (sorry Martin ;-) in hope for feedback on @RequestScoped Wicket-CDI vs EJB... : [...about seeting up stuff to propagate user/session/JAAS info from the wicket web layer to a JBoss AS7 EJB...] You can use IRequestCycleListener#onBeginRequest(). Thanks for the suggestion

Wicket Guide (Was: RSS)

2013-03-14 Thread Martin Grigorov
Thanks for sharing, Andrea! In what format will be your guide ? I see you have many demo applications but is there any kind of documentation explaining what they actually show ? I'm a bit slow lately on the Reference Guide initiative :-/ On Wed, Mar 13, 2013 at 11:06 PM, Andrea Del Bene

Re: Wicket Atmosphere with CryptoMapper gives exception.

2013-03-14 Thread Martin Grigorov
Hi, I think you should ask in Atmosphere mailing list. The servlet mapping is on /* so I'm not sure why Atmosphere rejects the request to /A7-TzylrsD0NeLU_GE2Phg/A7-56. IMO it should accept and pass it to WicketFilter where the request path will be decrypted and processed. On Wed, Mar 13, 2013

Wicket 6: LinkResource with a dynamic resource

2013-03-14 Thread dpmihai
Hi. I want to have a table with a Link PropertyColumn which contains a LinkResource. When user clicks on the link I want to be able to pass the row model to resource first and then have the resource loaded. I created a ResourceLinkPropertyColumn class like: public class

Re: Wicket 6: LinkResource with a dynamic resource

2013-03-14 Thread dpmihai
The only solution I have is to create my own class ResourceLink with a method: public void beforeResourceRequested() {} (here I will set rowModel to my resource) and use it inside onResourceRequested: /** * @see org.apache.wicket.IResourceListener#onResourceRequested()

Re: wicket:for behavior

2013-03-14 Thread Maxim Solodovnik
Thanks a lot! *.setOutputMarkupId(**true)* helps! On Thu, Mar 14, 2013 at 3:47 PM, Martin Grigorov mgrigo...@apache.orgwrote: On Thu, Mar 14, 2013 at 9:42 AM, Bas Gooren b...@iswd.nl wrote: We're still on wicket 1.5, so I don't know if this still applies in 6.x, but the reason for this is

Some Validators Not Kicking In

2013-03-14 Thread eugenebalt
We're having an issue where some of our validators aren't kicking in. A bunch of Component- and Form-level validators are added in the page constructor. We have output statements in each. The output shows that in some situations some of the validators are short-circuited and don't get executed

Re: Some Validators Not Kicking In

2013-03-14 Thread Martin Grigorov
Hi, Looking at org.apache.wicket.markup.html.form.Form#validateFormValidator I see that form validator will be skipped if any of its org.apache.wicket.markup.html.form.validation.IFormValidator#getDependentFormComponents is already invalid. On Thu, Mar 14, 2013 at 3:35 PM, eugenebalt

Re: Serialization of DAO

2013-03-14 Thread Stephen Walsh
Thanks, Martin. I intialize here, (which I just realized is not the best spot): private void setUpMongo() { mongo = MongoUtil.getMongo(); morphia = new Morphia().map(Blog.class).map(Person.class); blogDAO = new BlogDAO(mongo, morphia); } I am using the Wicket

Re: wicket:for behavior

2013-03-14 Thread Igor Vaynberg
wicket:for cant set output markup id because it comes after the form component in markup and so the form component has already been rendered. it already sets the output of markup, but it only helps if the label is before the component in markup. -igor On Thu, Mar 14, 2013 at 1:35 AM, Martin

Re: Image not shown html

2013-03-14 Thread Martin Grigorov
Hi, Please take a look at your question as someone who is here to help you. Here is the url: http://apache-wicket.1842946.n4.nabble.com/Image-not-shown-html-tp4657245.html Can you understand the question ? By the way there are google groups in Spanish (

Re: Some Validators Not Kicking In

2013-03-14 Thread eugenebalt
That may be it. The Form-level ones are the ones not executing sometimes. So to check if it's invalid, I just see if getDependentComponents() returns NULL? And what could cause it to be NULL, if I'm specifying the right valid components that exist on the form? Thanks again -- View this

Re: Some Validators Not Kicking In

2013-03-14 Thread eugenebalt
So if I have something wrong with my field (by itself), than any Form validators that involve it as well, won't kick in? From the documentation: These validators are added to the form and only executed if all form components returned by getDependentFormComponents() have been successfully

Re: Some Validators Not Kicking In

2013-03-14 Thread eugenebalt
Sorry to keep posting, but does order matter? We're adding the validators in all kinds of order. Sometimes, we have a field that shows messages associated with itself, AND its Form-level validator. But that doesn't work for other fields, which don't show the Form-associated validator. -- View

Draft-mode validation

2013-03-14 Thread pureza
Hi, I have a very big form with two buttons: Save and Submit. If the user hits the Save button, I want to bypass *some* of the validation, but not all of it. For example, I want to notify the user of any conversion errors (such as text in a field where a number is expected), but I want to ignore

Re: Draft-mode validation

2013-03-14 Thread pureza
I just found out about Form.findSubmittingButton(). That should do it, but if you know of any better way, please let me know :-) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Draft-mode-validation-tp4657252p4657253.html Sent from the Users forum mailing list

Ajax Behavior not working after 1 time

2013-03-14 Thread eugenebalt
We have a DropDown whose selection affects the 2nd DropDown (hide+disable). This is done in Ajax onchange on the 1st DropDown, very simple. In the Ajax behavior, we specify if (condition) { choice2.setEnabled(false); choice2.setEnabled(false); target.addComponent(choice2); } else {

Re: Ajax Behavior not working after 1 time

2013-03-14 Thread eugenebalt
Martin, we're already doing setOutputMarkupId(true) on both dropdowns. Is that one different from OutputMarkupId? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-Behavior-not-working-after-1-time-tp4657254p4657257.html Sent from the Users forum mailing list

Re: Ajax Behavior not working after 1 time

2013-03-14 Thread Marios Skounakis
Yes it is. What Martin says will fix your problem. On Thu, Mar 14, 2013 at 9:35 PM, eugenebalt eugeneb...@yahoo.com wrote: Martin, we're already doing setOutputMarkupId(true) on both dropdowns. Is that one different from OutputMarkupId? -- View this message in context:

Re: Ajax Behavior not working after 1 time

2013-03-14 Thread Martin Grigorov
On Thu, Mar 14, 2013 at 8:35 PM, eugenebalt eugeneb...@yahoo.com wrote: Martin, we're already doing setOutputMarkupId(true) on both dropdowns. Is that one different from OutputMarkupId? re-read what I wrote and what you answered. and read the related javadoc -- View this message in

Re: Custom FormComponentPanel and validation

2013-03-14 Thread Paul Bors
Have you tried this: https://cwiki.apache.org/WICKET/creating-custom-formcomponentpanels-to-build-valid-objects-using-wickets-form-validation-logic.html ~ Thank you, Paul Bors On Thu, Mar 14, 2013 at 9:39 AM, Jeremy Levy jel...@gmail.com wrote: I have a FormComponentPanel with 3 TextFields.

Re: Proper models approach

2013-03-14 Thread Paul Bors
Why not use the existing Wicket Wizard already? See the live examples at: http://www.wicket-library.com/wicket-examples/wizard/;jsessionid=25DD01023009791E13E212292E4150D1?0 I think I used a combination of models depending on the panel shown. In the end they all updated a single model. ~ Thank

Re: send message from modal window to parent

2013-03-14 Thread Paul Bors
If I understand you right you want to close your parent window from inside the modal pop-up window. I take it you want them both closed. Won't it be simpler to send the window JS object to your pop-up and call the window.close() from inside your pop-up? ~ Thank you, Paul Bors On Tue, Mar 12,

check load

2013-03-14 Thread fachhoch
I use aws load balancer to load balance my app running in aws cloud ,the load balancer is configured to launch a new server instance if request is taking more than the specified time . I need advice on how to check the load on the server, should it be like number of session ? total sessions

Re: check load

2013-03-14 Thread Martin Grigorov
No, Wicket cannot tell you such information. Consult AWS documentation. On Thu, Mar 14, 2013 at 10:36 PM, fachhoch fachh...@gmail.com wrote: I use aws load balancer to load balance my app running in aws cloud ,the load balancer is configured to launch a new server instance if request is

Re: Serialization of DAO

2013-03-14 Thread Stephen Walsh
Any other thoughts on this? ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 10:30 AM, Stephen Walsh step...@connectwithawalsh.com wrote: Thanks, Martin. I intialize here, (which I just realized is not the best spot):

AbstractAjaxTimerBehavior and setInterval and clearInterval

2013-03-14 Thread infiniter
I created a very similar class to AbstractAjaxTimerBehavior, with the difference that I'm using setInterval instead of setTimeOut in #getJsTimeoutCall and I'm assigning a variable name to it, so that I can use the clearInterval in #getFailureScript , the problem I got is that in the response

Re: Serialization of DAO

2013-03-14 Thread Martin Grigorov
Take a look at wicket-examples and the unit tests in wicket-guice module. On Thu, Mar 14, 2013 at 10:53 PM, Stephen Walsh step...@connectwithawalsh.com wrote: Any other thoughts on this? ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14,

Wicket 1.4.x - AjaxSubmitLink doesn't work

2013-03-14 Thread anotherUser
Hi this my first post here, let's see my problem: i am adding a AjaxSubmitLink in a Listview like this: AjaxSubmitLink lnkAgregar = new AjaxSubmitLink(lnkDetalle, form) { @Override protected void onSubmit(AjaxRequestTarget art, Form? form) { } };

Re: Wicket 1.4.x - AjaxSubmitLink doesn't work

2013-03-14 Thread Martin Grigorov
Hi, On Thu, Mar 14, 2013 at 3:56 PM, anotherUser juan.dellagn...@theiaconsulting.com wrote: Hi this my first post here, let's see my problem: Welcome ! i am adding a AjaxSubmitLink in a Listview like this: AjaxSubmitLink lnkAgregar = new AjaxSubmitLink(lnkDetalle, form) {