This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

Layla Rashid
Ranch Hand
Posts: 36
  • 0
  • 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 make it work.

I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic