Return-Path: X-Original-To: apmail-wicket-users-archive@minotaur.apache.org Delivered-To: apmail-wicket-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F7EC10896 for ; Tue, 9 Jul 2013 18:15:40 +0000 (UTC) Received: (qmail 86323 invoked by uid 500); 9 Jul 2013 18:15:38 -0000 Delivered-To: apmail-wicket-users-archive@wicket.apache.org Received: (qmail 86305 invoked by uid 500); 9 Jul 2013 18:15:37 -0000 Mailing-List: contact users-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@wicket.apache.org Delivered-To: mailing list users@wicket.apache.org Received: (qmail 86293 invoked by uid 99); 9 Jul 2013 18:15:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 18:15:36 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [173.229.255.125] (HELO omhq-meg-01.upcorp.uprr.com) (173.229.255.125) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 18:15:29 +0000 Received: from omhq16ca.uprr.com (eth0.omhq16ca.uprr.com [67.206.9.97]) by omhq-meg-01.upcorp.uprr.com with smtp id 1283_0c71_f397821e_1d11_43f8_80f2_33fd2ae5fc29; Tue, 09 Jul 2013 13:17:16 -0500 Received: from localhost (localhost [127.0.0.1]) by omhq16ca.uprr.com (postfix) with ESMTP id D4AFF2803A for ; Tue, 9 Jul 2013 13:15:07 -0500 (CDT) Received: from uprrn2.www.uprr.com (en01.omhq528c.uprr.com [69.58.249.40]) by omhq16ca.uprr.com (postfix) with ESMTP for ; Tue, 9 Jul 2013 13:15:06 -0500 (CDT) In-Reply-To: To: users@wicket.apache.org Subject: Re: FormComponent independent from the Model/Model object Message-ID: From: "Richard W. Adams" Date: Tue, 9 Jul 2013 13:15:07 -0500 Content-Type: multipart/alternative; boundary="=_alternative 006442C086257BA3_=" References: MIME-Version: 1.0 X-KeepSent: 99059145:528E6023-86257BA3:006410B5; name=$KeepSent; type=4 X-Mailer: Lotus Notes Release 8.5.2FP4 November 18, 2011 X-Disclaimed: 49183 X-EMSProtect: 0 X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 006442C086257BA3_= Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Well, one approach is create it as a normal HTML control & not render it=20 via Wicket. You can just attach a standard Javascript event (such as=20 onclick) to get the behavior you want. Bottom line: You don't have to "Wicketize" everything on your page. Just=20 because you have a hammer, it doesn't mean everything is a nail. From: Dmitriy Neretin To: users@wicket.apache.org Date: 07/09/2013 12:58 PM Subject: FormComponent independent from the Model/Model object 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 =3D new Form("id", model); form.add(new AjaxCheckBox("anyStupidId"); add(form); } } And I want to add a Component (AjaxCheckBox) to the form above, but this component shouldn't have anything to do with a model object. It's purpose is just a change the state of the input fields. If I check the box the field should be deactivated and vice versa. Nothing more. My problem is, that Wicket thinks (and I even know why :)) the "anyStupidId" is a field of MyObj and tries to change the value... Well, the checkbox should be inside of the form, but I don't know if is it possible to make this checkbox independent from the Model handling... How can I tell wicket, "hey dude, anyStupidId has nothing to do with MyObj, it is really just a stupid id" Regards, Dmitriy ** This email and any attachments may contain information that is confidential= and/or privileged for the sole use of the intended recipient. Any use, re= view, disclosure, copying, distribution or reliance by others, and any forw= arding of this email or its contents, without the express permission of the= sender is strictly prohibited by law. If you are not the intended recipie= nt, please contact the sender immediately, delete the e-mail and destroy al= l copies. ** --=_alternative 006442C086257BA3_=--