HTML markup in Screen widgets

The widgets element within a Screen widget definition may contain one or more XML statements defining an HTML markup tag. In the cases where it isn't practical to call another widget or a FreeMarker template, you may want to insert one or more HTML directives within the Screen widget definition.

How to do it...

Adding HTML markup is as simple as the following:

  1. Within any widgets element, add one or more XML statements with HTML markup. Example XML HTML markup elements include: label, container, and link.
  2. Close all HTML markup elements with respective end tags.
  3. Save and close the file.

Note

Note: The addition of HTML markup to a widget is immediate. You do not need to restart OFBiz.

How it works..

HTML markup statements are interpreted inline (and in the order in which they are written) as the screen handler parses the screen's definition. There is a one-to-one translation between the XML-wrapped HTML markup and the target HTML output.

There's more...

The following table lists some commonly used HTML and the equivalent XML statements:

Types

HTML

XML

Plain text

Here IS Some Text

<label text="Here IS Some Text"/>

Markup tags

<h1></h1>

<p></p>

<label style="h1"></label>

<label style="p"> </label>

DIVs

<div> </div>

<container></container>

HTML hyperlink

<a href= "a URL"> Click Me!</a>

<link target="a URL" text="Click Me!"/>

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.255.178