What actually needs to be contained in a widget jar? Libraries? Cans omeone provide an example jar listing of a widget? Thanks.
Take a look at the widget section in the Developer community for an overview of what's required for building and deploying widgets: http://www.jivesoftware.com/jivespace/docs/DOC-3301
We also cover this in our online training course: http://www.jivetraining.com
This is the tutorial I have been following; yet it doesnt contain some curtial information. Specifically, what is the jar supposed to contain - in terms of a directory structure... Normall, a jar's root could contain the inital directory in the package path, as well as the META-INF directory. From the tutorial; it says:
In the widget JAR, this file will be located at <jar_root>/classes/beans/HelloWorldWidget.properties.
This leads me to believe that the jars directory structure should be (assuming your package is 'com.company.widget'):
classes/com/company/widget/HelloWorldWidget.class
classes/beans/HelloWorldWidget.properties
resources/HelloWorldWidget.ftl
scripts/
plugin.xml
Regardless; I have tried that directory structure along without the 'classes' directory in there and none seem to work (is there a sample HelloWorldWidget.jar out there that I can see?). I can add the widget in the admin interface, but cannot see it when I try to customize a specific page. Is there any logging file that may show errors?
My WidgetTypeMarker is set to:
@WidgetTypeMarker({WidgetType.HOMEPAGE, WidgetType.PERSONALIZEDHOMEPAGE, WidgetType.COMMUNITY, WidgetType.PROJECT})
So, it should be accessable everywhere..
I am having a rough time trying to debug why the widget is not accessable.
The directory structure mentioned above was correct; I had some other errors preventing the widget from dispalying.
classes/com/company/widget/HelloWorldWidget.class
classes/beans/HelloWorldWidget.properties
resources/HelloWorldWidget.ftl
scripts/
plugin.xml
Logs are located in the sbs.log file
one other problem I found with the widget tutorial was how to locate the FTL file; it would be:
private static final String FREEMARKER_FILE = "/plugins/<NAME FROM plugin.xml>/resources/<FTL FILE NAME>";
Jive combines collaboration software, community software & social networking software into the leading SBS solution.
© Copyright 2000–2009 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205