-Igor
I'm now using the latest source from the repository. That doesn't appear to be the answer.
After testing in FireFox and using the _javascript_ console there I get the error message: "WicketAjaxPost is not defined".
Thanks for the continuing help!
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Igor Vaynberg
Sent: Thursday, March 16, 2006 3:28 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] _javascript_ error when using AjaxCheckBox - Wicket-1.2-beta1
i think the problem is that you didnt call checkbox.setOutputMarkupId(true) so its markup id never made it into the markup.
i made the ajax behavior smarter, it will now call that for you whenever it is attached.
so either do the call yourself, or update to trunk.
-Igor
On 3/16/06, Mark Southern < [EMAIL PROTECTED]> wrote:
I'm getting a _javascript_ error: "Error: Object expected" when clicking on a checkbox in a form. The server request is not sent.
The java code and rendered html are shown below. I note that wicket adds a js script to the page and that the path for this doesn't exist.
Any help would be greatly appreciated.
Thank you.
<script language="_javascript_" type="text/_javascript_" src="">
<td><input type="checkbox" wicket:id="checkbox" checked="checked" name="rows:4:checkbox" >
final AjaxCheckBox checkBox = new AjaxCheckBox("checkbox", new PropertyModel(value,"Selected"))
{
public void onUpdate(AjaxRequestTarget target)
{
System.out.println("Ajax update");
value.setSelected( ! value.getSelected() );
target.addComponent(this);
}
};
listItem.add(checkBox);