How to add a tab?

Sergiy Dubovik <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Hi,

I downloaded latest CruiseControl, binaries 2.8.2.
>From documentation I found out that I can implement Widget interface
and modify dashboard-config.xml to add my own tab. So I implemented my
widget:

public class SecondWidget implements Widget {

    public String getDisplayName() {
        return "My Widget";
    }

    public Object getOutput(Map parameters) {
        return "Hello";
    }
}

and modified dashboard-config.xml:

<dashboard>
     <buildloop
        logsdir="logs"
        artifactsdir="artifacts" />
    <features allowforcebuild="true"/>
    <trackingtool projectname="project1"
baseurl="https://mingle05.thoughtworks.com/projects/project1/cards/"
keywords="#,build,story,card"/>
    <trackingtool projectname="project2"
baseurl="https://mingle05.thoughtworks.com/projects/project2/cards/"
keywords="#,build,story,card"/>
    <subtabs>
        <subtab
class="net.sourceforge.cruisecontrol.dashboard.widgets.ErrorsAndWarningsMessagesWidget"
/>
        <subtab
class="net.sourceforge.cruisecontrol.dashboard.widgets.MergedCheckStyleWidget"
/>
      <subtab class="net.sourceforge.cruisecontrol.dashboard.widgets.PanopticodeWidget"
/>
      <subtab class="org.dubik.widgets.SecondWidget" />
    </subtabs>
 </dashboard>


Without my widget everything works fine. I can see 3 new tabs: Errors,
CheckStyle and Panopticode. When I add my own, i get this:
HTTP ERROR: 500

argument type mismatch

RequestURI=/dashboard/tab/build/detail/Money
Caused by:

java.lang.IllegalArgumentException: argument type mismatch
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeExceptionHandler(MultiActionController.java:646)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleException(MultiActionController.java:616)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:451)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:384)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:324)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

If I remove compiled widget from WEB-INF/classes, I only get error in
console saying that my widget can't be instantiated, so I'm pretty
sure it's not a class loading issue.

Do I need to do anything else to get my widget displayed?

Thanks.

br,
Sergiy

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.