aspose file tools*
The moose likes Other Application Frameworks and the fly likes want to add twitter widget in wicket   , and it should work when I load the page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "want to add twitter widget in wicket   , and it should work when I load the page" Watch "want to add twitter widget in wicket   , and it should work when I load the page" New topic
Author

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

Layla Rashid
Ranch Hand

Joined: Dec 25, 2006
Posts: 36
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
 
subject: want to add twitter widget in wicket , and it should work when I load the page