Hello again,
I have been playing around with wicket pages in ignition and although I believe I understand the very basics of how wicket works, I am still quite green.
I am trying to customize my config page by adding my own markup. I understand that my markup should be the child of “ConfigPanel.html” since my page extends the “ConfigPanel” class. So I have included a wicket:extend" tag in the html. I have also tried placing my markup in different folders. When I place it in my “resources” folder, the resulting jar in the modl file has the markup alongside the class files I made. However when I include it in my “src/main/java” folder it is not.
Either way, when I install my module and load up the page, it is still completely blank. If not mine, which html file is my page paired with, and how can I customize it?
I noticed that the “Home Connect” example includes no html at all, however the “Modbus Driver” example adds a Config Panel much in the same way I want to. What makes these two examples different?
Also I’ve read about a “WebDev” module but was unable to find it anywhere.
LRSSettingsPage.html
[code]
[/code]LRSSettingsPage.java
[code]public class LRSSettingsPage extends ConfigPanel{
public LRSSettingsPage(final IConfigPage configPage) {
super("LRS.lrsPageTitle");
this.initComponents();
}
protected void initComponents(){
Form form = new Form("form");
Button myButton = new Button("submit-button");
form.add(new Component[] { myButton });
this.add(new Component[] { form });
}
public Pair<String, String> getMenuLocation() {
return Pair.of("lrs", "lrs_manager");
}
}[/code]
GatewayHook.java
[code]public class GatewayHook extends AbstractGatewayModuleHook {
private final Logger logger = LoggerFactory.getLogger(getClass());
public static final ConfigCategory CONFIG_CATEGORY = new ConfigCategory(“lrs”, “LRS.nav.header”, 750);
@Override
public List getConfigCategories() {
return Collections.singletonList(CONFIG_CATEGORY);
}
public static final IConfigTab LRS_CONFIG_ENTRY = DefaultConfigTab.builder()
.category(CONFIG_CATEGORY)
.name(“lrs_manager”)
.i18n(“LRS.nav.settings”)
.page(LRSSettingsPage.class)
.terms(“LRS settings”)
.build();
@Override
public List<? extends IConfigTab> getConfigPanels() {
return Arrays.asList(
LRS_CONFIG_ENTRY
);
}
@Override
public void setup(GatewayContext gatewayContext) {
BundleUtil.get().addBundle(“LRS”, getClass(), “LRS”);
}
@Override
public void startup(LicenseState licenseState) {
logger.info(“Starting up LRS module”);
try{
LRSManager.sendPage("10.107.008.220", 3700);
}catch(Exception ex){
logger.error("Could not send page");
}
logger.info("Finished LRS startup");
}
@Override
public void shutdown() {
BundleUtil.get().removeBundle("LRS");
}
}[/code]