• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Layla Rashid
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am in in wicket .
I am trying to add twitter search widget in my wicket page.

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.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'"
+" }"


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.

Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!