OK. It's clicked. I was hoping to have a simple ajaxed submit link
without having to create a fake property on the model object. No problem,
I can see what I missed.
Thanks for your help Igor.
Tim
you said it yourself:
Insure that the component identifier names match
the appropriate
you can, just give the cpm reference to link as the model.
-igor
On Wed, Apr 9, 2008 at 1:31 AM, Tim Squires [EMAIL PROTECTED] wrote:
OK. It's clicked. I was hoping to have a simple ajaxed submit link
without having to create a fake property on the model object. No problem,
I can see
I have read it - a few times over the last 3 years of using Wicket and
even bought the book ;)
It says
To use a CompoundPropertyModel, simply set one as the model for a
container, such as a Form or a Page. Create the contained components with
no model of their own. Insure that the component
you said it yourself:
Insure that the component identifier names match
the appropriate property names.
what that says is that the model you get is the property of the model
object that is in the cpm with the name of component id.
so since your links id is foo it will try to pull out the model
Hi,
When adding an AjaxSubmitLink, the onSubmit method tries to access a
property of the model object that does not exists:
---
final AjaxSubmitLink confirmLink = new
AjaxSubmitLink(confirm) {
@Override
public void onSubmit(final
Thanks Igor but should it not pick-up the model from the Form? There's no
constructor that takes a model. Should the AjaxSubmitLink(id, form)
constructor be used with the Form that it's being added to? e..g
MyForm extends Form {
public MyForm(){
add( new AjaxSubmitLink(mylink,this){
no, components do not randomly pick up models from their parents. i
would suggest reading the models wiki page.
-igor
On Mon, Apr 7, 2008 at 3:11 PM, Tim [EMAIL PROTECTED] wrote:
Thanks Igor but should it not pick-up the model from the Form? There's no
constructor that takes a model.