Focus navigation on form components by pressing ENTER
Hi everyone, how to set focus on next form component (TextField) by pressing on ENTER key in current TextField. Thanks in advance.
Re: Focus navigation on form components by pressing ENTER
http://stackoverflow.com/questions/4494552/change-enter-from-submission-to-tab/4494691#4494691 On 09/07/2013 12:11 PM, Farrukhjon SATTOROV (farrukh) wrote: Hi everyone, how to set focus on next form component (TextField) by pressing on ENTER key in current TextField. Thanks in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Focus navigation on form components by pressing ENTER
My code here: sizeTextField.add(new AjaxEventBehavior(ENETER_KEY_OR_SOMTHING_LIKE_THIS) { @Override protected void onEvent(AjaxRequestTarget target) { target.focusComponent(unitTextField); } }); but i don't known how handler passing ENTER key and pass this as parameter to AjaxEventBehavior. On Sat, Sep 7, 2013 at 3:36 PM, Sven Meier s...@meiers.net wrote: http://stackoverflow.com/**questions/4494552/change-** enter-from-submission-to-tab/**4494691#4494691http://stackoverflow.com/questions/4494552/change-enter-from-submission-to-tab/4494691#4494691 On 09/07/2013 12:11 PM, Farrukhjon SATTOROV (farrukh) wrote: Hi everyone, how to set focus on next form component (TextField) by pressing on ENTER key in current TextField. Thanks in advance. --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Focus navigation on form components by pressing ENTER
You don't need an ajax behavior to do this. This is all client-side javascript only, as described in the stackoverflow post. You can of course use a regular behavior to emit the necessary javascript. Carl-Eric On Sat, 7 Sep 2013 15:50:06 +0500 Farrukhjon SATTOROV (farrukh) fireda...@gmail.com wrote: My code here: sizeTextField.add(new AjaxEventBehavior(ENETER_KEY_OR_SOMTHING_LIKE_THIS) { @Override protected void onEvent(AjaxRequestTarget target) { target.focusComponent(unitTextField); } }); but i don't known how handler passing ENTER key and pass this as parameter to AjaxEventBehavior. On Sat, Sep 7, 2013 at 3:36 PM, Sven Meier s...@meiers.net wrote: http://stackoverflow.com/**questions/4494552/change-** enter-from-submission-to-tab/**4494691#4494691http://stackoverflow.com/questions/4494552/change-enter-from-submission-to-tab/4494691#4494691 On 09/07/2013 12:11 PM, Farrukhjon SATTOROV (farrukh) wrote: Hi everyone, how to set focus on next form component (TextField) by pressing on ENTER key in current TextField. Thanks in advance. --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-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: Test based on AbstractWicketTest fails with No RequestCycle is currently set
On Fri, Sep 6, 2013 at 7:41 PM, Martin Dietze d...@fh-wedel.de wrote: On Fri, September 06, 2013, Martin Grigorov wrote: 2. #testAddingAndSwitchingFields you look at the wrong test we cannot help you when we have the wrong source given Yes, sorry, I picked the wrong stacktrace, however they're all identical anyway. The method 'testAddingAndSwitchingFields' starts the same way as 'testRender': |public void testAddingAndSwitchingFields( final int numberOfFields, final ListString switchButtonPaths, final ListString expectedFieldOrder ) { |final FeedbackFormSpec formSpec = FeedbackFormSpecTestFactory.createEmpty(); |this.tester.startPage( new FeedbackFormSpecEditorTestPage( formSpec ) ); |// ... I.e., the stacktrace below is exactly the same from the moment I instanciate the test page, and the super constructor is called. Here's the stacktrace again: org.apache.wicket.WicketRuntimeException: No RequestCycle is currently set! org.apache.wicket.Component.getRequest(Component.java:1803) org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318) org.apache.wicket.Page.dirty(Page.java:249) org.apache.wicket.Page.componentStateChanging(Page.java:926) org.apache.wicket.Component.addStateChange(Component.java:3527) org.apache.wicket.Behaviors.add(Behaviors.java:55) org.apache.wicket.Component.add(Component.java:4511) com.mycompany.request.WicketContainerChecker.onInstantiation(WicketContainerChecker.java:48) What is this doing ? Does it start a new thread by chance ? Or doing something like: ThreadContext.detach() / ThreadContext.setRequestCycle(null) org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:38) org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34) org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80) org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:33) org.apache.wicket.Component.init(Component.java:683) org.apache.wicket.MarkupContainer.init(MarkupContainer.java:121) org.apache.wicket.Page.init(Page.java:168) org.apache.wicket.Page.init(Page.java:132) org.apache.wicket.markup.html.WebPage.init(WebPage.java:76) com.mycompany.ui.components.types.FeedbackFormSpecEditorTestPage.init(FeedbackFormSpecEditorTestPage.java:38) com.mycompany.ui.components.types.FeedbackFormSpecEditorTest.testAddingAndSwitchingFields(FeedbackFormSpecEditorTest.java:80) M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= I am not in a hurry. I prefer to cross the town. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tests based on WicketTester: NPE in ConcatBundleResource.readAllResources
On Fri, Sep 6, 2013 at 8:11 PM, Martin Dietze d...@fh-wedel.de wrote: On Fri, September 06, 2013, Martin Grigorov wrote: Is there a chance that you create a bundle without any resource(reference) ? Not quite sure I understand this correctly, In YourApplication#init() you something like: getResourceBundles().addXyzBundle(Class, String, resourceReferences*). For some reason some of the references cannot load its resource data. I tried avoiding the use of the ConcatBundleResource altogether by overriding the method that creates it in my Application for my test. But this did not make any difference. Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Die Freiheit ist uns ein schoenes Weib. Sie hat einen Ober- und Unterleib. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AutoCompleteTextField suggestions popup position issue when container has scrollbar
Hi, I am trying to use wicket's AutoCompleteTextField, which is placed inside a Div, and it has vertical scrollbar, in this case when scroll bar is not at 0 position, the auto complete suggestions popup is not shown next to the text box. I've attached a quickstart which helps reproducing this issue. autocomplete-test.zip http://apache-wicket.1842946.n4.nabble.com/file/n4661242/autocomplete-test.zip Is there any solution to this problem? Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-suggestions-popup-position-issue-when-container-has-scrollbar-tp4661242.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Custom Component Converter not called
Hello! I've got a problem with a TextField and the depending CustomConverter. The converter of the component is not been called. So the default converter takes the task and fails. In my case this problem occurs when my IModel.getObject returns null. The problem arises in the FormComponent.convertInput method. Because of the null value, the typeName is null and a generic typcast is made and fails. Shouldn't there be a pre-examination wheter a component converter is available? If I explicitly set a type through TextField.setType my converter is called correctly. Is that behaviour intended this way? Malte - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem with Panel default model
Hi David, Did you found the solution for this problem? I'm also facing such kind of issue. I have a Model with list of POJO. On drag/drop i'm giving ajax call and updating the paramter in POJO which is in Model. If I call sort on the list of POJO based on parameter the Model reset's to the initial stage when page is rendered. So if i do drag/drop again it picks up the wrong POJO element in the model. Please suggest I'm stuck at this point. I'm using Wicket 6 with AbstractAjaxBehaviour. Thanks, Kiran Duba -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-ajax-base-url-tp3934751p4661243.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom Component Converter not called
Hi, if you don't specify the type, a TextField will try to resolve the type from its model, see AbstractTextComponent#resolveType() and IObjectClassAwareModel. Shouldn't there be a pre-examination wheter a component converter is available? Without type there can't be a converter. Sven On 09/07/2013 08:42 PM, Malte Neumann wrote: Hello! I've got a problem with a TextField and the depending CustomConverter. The converter of the component is not been called. So the default converter takes the task and fails. In my case this problem occurs when my IModel.getObject returns null. The problem arises in the FormComponent.convertInput method. Because of the null value, the typeName is null and a generic typcast is made and fails. Shouldn't there be a pre-examination wheter a component converter is available? If I explicitly set a type through TextField.setType my converter is called correctly. Is that behaviour intended this way? Malte - 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 suggestions popup position issue when container has scrollbar
Hi, I can't find a workaround for you, but I will open an issue with a patch for the next release. Hi, I am trying to use wicket's AutoCompleteTextField, which is placed inside a Div, and it has vertical scrollbar, in this case when scroll bar is not at 0 position, the auto complete suggestions popup is not shown next to the text box. I've attached a quickstart which helps reproducing this issue. autocomplete-test.zip http://apache-wicket.1842946.n4.nabble.com/file/n4661242/autocomplete-test.zip Is there any solution to this problem? Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-suggestions-popup-position-issue-when-container-has-scrollbar-tp4661242.html Sent from the Users forum mailing list archive at Nabble.com. - 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