Yanel Toolbar

Enable/Disable/Suppress

The Yanel toolbar can be enabled by appending the query string ?yanel.toolbar=on to any URL, whereas please make sure that the toolbar usecase/rights are also configured correctly within your realm access policies.

In order to avoid typing the query string one can set a "toolbar zone" within the browser window, which becomes active when hovering with the mouse at such a particular area (see src/realms/from-scratch-realm-template/data-repo/data/app1/xslt/global.xsl) or set a shortcut/redirect.

The toolbar can be disabled by appending the query string ?yanel.toolbar=off or by clicking on the toolbar menu "Yanel" and clicking on the menu item "Turn off toolbar".

In some cases one might want to suppress the toolbar, for example when using an iframe. One can suppress the toolbar by appending the query string ?yanel.toolbar=suppress. The toolbar gets also omitted when adding the query string ?yanel.resource.usecase=SOME_USECASE (see YanelServlet.java).

Toolbar Customization

One can customize the toolbar per realm, whereas one can either overwrite/implement the Toolbar class/interface itself or just overwrite/implement the Menu class/interface.

The "from scratch" realm provides an example of a Toolbar customization: src/realms/from-scratch-realm-template/realm.xml (see menu element)

The "yanel website" realm provides an example of a Menu customization: src/realms/yanel-website/realm.xml (see menu element)

Please note that both versions use the menu element to configure the Java class.

In order to develop your custom menu please consider the following steps:

  1. Write your own MyRealmMenu.java class, which for example extends the DefaultMenu.java or DefaultMenuV2.java (see for example src/realms/yanel-website/src/java/org/wyona/yanel/website/menu/impl/YanelWebsiteMenu.java).
  2. By convention please add your custom Menu class into the direcotory MY_REALM/src/java
  3. Make sure that your realm contains a realm build file MY_REALM/build.xml (see for example src/realms/yanel-website/build.xml).
  4. Make sure that your realm contains a MY_REALM/src/build/build.properties and MY_REALM/src/build/dependencies.xml files (see for example src/realms/yanel-website/src/build/). Please don't forget to set the webapp library dependency (see for example src/realms/yanel-website/src/build/dependencies.xml)!
  5. Build the menu by running inside YANEL_HOME: ./build.sh -f MY_REALM/build.xml or just build Yanel itself again.
  6. Add <menu class="MyRealmMenu"/> inside the file MY_REALM/realm.xml.
  7. Restart Yanel and visit your Realm and activate the toolbar (explained above...)
  8. Congratulations! You should see now your customized toolbar. :D



Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.