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 85F339554 for ; Thu, 19 Apr 2012 12:12:19 +0000 (UTC) Received: (qmail 94908 invoked by uid 500); 19 Apr 2012 12:12:18 -0000 Delivered-To: apmail-wicket-users-archive@wicket.apache.org Received: (qmail 94880 invoked by uid 500); 19 Apr 2012 12:12:18 -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 94872 invoked by uid 99); 19 Apr 2012 12:12:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2012 12:12:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.137.194.56] (HELO server54.hosting2go.nl) (83.137.194.56) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2012 12:12:10 +0000 Received: (qmail 15206 invoked from network); 19 Apr 2012 14:11:49 +0200 Received: from 188-142-74-169.ftth-aalten.ispfabriek.nl (HELO ?192.168.1.120?) (188.142.74.169) by server54.hosting2go.nl with SMTP; 19 Apr 2012 14:11:49 +0200 Message-ID: <4F900106.6060106@tbee.org> Date: Thu, 19 Apr 2012 14:11:50 +0200 From: Tom Eugelink User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: users@wicket.apache.org Subject: Re: focus locked in place References: <4F87F8BF.6020403@tbee.org> <4F883CDF.3030004@tbee.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Ok, I've opened wicket's ajax debugger and there is NO ajax call. What I see is this: INFO: focus set on INFO: focus removed from INFO: focus set on INFO: focus removed from So it seems to me the fields do not have names. However in the HTML I do see a name. However, there are more of these inputs with the same wicket:id; it's a make shift table build using a RefreshingView ... I believe I'm doing something wrong in building that make shift table. // the panel taking care of the ajax final MarkupContainer lRuntimesPanel = new WebMarkupContainer("runtimesPanel"); lRuntimesPanel.setOutputMarkupId(true); lForm.add(lRuntimesPanel); // the list of runtimes final RefreshingView lRuntimeListView = new RefreshingView("runtimes") //LicenseModel.RUNTIMES_PROPERTY) { @Override protected Iterator> getItemModels() { return new ModelIteratorAdapter(lLicenseJAXB.getRuntimes().getRuntime().iterator()) { @Override protected final IModel model(final Object object) { return new CompoundPropertyModel((com.service2media.licenseframework.service.license.jaxb.Runtime) object); } }; } @Override protected void populateItem(final Item item) { item.add( new DropDownChoice("runtimeType", new PropertyModel(item.getDefaultModel(), "type"), License.RUNTIME_TYPES)); item.add( new TextField("runtimeOs", new PropertyModel(item.getDefaultModel(), "os"))); item.add( new TextField("runtimeOsVersion", new PropertyModel(item.getDefaultModel(), "osversion"))); item.add( new TextField("runtimePoolId", new PropertyModel(item.getDefaultModel(), "poolid"))); item.add( new TextField("runtimePoolSize", new PropertyModel(item.getDefaultModel(), "poolsize"))); // remove button AjaxSubmitLink lRemoveRuntime = new AjaxSubmitLink("removeRuntime", lForm) { @Override protected void onError(AjaxRequestTarget target, Form form) { } @Override protected void onSubmit(AjaxRequestTarget target, Form form) { List lRuntimes = lLicenseJAXB.getRuntimes().getRuntime(); lRuntimes.remove(item.getModelObject()); if (target != null) target.add(lRuntimesPanel); // ajax update } @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return new JavascriptConfirmDecorator("Remove the runtime?"); } }; lRemoveRuntime.setDefaultFormProcessing(false); item.add(lRemoveRuntime); } }; lRuntimesPanel.add(lRuntimeListView); On 16-4-2012 8:54, Martin Grigorov wrote: > Hi Tom, > > Wicket keeps track of the last focused element only for Ajax requests. > I.e. Wicket sends a header in the ajax requests with the id of the > focused element when the Ajax call starter and later when the Ajax > response is processed it re-focuses this element. > Additionally there is AjaxRequestTarget#focusComponent(Component) > method which may be used to focus another element. > > If you replace the focused element in the Ajax response then > lastFocusedId will be obsolete and Wicket wont be able to find the old > component. > > I hope this helps you find out what causes the jumps in the focused elements. > > On Fri, Apr 13, 2012 at 5:49 PM, Tom Eugelink wrote: >> On 2012-04-13 11:58, Tom Eugelink wrote: >>> >>> >>> The cursor can be placed in the date fields, but not in any of the >>> textfield in the listview. >> >> >> To add some additional information; the cursor can be placed in the >> textfields by using the TAB key. A mouse click will always jump to the first >> field. So it seems to be a RefreshingView in combination with a mouse click >> problem. >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org >> For additional commands, e-mail: users-help@wicket.apache.org >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org For additional commands, e-mail: users-help@wicket.apache.org