Re: Question / Modular FormComponents / FormComponentPanels / AbstractFormValidator and problems with model updates

2016-02-12 Thread Martin Grigorov
Hi, I don't remember the last time I needed to write custom FCP so I don't really understand how/why these code snippets would work the way you explain. I'll fire the debugger to see why they behave differently than the other form components in the form submit processing. Thanks! On Feb 13, 2016

Re: Question / Modular FormComponents / FormComponentPanels / AbstractFormValidator and problems with model updates

2016-02-12 Thread Joachim Schrod
FWIW, for FormComponentPanels I often have an empty implementation of updateModel() and either have a wrapper method to add validators for those (abstract) sub-component, or redefine convertInput() to construct a proper object from nestedFormComponent.getConvertedInput() to make validators work on

Re: Question / Modular FormComponents / FormComponentPanels / AbstractFormValidator and problems with model updates

2016-02-12 Thread Sven Meier
Hi again, now I see what you meant: Yes, the converted values haven't been written yet. I was writing my example off the top of my head :). Validators won't help here, you'll have to do validation by hand instead: PersonPanel extends FormComponentPanel { @Override protected void con

Re: Question / Modular FormComponents / FormComponentPanels / AbstractFormValidator and problems with model updates

2016-02-12 Thread Sven Meier
Hi Martin, >The modelObject should be the one before the form submit, it should be the same one which all nested formComponents are changing. I can't think of a case where this shouldn't hold. >Because Form#updateModels() is called after the conversion and validations. >By calling the line

Re: Question / Modular FormComponents / FormComponentPanels / AbstractFormValidator and problems with model updates

2016-02-12 Thread Martin Grigorov
Hi Sven, On Fri, Feb 12, 2016 at 12:08 PM, Sven Meier wrote: > Hi, > > > Is it a good idea to implement such a case extending FormComponentPanel, > or is FormComponentPanel for other purposes? > > usuallly a FormComponentPanel is used when you want to combine the input > of several formComponen

Re: How to get rid off Feedback Messages?

2016-02-12 Thread Martin Grigorov
When creating FeedbackPanel you can pass an instance of IFeedbackMessageFilter that accepts only messages which are not marked as rendered. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Feb 12, 2016 at 3:47 PM, Lorne Malvo wrote: > How would I use that to

Re: How to get rid off Feedback Messages?

