Re: Loading Javascript for wicket component
When you use the 'target' of AjaxRequestTarget, you can use the method appendJavaScript(..) in it. You can call a function in JavaScript in it. In that way, you are loading a JavaScript with and for a Wicket component. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670989.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: Loading Javascript for wicket component
http://www.7thweb.net/wicket-jquery-ui/datepicker/DefaultDatePickerPage Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, May 25, 2015 at 2:56 PM, avchavan wrote: > DatePicker javascript > > > this is what i have. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670885.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: Loading Javascript for wicket component
DatePicker javascript this is what i have. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670885.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: Loading Javascript for wicket component
Nope. There is no file. I don't need the jquery.datepicker.js file. I need your glue code that makes the TextField's input a datepicker. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, May 25, 2015 at 2:50 PM, avchavan wrote: > file uploaded. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670883.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: Loading Javascript for wicket component
file uploaded. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670883.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: Loading Javascript for wicket component
Please show me the JS code On May 25, 2015 2:56 PM, "avchavan" wrote: > Martin, i get your point. But would this work if my .js file is not being > loaded unless i refresh? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670881.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: Loading Javascript for wicket component
Martin, i get your point. But would this work if my .js file is not being loaded unless i refresh? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670881.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: Loading Javascript for wicket component
I still think you need to tell the JS widget that the text field is visible. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, May 25, 2015 at 2:16 PM, avchavan wrote: > The entire code written in javascript and it works. > If i just keep the HTML pages then it loads the datepicker at startup but > in > my case the datpicker.js is not being picked up when the modal window > opens...if i refresh the page then it gets loaded and everything works fine > after that. > So, is there a way to ensure that the javascript file gets loaded when the > modal window opens? > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670879.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: Loading Javascript for wicket component
The entire code written in javascript and it works. If i just keep the HTML pages then it loads the datepicker at startup but in my case the datpicker.js is not being picked up when the modal window opens...if i refresh the page then it gets loaded and everything works fine after that. So, is there a way to ensure that the javascript file gets loaded when the modal window opens? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670879.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: Loading Javascript for wicket component
le(true); > } > > this.endDateOption.add(new AjaxEventBehavior("onClick"){ > @Override > > protected void onEvent(AjaxRequestTarget target) { > toDate.setEnabled(true); > target.add(toDate); > Here you repaint the textfield but I'd expect to have something like: $('#textFieldId').datepicker(); > } > }); > } > > } > > > Modal Window HTML Code: > > > > > Call for Modal Window: > > final DateChangeModalWindow dateChangeModalWindow = new > DateChangeModalWindow("dateChangeModalWindow", this); > add(dateChangeModalWindow); > add(new AjaxFallbackLink("modalWindow") { > > @Override > public void onClick(AjaxRequestTarget target) { > > dateChangeModalWindow.setModelObject(modelObject); > dateChangeModalWindow.setVisible(true); > if(target != null){ > target.add(dateChangeModalWindow); > } > } > > }); > > I have included the required .js files in my parent HTML. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670875.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: Loading Javascript for wicket component
s); add(dateChangeModalWindow); add(new AjaxFallbackLink("modalWindow") { @Override public void onClick(AjaxRequestTarget target) { dateChangeModalWindow.setModelObject(modelObject); dateChangeModalWindow.setVisible(true); if(target != null){ target.add(dateChangeModalWindow); } } }); I have included the required .js files in my parent HTML. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871p4670875.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: Loading Javascript for wicket component
Hi, On Mon, May 25, 2015 at 9:14 AM, avchavan wrote: > Hi, > I am using a custom .js file as a datepicker. > the datepicket is visible when i click on the edit button. > what happens is the datepicker icon doesnt show up after clicking on edit > button. > but if i refresh the page the icon shows up. > What could possibly the issue and resolution for such behavior? > You don't repaint everything that needs to be repainted. Show us some code to be able to help you more. > > Thanks > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871.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 > >
Loading Javascript for wicket component
Hi, I am using a custom .js file as a datepicker. the datepicket is visible when i click on the edit button. what happens is the datepicker icon doesnt show up after clicking on edit button. but if i refresh the page the icon shows up. What could possibly the issue and resolution for such behavior? Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loading-Javascript-for-wicket-component-tp4670871.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