Re: behaviour and busy indicator
I just cant believe it... so easy yet I didnt firgure it out myself. Thank you very much! :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/behaviour-and-busy-indicator-tp4568683p4570104.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
behaviour and busy indicator
Hello, I'm trying get Ajax Indicator working for my form validating behaviour. Basically I have a thing that takes time to check on server. Meanwhile I'd like to show user a busy indicator. I tried to do following thing: *This is page class, with basic form input:* //...omitted some not revelant code AjaxIndicatorAppender indicator = new AjaxIndicatorAppender(); final RequiredTextFieldString nickField = new RequiredTextFieldString( nick, new PropertyModelString( this, nickValue ) ); formContainer.add( nickField ); indicator.bind(nickField); nickField.add( new MyValidatingBehaviour( (Form) formContainer, onkeyup, Duration.ONE_SECOND, indicator ) ); //... *And this is my validating behaviour:* private class MyValidatingBehaviour extends AjaxFormValidatingBehavior implements IAjaxIndicatorAware { AjaxIndicatorAppender indicator; private MyValidatingBehaviour( Form? form, String event, final Duration throttleDelay, AjaxIndicatorAppender indicator ) { super( form, event ); this.setThrottleDelay( throttleDelay ); this.indicator = indicator; } @Override public String getAjaxIndicatorMarkupId() { return indicator.getMarkupId(); } } Of course there are some other validators than required one, I just ommited 'em here. The thing is, that I dont have any indicator sign anywhere. Docs says that it appeds span, yet I couldnt find any in HTML. The HTML looks simple as this: form wicket:id=form input wicket:id=nick class=textInput id=nick/ /form Any help whats wrong? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/behaviour-and-busy-indicator-tp4568683p4568683.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
Fireing jQuery script after closing modal Window but in certain situations
Hello there, I have some serious problem with modal window and it's simply driving me crazy :) Lets start from the beginning. I have a page with a button. After clicking it user gets a modal window with some basic form to edit his data. Part of code looks like this: HTML: JAVA: To explain: PlainModalWindow is class that extends ModalWindow and has some my own css/js files rendered in head, that's all. Now my created page via method createPage() contains 3 different clickable buttons: Submit, Cancel and an X in upper right corner to close modal. Now when user click Cancel and X, they do same thing, clear inputs and close modal with method close( AjaxRequestTarget ). They look something like this: And then there is a Submit button which after validation saves user data and close modal as well, nothing fancy there. The probles starts here: I'm setting a WindowClosesCallback with javascript appended to AjaxRequestTarget. It works great, when I close modal with submit or cancel, script is fired on parent site. But I want the script to be fired ONLY when user hits the submit button. I cant override setWindowClosedCallback() in onSubmit() method of AjaxSubmitLinks and I simply ran out of ideas how to do it, any help? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Fireing-jQuery-script-after-closing-modal-Window-but-in-certain-situations-tp4099505p4099505.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: Fireing jQuery script after closing modal Window but in certain situations
I was using forum so code, that's odd, anyway repeat message with code pasted to github: Hello there, I have some serious problem with modal window and it's simply driving me crazy :) Lets start from the beginning. I have a page with a button. After clicking it user gets a modal window with some basic form to edit his data. Part of code looks like this: https://gist.github.com/84c8839452e4b54d6c39/66d19045c96a558cfd601f4a0e70cbfc39cac8d6 HTML Java To explain: PlainModalWindow is class that extends ModalWindow and has some my own css/js files rendered in head, that's all. Now my created page via method createPage() contains 3 different clickable buttons: Submit, Cancel and an X in upper right corner to close modal. Now when user click Cancel and X, they do same thing, clear inputs and close modal with method close( AjaxRequestTarget ). They look something like this: https://gist.github.com/d0e69d03e2d4deb869b7/4b2701e6519c582262a00bd22eb5752410335786 Rest code And then there is a Submit button which after validation saves user data and close modal as well, nothing fancy there. The probles starts here: I'm setting a WindowClosesCallback with javascript appended to AjaxRequestTarget. It works great, when I close modal with submit or cancel, script is fired on parent site. But I want the script to be fired ONLY when user hits the submit button. I cant override setWindowClosedCallback() in onSubmit() method of AjaxSubmitLinks and I simply ran out of ideas how to do it, any help? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Fireing-jQuery-script-after-closing-modal-Window-but-in-certain-situations-tp4099505p4101536.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