Re: FormComponent independent from the Model/Model object

2013-07-10 Thread Dmitriy Neretin
ew > PropertyModel("myCheckBoxState", MyPanel.this)); > add(form); >} > > } > > ~ Thank you, > Paul Bors > > -Original Message- > From: Joachim Schrod [mailto:jsch...@acm.org] > Sent: Tuesday, July 09, 2013 6:27 PM > To: users@wicket.apache.org

RE: FormComponent independent from the Model/Model object

2013-07-09 Thread Paul Bors
, MyPanel.this)); add(form); } } ~ Thank you, Paul Bors -Original Message- From: Joachim Schrod [mailto:jsch...@acm.org] Sent: Tuesday, July 09, 2013 6:27 PM To: users@wicket.apache.org Subject: Re: FormComponent independent from the Model/Model object Dmitriy Neretin wrote:

Re: FormComponent independent from the Model/Model object

2013-07-09 Thread Joachim Schrod
Dmitriy Neretin wrote: > Hi everyone, > > I have a dummy question: > > If I have a panel with a form (not everything is my code) -> > > public class MyPanel{ > > public MyPanel(id, IModel model){ > super(id, new CompoundPropertyModel(model); > > Form form = new Fo

Re: FormComponent independent from the Model/Model object

2013-07-09 Thread Marios Skounakis
If you want to change the state of the input fields via javascript then do what Richard said. I guess since you are using an AjaxCheckBox you want to do it on the server side via ajax. So, here's what you need to do: add a boolean property to the Panel (e.g. "componentsEnabled") and bind AjaxCheck

Re: FormComponent independent from the Model/Model object

2013-07-09 Thread Richard W. Adams
Well, one approach is create it as a normal HTML control & not render it via Wicket. You can just attach a standard Javascript event (such as onclick) to get the behavior you want. Bottom line: You don't have to "Wicketize" everything on your page. Just because you have a hammer, it doesn't mea