Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

<xperiencentral-version> is the version of XperienCentral you are using. The last three parameters (groupId, artifactId and classprefix) should be modified for your particular plugin. The groupId and artifactId are used not only by XperienCentral but also by Maven (click here for more information). The groupId is also used as a Java package name and should in most cases be the same as the groupId for other components in the same project. The artifactId is also used as a unique identifier (the WCB ID ) for the plugin). The class prefix is used as a prefix for different Java classes which are generated. Give it a meaningful, but not too long name.

...

Code Block
languagejava
themeEclipse
    private DojoModule getSidebarModule() {
        // The module id should start with the WCBplugin id
        String moduleId = WCBConstants.WCB_ID + ".sidebar.helloworldsidebarwidget";

        // The path maps onto the src/main/resources/dojotype/<WCB<plugin ID>/sidebar/${classprefix}.js file
        String path = WCBConstants.WCB_ID + "/sidebar/HelloWorld";
        DojoModule module = new DojoModuleImpl(moduleId, ModuleType.SIDEBAR_WIDGET, TITLES, DESCRIPTIONS,
                "GX Software B.V.", "resources/helloworldsidebarwidget.png", path);
        return module;
    }

...

Common CSS styling of the HTML is defined in HelloWorld.html. Note that every CSS selector starts with the identifier of the plugin (Artifact ID or WCB ID or plugin ID). This matches the class of the top level tag in the HTML. It is important to separate the CSS of different widgets from each other and from other CSS used within XperienCentral. When you start adding your own CSS selectors, remember to always start by matching this identifier. For example:

...