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
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic