Re: AutoCompleteTextField
Hi Chris, let me guess: Your panel passes its model to its child components. If you change the panels model later on, the child components still refer to the original model. Have fun Sven On 19.05.2015 23:37, Chris wrote: Hi Sven, it works when I set the object of the existing panel’s model but do not replace the model: existModel.setObject(new List…); panel.setDefaultModel(existModel) Why doesn’t it work when replacing the model at all? panel.setDefaultModel(newModel) br, Chris Am 19.05.2015 um 23:11 schrieb Sven Meier s...@meiers.net: Hi, panel.setDefaultModel(searchModel); does your panel pass its model to the repeater component? Regards Sven On 19.05.2015 23:04, Chris wrote: Hi, I have implemented the AutoComplete text field. Based on the input, I would like to change the model of a panel to show an updated list of elements. In the below code, the method #getObject of the searchModel never gets executed and the panel’s list is not refreshed. What might be missing? Thanks, Chris add(new AjaxFallbackLink(searchButton) { @Override public void onClick(AjaxRequestTarget target) { IModelListA searchModel = new ListModelA() { @Override public ListA getObject() { ListA list = Lists.newArrayList(); MapString, A map = service.getObjects(); for (String name : map.keySet()) { list.add(map.get(name)); } return list; } }; panel.setDefaultModel(searchModel); panel.modelChanged(); target.add(panel); send(getPage(), Broadcast.BREADTH, new ShowItem(target)); } }); Am 19.05.2015 um 16:36 schrieb Sven Meier s...@meiers.net: Sure, just implement #getChoices() accordingly. Have fun Sven On 19.05.2015 16:32, Chris wrote: Hi all, can the auto complete text field also be used in that way that it autocompletes words in the middle, too? Such as „minster“ for „Westminster Abbey“? In the example below only autocompletion for comparison of text start is demonstrated. http://www.wicket-library.com/wicket-examples-6.0.x/ajax/autocomplete?1 http://www.wicket-library.com/wicket-examples-6.0.x/ajax/autocomplete?1 Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AutoCompleteTextField
Hi Chris, AutoCompleteTextField writes the text into its model as any normal textField: Either when the form is submitted, or - if you added an FormComponentUpdatingBehavior(change) - when the user leaves the input field. Regards Sven On 19.05.2015 23:47, Chris wrote: HI Sven, how is it possible to get the input from the text field when the user does not select one value from the listed choices, but type in some text? I would also like to get this value, but currently the model does not get updated in this case. Thanks, Chris Am 19.05.2015 um 16:36 schrieb Sven Meier s...@meiers.net: Sure, just implement #getChoices() accordingly. Have fun Sven On 19.05.2015 16:32, Chris wrote: Hi all, can the auto complete text field also be used in that way that it autocompletes words in the middle, too? Such as „minster“ for „Westminster Abbey“? In the example below only autocompletion for comparison of text start is demonstrated. http://www.wicket-library.com/wicket-examples-6.0.x/ajax/autocomplete?1 http://www.wicket-library.com/wicket-examples-6.0.x/ajax/autocomplete?1 Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ClientProperties.getBrowserWidth() always returns -1
Hi, You can use AjaxBrowserInfoBehavior. On May 20, 2015 6:19 PM, smallufo small...@gmail.com wrote: It seems the ClientProperties is cached in session. Even if I resize the window , it will show the first result. Is it possible to get the latest browser width/height ? Thanks. 2015-04-18 20:23 GMT+08:00 Martin Grigorov mgrigo...@apache.org: Hi, Check wicket-examples. There are demos of (Ajax)BrowserInfo On Apr 17, 2015 10:56 PM, smallufo small...@gmail.com wrote: 2015-04-18 9:53 GMT+08:00 smallufo small...@gmail.com: getApplicationSettings().setUploadProgressUpdatesEnabled(true); typo It is *getRequestCycleSettings().setGatherExtendedBrowserInfo(true);* width is still -1
Re: AutoCompleteTextField
Hi Sven, it works now - I have put the field into a form and override onSelected as well as added an AjaxFormSubmitBehaviour. thanks, Chris Am 20.05.2015 um 09:22 schrieb Sven Meier s...@meiers.net: Hi Chris, AutoCompleteTextField writes the text into its model as any normal textField: Either when the form is submitted, or - if you added an FormComponentUpdatingBehavior(change) - when the user leaves the input field. Regards Sven On 19.05.2015 23:47, Chris wrote: HI Sven, how is it possible to get the input from the text field when the user does not select one value from the listed choices, but type in some text? I would also like to get this value, but currently the model does not get updated in this case. Thanks, Chris Am 19.05.2015 um 16:36 schrieb Sven Meier s...@meiers.net: Sure, just implement #getChoices() accordingly. Have fun Sven On 19.05.2015 16:32, Chris wrote: Hi all, can the auto complete text field also be used in that way that it autocompletes words in the middle, too? Such as „minster“ for „Westminster Abbey“? In the example below only autocompletion for comparison of text start is demonstrated. http://www.wicket-library.com/wicket-examples-6.0.x/ajax/autocomplete?1 http://www.wicket-library.com/wicket-examples-6.0.x/ajax/autocomplete?1 Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ClientProperties.getBrowserWidth() always returns -1
2015-05-20 23:27 GMT+08:00 Martin Grigorov mgrigo...@apache.org: You can use AjaxBrowserInfoBehavior. I think you mean AjaxClientInfoBehavior http://www.wicket-library.com/wicket-examples-6.0.x/ajaxhellobrowser/?0 Thanks . it's working well ! But I have another question. Is there any way to get the containing element's width ? for example : *div class=col-xs-12 col-sm-4 img wicket:id=img//div* It will have different proportion in different width for XS (extreme small) screen , it will be 100% width and for SM (small) or larger screen , it will cover 1/3 width Is it possible to dynamically get the width of the containing element ? (so that I can generate correct width image ) Thanks.
Re: ClientProperties.getBrowserWidth() always returns -1
It seems the ClientProperties is cached in session. Even if I resize the window , it will show the first result. Is it possible to get the latest browser width/height ? Thanks. 2015-04-18 20:23 GMT+08:00 Martin Grigorov mgrigo...@apache.org: Hi, Check wicket-examples. There are demos of (Ajax)BrowserInfo On Apr 17, 2015 10:56 PM, smallufo small...@gmail.com wrote: 2015-04-18 9:53 GMT+08:00 smallufo small...@gmail.com: getApplicationSettings().setUploadProgressUpdatesEnabled(true); typo It is *getRequestCycleSettings().setGatherExtendedBrowserInfo(true);* width is still -1