Building web panels

🛈 Note
After adding a web panel it is good practice to flush caches in the application.

You can add a link in your web panel that will load another panel when pressed.

The HTML <a> tag has multiple attributes. In addition to the href attribute, we can set the target attribute to specify where to open the link.

Syntax:

<a target="_blank|_self|_parent|_top|framename">
  • To open a link in a new browser window, set target="_blank
  • To open a link in your panel, set target=<window name>

For example, target="project.pdetails" with link text Show project info.

Pass data with template variables

You can use template variables to pass data to the destination page to tailor it to the client context. This could be information about the current contact, person, or project.

For example, instead of http://www.search.com/search?q=SuperOffice, we can use the template variable for company name - which is <name> - and type http://www.search.com/search?q=<name>

Steps

  1. Append the template variables to the URL when editing the web panel properties.

    • Type the URL without padding (no extra spaces). SuperOffice handles the URL encoding.
    • Separate the parameters with an ampersand &.
  2. Write the code of the target webpage so that it does something useful with the template variables.

Available variables

Hidden variables

You can also pass template variables as hidden variables in your custom screens. And then do something like this in the suitable load or creation script:

User u;
u.load(getVariable("activeUser").toInteger());