• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

want to add twitter widget in wicket , and it should work when I load the page

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am in in wicket .
I am trying to add twitter search widget in my wicket page.
https://twitter.com/about/resources/widgets/widget_search

I created a new panel and implement IHeaderContributor
public class TwitterPanel extends Panel implements IHeaderContributor{
public void renderHead(IHeaderResponse response)
{
// response.renderOnLoadJavaScript("alert('page loaded!');");


response.renderJavaScriptReference("http://widgets.twimg.com/j/2/widget.js");
response.renderOnLoadJavaScript("new TWTR.Widget({"
+"version: 2,"
+"type: 'search',"
+"search: '"+ label1.getMarkupId(true)+"',"
+"interval: 30000,"
+"title: 'It\'s a double rainbow',"
+"subject: 'Across the sky',"
+"width: 250,"
+"height: 300,"
+"theme: {"
+" shell: {"
+" background: '#8ec1da',"
+" color: '#ffffff'"
+" },"
+" tweets: {"
+" background: '#ffffff',"
+" color: '#444444',"
+" links: '#1985b5'"
+" }"
+"},"
+"features: {"
+" scrollbar: false,"
+" loop: true,"
+" live: true,"
+" behavior: 'default'"
+" }"
+"}).render().start();");



}
}


and add this panel in my main page.

I want to make it work when my main page load.
but it is not happening.
I feel like script is not called.
please help if you have any idea ...to make it work.

Thanks
Layla
 
Yeah, but does being a ninja come with a dental plan? And what about this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic