I've followed this post in trying to add a status panel to my Module
However it's a pretty old post and it doesn't seem to work.
I have created all the items outlined in the post and it does compile
I have further more followed the WebPage-Gateway example and added an Abstract Tab in my Hook as follows
private static final INamedTab WEBSOCKET_STATUS_PAGE = new AbstractNamedTab(
"websocket",
StatusCategories.SYSTEMS,
"WebSocketsConnector.nav.status.header") {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer getPanel(String panelId) {
return new WebSocketStatusWebMarkupContainer("contents");
}
@Override
public Iterable<String> getSearchTerms(){
return Arrays.asList("home connect", "hce");
}
};
Then I overrode the getStatusPanels()
@Override
public List<? extends INamedTab> getStatusPanels()
{
return Arrays.asList(WEBSOCKET_STATUS_PAGE);
}
This gives me a link in the System Status Menu to my WebSocket status
However clicking on the link yields an error
org.apache.wicket.markup.MarkupException: Unable to find component with id 'child' in [WebMarkupContainer [Component id = contents]] Expected: 'contents.child'. Found with similar names: ''
My guess is that my issue is in my WebSocketMarkupContainer.java I couldn't find any documentation on this, I created this class but it seems that getPanel requires a WebMarkupContainer
package com.jnjdodev.ignition.modules.websocket.web;
import org.apache.wicket.markup.html.WebMarkupContainer;
public class WebSocketStatusWebMarkupContainer extends WebMarkupContainer {
/**
*
*/
private static final long serialVersionUID = 1L;
public WebSocketStatusWebMarkupContainer(String id) {
super(id);
// TODO Auto-generated constructor stub
this.add(new WebSocketStatusWebPanel("contents"));
}
}
All this is doing is instantiating a WebMarkupContainer and then adding my simple "WebSocketStatusWebPanel" to it as a component.
However this yields the above error, am I anywhere in the ballpark here?