Re: Message Scroll Banner in Wickets
Great! I hope you have learnt something new while debugging this problem! :-) Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Jul 27, 2017 at 11:21 AM, ASHU_JAVA <ashu@gmail.com> wrote: > Hello All, > > I've resolved my issue by overriding the renderHead() method inside > MyPanel.java as below:- > > @Override > public void renderHead(IHeaderResponse response) { > > response.renderString(""); > response.renderOnDomReadyJavaScript("$(function () { > $('.marquee').marquee({ duration: 15000,duplicate: false, > delayBeforeStart:2000, allowCss3Support: true, gap: 600, pauseOnCycle: > true, > pauseOnHover: true });});"); > > } > > Thanks everyone. > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678315.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: Message Scroll Banner in Wickets
Hello All, I've resolved my issue by overriding the renderHead() method inside MyPanel.java as below:- @Override public void renderHead(IHeaderResponse response) { response.renderString(""); response.renderOnDomReadyJavaScript("$(function () { $('.marquee').marquee({ duration: 15000,duplicate: false, delayBeforeStart:2000, allowCss3Support: true, gap: 600, pauseOnCycle: true, pauseOnHover: true });});"); } Thanks everyone. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678315.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: Message Scroll Banner in Wickets
OK. It seems you have learned how to check for JavaScript errors. Now it is time to learn how to debug JS in the Sources tab of Dev Tools. Put a breakoint on the line with " $('.marquee').marquee({" and see whether it is executed. If it is executed then everything is fine from Wicket side. From there on it is pure JavaScript. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Jul 26, 2017 at 7:29 AM, ASHU_JAVA <ashu@gmail.com> wrote: > Hello Martin, > > Ok, I've corrected the error (*missing :*) on loading the newMarquee.js. > But even after successful loading of "newMarquee.js" (I've checked with > alert), no marquee appears(as shown in below image) :- > <http://apache-wicket.1842946.n4.nabble.com/file/n4678304/Sample_1.png> > > It will just display it as normal List Items. > > The HTML generated is as shown in below image:- > > <http://apache-wicket.1842946.n4.nabble.com/file/n4678304/Sample_2.png> > > Can you please share some inputs on how I can make the Javascript > (newMarquee.js) and CSS (MyPanel.html) execute successfully in a wicket > Panel? > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678304.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: Message Scroll Banner in Wickets
Maybe some "init JS" should be added onDomReady ? On Wed, Jul 26, 2017 at 11:29 AM, ASHU_JAVA <ashu@gmail.com> wrote: > Hello Martin, > > Ok, I've corrected the error (*missing :*) on loading the newMarquee.js. > But even after successful loading of "newMarquee.js" (I've checked with > alert), no marquee appears(as shown in below image) :- > <http://apache-wicket.1842946.n4.nabble.com/file/n4678304/Sample_1.png> > > It will just display it as normal List Items. > > The HTML generated is as shown in below image:- > > <http://apache-wicket.1842946.n4.nabble.com/file/n4678304/Sample_2.png> > > Can you please share some inputs on how I can make the Javascript > (newMarquee.js) and CSS (MyPanel.html) execute successfully in a wicket > Panel? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678304.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 > -- WBR Maxim aka solomax - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Message Scroll Banner in Wickets
Hello Martin, Ok, I've corrected the error (*missing :*) on loading the newMarquee.js. But even after successful loading of "newMarquee.js" (I've checked with alert), no marquee appears(as shown in below image) :- <http://apache-wicket.1842946.n4.nabble.com/file/n4678304/Sample_1.png> It will just display it as normal List Items. The HTML generated is as shown in below image:- <http://apache-wicket.1842946.n4.nabble.com/file/n4678304/Sample_2.png> Can you please share some inputs on how I can make the Javascript (newMarquee.js) and CSS (MyPanel.html) execute successfully in a wicket Panel? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678304.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: Message Scroll Banner in Wickets
I'd expect errors in the Network and Console tabs in the browser Dev Tools. Otherwise put a breakpoint in newMarquee.js in Sources tab and see what happens. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Jul 25, 2017 at 2:15 PM, ASHU_JAVA <ashu@gmail.com> wrote: > Hello Martin, > > I've added alerts on newMarquee.js file and they didn't get executed. > By not loading, I meant to say no CSS style effects and Javascript method > for marquee gets executed. > > I don't receive any error. > The HTML just display the mypanel content as a list instead of scrolling > marquee. > > Please share your inputs. > > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678283.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: Message Scroll Banner in Wickets
Hello Martin, I've added alerts on newMarquee.js file and they didn't get executed. By not loading, I meant to say no CSS style effects and Javascript method for marquee gets executed. I don't receive any error. The HTML just display the mypanel content as a list instead of scrolling marquee. Please share your inputs. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678283.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: Message Scroll Banner in Wickets
Hi, On Tue, Jul 25, 2017 at 1:16 PM, ASHU_JAVA <ashu@gmail.com> wrote: > Hello Martin, > > I'm trying to use "Jquery Marquee" > <https://www.npmjs.com/package/jquery.marquee>to implement the > required > functionality. > > I've made an HTML sample <https://jsfiddle.net/ttj41sdb/> (JSfiddle), > which is working fine but I'm unable to replicate the same in Java Wickets. > > Here's my code:- > > HomePage.html > > > > > HomePage.Java > > add(new MyPanel("newsDetails")); > > MyPanel.Html > > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> > > > > > > > > > > > > > > > > > > > > > > > > > > > MyPanel.Java > > public class MyPanel extends Panel { > > private static final long serialVersionUID = -7322692526459024428L; > @SpringBean(name = "manageMyApplication") > protected ManageMyApplication manageApp; > private List list; > > public MyPanel (String id) > { > super(id); > > RepeatingView repeatingView = new RepeatingView("news"); > List results = getAllItem(); //Getting List from > database > if(results!=null){ > MyBeanvalues = results.get(0); > > if(StringUtils.isNotEmpty(values.getList1())){ > repeatingView.add(new > Label(repeatingView.newChildId(),values.getList1())); > } > if(StringUtils.isNotEmpty(values.getList2())){ > repeatingView.add(new > Label(repeatingView.newChildId(),values.getList2())); > } > if(StringUtils.isNotEmpty(values.getList3())){ > repeatingView.add(new > Label(repeatingView.newChildId(),values.getList3())); > } > } > >add(repeatingView); > } > > > } > > MyResourceInitialize.java file contains javascript reference to load: > > @Override > public void renderHead(final IHeaderResponse response) { > response.renderJavaScriptReference(new > JavaScriptResourceReference(LocateResources.class, > "js/vendor/jquery.marquee.min.js")); > > response.renderJavaScriptReference(new > JavaScriptResourceReference(LocateResources.class, > "js/newMarquee.js")); > super.renderHead(response); > } > > The Javascript code has been added to "newMarquee.js" file as given below:- > > $(function () { > $('.marquee').marquee({ > > duration: 15000, > duplicate: false, > delayBeforeStart:2000, > > allowCss3Support: true, > gap: 600, > > }); > }); > > > But the issue is the Javascript file "newMarquee.js" and the css mentioned > in MyPanel.html fails to load. > Fails to load how ? Error 404 ? Another error ? What is the generated HTML ? Is 'js/newMarquee.js' next to LocateResources.class in target/classes/... ? > I've tried using AjaxEventBehavior to append Javascript in Wickets code but > that too didn't work. > > Can you please share some inputs on how to achieve this? > Thanks in advance. > > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678280.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: Message Scroll Banner in Wickets
Maybe you can share you project on github? On Tue, Jul 25, 2017 at 5:16 PM, ASHU_JAVA <ashu@gmail.com> wrote: > Hello Martin, > > I'm trying to use "Jquery Marquee" > <https://www.npmjs.com/package/jquery.marquee>to implement the > required > functionality. > > I've made an HTML sample <https://jsfiddle.net/ttj41sdb/> (JSfiddle), > which is working fine but I'm unable to replicate the same in Java Wickets. > > Here's my code:- > > HomePage.html > > > > > HomePage.Java > > add(new MyPanel("newsDetails")); > > MyPanel.Html > > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> > > > > > > > > > > > > > > > > > > > > > > > > > > > MyPanel.Java > > public class MyPanel extends Panel { > > private static final long serialVersionUID = -7322692526459024428L; > @SpringBean(name = "manageMyApplication") > protected ManageMyApplication manageApp; > private List list; > > public MyPanel (String id) > { > super(id); > > RepeatingView repeatingView = new RepeatingView("news"); > List results = getAllItem(); //Getting List from > database > if(results!=null){ > MyBeanvalues = results.get(0); > > if(StringUtils.isNotEmpty(values.getList1())){ > repeatingView.add(new > Label(repeatingView.newChildId(),values.getList1())); > } > if(StringUtils.isNotEmpty(values.getList2())){ > repeatingView.add(new > Label(repeatingView.newChildId(),values.getList2())); > } > if(StringUtils.isNotEmpty(values.getList3())){ > repeatingView.add(new > Label(repeatingView.newChildId(),values.getList3())); > } > } > >add(repeatingView); > } > > > } > > MyResourceInitialize.java file contains javascript reference to load: > > @Override > public void renderHead(final IHeaderResponse response) { > response.renderJavaScriptReference(new > JavaScriptResourceReference(LocateResources.class, > "js/vendor/jquery.marquee.min.js")); > > response.renderJavaScriptReference(new > JavaScriptResourceReference(LocateResources.class, > "js/newMarquee.js")); > super.renderHead(response); > } > > The Javascript code has been added to "newMarquee.js" file as given below:- > > $(function () { > $('.marquee').marquee({ > > duration: 15000, > duplicate: false, > delayBeforeStart:2000, > > allowCss3Support: true, > gap: 600, > > }); > }); > > > But the issue is the Javascript file "newMarquee.js" and the css mentioned > in MyPanel.html fails to load. > I've tried using AjaxEventBehavior to append Javascript in Wickets code but > that too didn't work. > > Can you please share some inputs on how to achieve this? > Thanks in advance. > > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678280.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 > > -- WBR Maxim aka solomax
Re: Message Scroll Banner in Wickets
Hello Martin, I'm trying to use "Jquery Marquee" <https://www.npmjs.com/package/jquery.marquee>to implement the required functionality. I've made an HTML sample <https://jsfiddle.net/ttj41sdb/> (JSfiddle), which is working fine but I'm unable to replicate the same in Java Wickets. Here's my code:- HomePage.html HomePage.Java add(new MyPanel("newsDetails")); MyPanel.Html http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> MyPanel.Java public class MyPanel extends Panel { private static final long serialVersionUID = -7322692526459024428L; @SpringBean(name = "manageMyApplication") protected ManageMyApplication manageApp; private List list; public MyPanel (String id) { super(id); RepeatingView repeatingView = new RepeatingView("news"); List results = getAllItem(); //Getting List from database if(results!=null){ MyBeanvalues = results.get(0); if(StringUtils.isNotEmpty(values.getList1())){ repeatingView.add(new Label(repeatingView.newChildId(),values.getList1())); } if(StringUtils.isNotEmpty(values.getList2())){ repeatingView.add(new Label(repeatingView.newChildId(),values.getList2())); } if(StringUtils.isNotEmpty(values.getList3())){ repeatingView.add(new Label(repeatingView.newChildId(),values.getList3())); } } add(repeatingView); } } MyResourceInitialize.java file contains javascript reference to load: @Override public void renderHead(final IHeaderResponse response) { response.renderJavaScriptReference(new JavaScriptResourceReference(LocateResources.class, "js/vendor/jquery.marquee.min.js")); response.renderJavaScriptReference(new JavaScriptResourceReference(LocateResources.class, "js/newMarquee.js")); super.renderHead(response); } The Javascript code has been added to "newMarquee.js" file as given below:- $(function () { $('.marquee').marquee({ duration: 15000, duplicate: false, delayBeforeStart:2000, allowCss3Support: true, gap: 600, }); }); But the issue is the Javascript file "newMarquee.js" and the css mentioned in MyPanel.html fails to load. I've tried using AjaxEventBehavior to append Javascript in Wickets code but that too didn't work. Can you please share some inputs on how to achieve this? Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678280.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: Message Scroll Banner in Wickets
Hi, What have you tried so far ? See what HTML this PHP code produces and use some Wicket repeater to implement it. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jul 17, 2017 at 6:38 AM, ASHU_JAVA <ashu@gmail.com> wrote: > Hello All, > > I'm a beginner in Wickets and want to know how to implement an auto > scrolling banner in Wickets. > I've to create a banner in my Website to display 3 rows from the database. > The text of these 3 database rows should be displayed in a auto-scrolling > banner, something like this:- > > http://www.javafile.com/tickers/scroll.php > <http://www.javafile.com/tickers/scroll.php> > > The scrolling time should be configurable. > > Can anyone please guide me how to achieve this in Apache Wicket? > > Thanks in advance. > > > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245.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 > >
Message Scroll Banner in Wickets
Hello All, I'm a beginner in Wickets and want to know how to implement an auto scrolling banner in Wickets. I've to create a banner in my Website to display 3 rows from the database. The text of these 3 database rows should be displayed in a auto-scrolling banner, something like this:- http://www.javafile.com/tickers/scroll.php <http://www.javafile.com/tickers/scroll.php> The scrolling time should be configurable. Can anyone please guide me how to achieve this in Apache Wicket? Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245.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