You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ian Godman <ia...@yahoo.co.uk> on 2007/09/03 16:28:26 UTC

How to exclude from model update

Hi

I have a little problem with an AJAX submit button.

The template is:
         <input type="submit" wicket:id="AddButton-link" value="Add" />

In the java this is:
            add( new AjaxSubmitLink("AddButton-link"){
                private static final long serialVersionUID = 1L;
                @Override
                public void onSubmit(AjaxRequestTarget target, Form form){
                .........
                });

My problem is that when I submit the form it tries to update a model property for the submit link.
    ERROR 2007-09-03 14:38:04,816 [btpool0-4] org.apache.wicket.RequestCycle: No get method defined for class: class com............Model expression: AddButton-link

I am sure its one of those simple things I am missing again but how do I tell wicket not to try to update the button in the model ?


Ian







      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 

Re: How to exclude from model update

Posted by Matej Knopp <ma...@gmail.com>.
Yeah, but this way you are treating only effect. I think the error shouldn't
happen in a first place.

-Matej



On 9/3/07, Sam Hough <sa...@redspr.com> wrote:
>
>
> You could give it a dummy IModel of just new Model()...
>
>
> Ian Godman wrote:
> >
> > Hi
> >
> > I have a little problem with an AJAX submit button.
> >
> > The template is:
> >          <input type="submit" wicket:id="AddButton-link" value="Add" />
> >
> > In the java this is:
> >             add( new AjaxSubmitLink("AddButton-link"){
> >                 private static final long serialVersionUID = 1L;
> >                 @Override
> >                 public void onSubmit(AjaxRequestTarget target, Form
> form){
> >                 .........
> >                 });
> >
> > My problem is that when I submit the form it tries to update a model
> > property for the submit link.
> >     ERROR 2007-09-03 14:38:04,816 [btpool0-4]
> > org.apache.wicket.RequestCycle: No get method defined for class: class
> > com............Model expression: AddButton-link
> >
> > I am sure its one of those simple things I am missing again but how do I
> > tell wicket not to try to update the button in the model ?
> >
> >
> > Ian
> >
> >
> >
> >
> >
> >
> >
> >       ___________________________________________________________
> > Yahoo! Answers - Got a question? Someone out there knows the answer. Try
> > it
> > now.
> > http://uk.answers.yahoo.com/
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-exclude-from-model-update-tf4372466.html#a12462629
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: How to exclude from model update

Posted by Sam Hough <sa...@redspr.com>.
You could give it a dummy IModel of just new Model()...


Ian Godman wrote:
> 
> Hi
> 
> I have a little problem with an AJAX submit button.
> 
> The template is:
>          <input type="submit" wicket:id="AddButton-link" value="Add" />
> 
> In the java this is:
>             add( new AjaxSubmitLink("AddButton-link"){
>                 private static final long serialVersionUID = 1L;
>                 @Override
>                 public void onSubmit(AjaxRequestTarget target, Form form){
>                 .........
>                 });
> 
> My problem is that when I submit the form it tries to update a model
> property for the submit link.
>     ERROR 2007-09-03 14:38:04,816 [btpool0-4]
> org.apache.wicket.RequestCycle: No get method defined for class: class
> com............Model expression: AddButton-link
> 
> I am sure its one of those simple things I am missing again but how do I
> tell wicket not to try to update the button in the model ?
> 
> 
> Ian
> 
> 
> 
> 
> 
> 
> 
>       ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the answer. Try
> it
> now.
> http://uk.answers.yahoo.com/
> 

-- 
View this message in context: http://www.nabble.com/How-to-exclude-from-model-update-tf4372466.html#a12462629
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to exclude from model update

Posted by Matej Knopp <ma...@gmail.com>.
What wicket version are you using?

-Matej

On 9/3/07, Ian Godman <ia...@yahoo.co.uk> wrote:
>
> Hi
>
> I have a little problem with an AJAX submit button.
>
> The template is:
>          <input type="submit" wicket:id="AddButton-link" value="Add" />
>
> In the java this is:
>             add( new AjaxSubmitLink("AddButton-link"){
>                 private static final long serialVersionUID = 1L;
>                 @Override
>                 public void onSubmit(AjaxRequestTarget target, Form form){
>                 .........
>                 });
>
> My problem is that when I submit the form it tries to update a model
> property for the submit link.
>     ERROR 2007-09-03 14:38:04,816 [btpool0-4]
> org.apache.wicket.RequestCycle: No get method defined for class: class
> com............Model expression: AddButton-link
>
> I am sure its one of those simple things I am missing again but how do I
> tell wicket not to try to update the button in the model ?
>
>
> Ian
>
>
>
>
>
>
>
>       ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the answer. Try
> it
> now.
> http://uk.answers.yahoo.com/