2016-02-12 Thread Patrick Davids
Hi Lorno, I faced the same problem, and I only get this working by overriding onDetach() and reading getFeedbackmessageModel() of my Feedbackpanels in combination with the Feedbackpanel.setMaxMessage(1). FeedbackPanel f = new FeedbackPanel("feedback"){ @Override protected void o

Re: How to get rid off Feedback Messages?

2016-02-12 Thread Lorne Malvo
How would I use that to delete FeedbackMessages if clear() and markRendered() don't work? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-rid-off-Feedback-Messages-tp4673577p4673580.html Sent from the Users forum mailing list archive at Nabble.com.

Re: How to get rid off Feedback Messages?

2016-02-12 Thread Ernesto Reinaldo Barreiro
IFeedbackMessageFilter? On Fri, Feb 12, 2016 at 3:24 PM, Lorne Malvo wrote: > > I have a form with a large number of textfields I want to validate for > numerical input. However, if multiple fields fail validation, I want to > display only a single error message. > > I'm using an AjaxSubmitLink

How to get rid off Feedback Messages?

2016-02-12 Thread Lorne Malvo
I have a form with a large number of textfields I want to validate for numerical input. However, if multiple fields fail validation, I want to display only a single error message. I'm using an AjaxSubmitLink to submit my form. To avoid displaying multiple error messages when multiple textfields

Re: How to refer to a validator message for a textfield with a certain type

2016-02-12 Thread Lorne Malvo
Thank you! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-refer-to-a-validator-message-for-a-textfield-with-a-certain-type-tp4673555p4673578.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Question About ModalWindows and IEventSink

2016-02-12 Thread Ernesto Reinaldo Barreiro
Hi, On Fri, Feb 12, 2016 at 3:34 PM, Aaron J. Garcia wrote: > Aaron J. Garcia rentec.com> writes: > > > > > Hi Martin & Sven, > > > > Thanks for your replies! > > > > I ended up sending getPage().getPageId(). Is the better practice to use > a > > PageReference? If so, I'll change my code to

Re: Question About ModalWindows and IEventSink

2016-02-12 Thread Aaron J . Garcia
Aaron J. Garcia rentec.com> writes: > > Hi Martin & Sven, > > Thanks for your replies! > > I ended up sending getPage().getPageId(). Is the better practice to use a > PageReference? If so, I'll change my code to use that instead. > > Secondly, I had no idea that you could use a Panel for th

Re: Question About ModalWindows and IEventSink

2016-02-12 Thread Aaron J . Garcia
Hi Martin & Sven, Thanks for your replies! I ended up sending getPage().getPageId(). Is the better practice to use a PageReference? If so, I'll change my code to use that instead. Secondly, I had no idea that you could use a Panel for the contents of a ModalWindow. I always thought you needed

SOLVED / Re: Question / Modular FormComponents / FormComponentPanels / AbstractFormValidator and problems with model updates

2016-02-12 Thread Patrick Davids
Hi Sven, thanx for your code-snippet. Sometimes it is so easy... Works perfect! kind regards Patrick Am 12.02.2016 um 12:08 schrieb Sven Meier: Hi, > Is it a good idea to implement such a case extending FormComponentPanel, or is FormComponentPanel for other purposes? usuallly a FormComponen

Re: Question / Modular FormComponents / FormComponentPanels / AbstractFormValidator and problems with model updates

2016-02-12 Thread Sven Meier
Hi, > Is it a good idea to implement such a case extending FormComponentPanel, or is FormComponentPanel for other purposes? usuallly a FormComponentPanel is used when you want to combine the input of several formComponents into a single model object, e.g. MultiFileUploadField and DateTimeFie

Question / Modular FormComponents / FormComponentPanels / AbstractFormValidator and problems with model updates

2016-02-12 Thread Patrick Davids
Hi all, I would like to implement some kind of modular form components. So, a developer is able stick together a form to save e.g. person data and adress data with different panels containing the particular needed input fields (textfield, selectboxes etc). Form f = new Form(...); f.add(new Pe

Re: {1}

2016-02-12 Thread jjagankumar
http://goo.gl/kmrnHv?975=vubuko&3123&jvemav==76893737 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: How to refer to a validator message for a textfield with a certain type

2016-02-12 Thread Martin Grigorov
Hi, On Fri, Feb 12, 2016 at 9:49 AM, Lorne Malvo wrote: > Thanks Martin! > > So is a validator for, say a textfield with a certain type always referred > to as "IConverter" in properties files? > > So, if I used the properties file next to my example class, say > com.MyExample.properties, would

Re: How to refer to a validator message for a textfield with a certain type

2016-02-12 Thread Lorne Malvo
Thanks Martin! So is a validator for, say a textfield with a certain type always referred to as "IConverter" in properties files? So, if I used the properties file next to my example class, say com.MyExample.properties, would my path look like: someComponent.someComponent.myTextField.IConverter=

Re: Question About ModalWindows and IEventSink

2016-02-12 Thread Sven Meier
Hi, > to pass a message from the content of my ModalWindow back to the ModalWindow itself why would you want to do that? Your ModalWindow is part of another page, so it cannot update itself in the same request. > getPage().getParent() returns null. Is there a reason for this? Each page ins

Re: Question About ModalWindows and IEventSink

2016-02-12 Thread Martin Grigorov
Hi, It is a bad practice to keep references from one page to another. Keeping reference means that serializing any of the pages will serialize the other too. For that reason there is PageReference class. You could use it to keep a "weak" reference to another page. It keeps just the page id, so it