pow2webgui

pow2webgui tag library This is version 1.0 .

Required attributes are marked with a * .

window

Can contain: JSP

Example

Window widget. Renders windows-like widgets. Example:


<%@ taglib uri="/WEB-INF/webgui.tld" prefix="gui" %>

<gui:window title="prova2" prototype="boWindow" color="#f0f0f0">

  <!-- put here your window content -->
  <table width="450" border="0" cellspacing="0" cellpadding="2" style="font-size: x-small">
  <input type="hidden" value="26" >
  <tr>
    <td>department</td>
    <td><input type="text" value="department1"  size="50"></td>
  </tr>
  <tr>
    <td valign="top">description</td>
    <td><textarea cols="38" rows="8"></textarea></td>
  </tr>
  <tr>
    <td>thumbnail</td>
    <td><input type="file" size="38"></td>
  </tr>
  <tr>
    <td>image</td>
    <td><input type="file" size="38"></td>
  </tr>
  <tr>
    <td>parent</td>
    <td>
      <select size="1">
        <option value="1">1
        <option value="2">2
      </select>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="right">
      <input type="submit"  value="update">
    </td>
  </tr>
  </table>
  <!-- end of window content -->

</gui:window>

    

Attributes

NameDescription
*drawer defines the drawer class that will be used to prepare and render the widget.
colorsets the window body color; use the format #rrggbb.
heightsets the window height. Not used
idid attribute.
titleset the title text for text type, or the image source for image type.
titleType defines the window title type. It can be: "text" - title attribute value is used directly as the title string"image" - title attribute value point out the image filepath
widthsets the window width.

tabbedSelector

Can contain: JSP

Example

Defines an HTML tabbedSelector component. Example:


<%@ taglib uri="/WEB-INF/webgui.tld" prefix="gui" %>

<%
   String tab = request.getParameter("webGUI.tabbedSelector.tab");

  // set the default selected tab;
  if (Util.isNull(tab)) tab = "tab1";
%>

<gui:tabbedSelector name        = "myTabbedSelector"
                    drawer      = "backoffice"
                    followUp    = "tab.jsp"
                    color       = "#f0f0f0"
                    width       = "100"
                    selectedTab = "<%=tab %>">

  <gui:tab drawer="backoffice" name="tab1" title="click me">
    Hello !! This is tab1.
  </gui:tab>

  <gui:tab drawer="backoffice" name="tab2" title="or me!">
    ...and this is tab2.
  </gui:tab>

  <gui:tab drawer="backoffice" name="tab3" title="and me?">
    while this is tab3..
  </gui:tab>

</gui:tabbedSelector>

    

Attributes

NameDescription
*drawerdefines the drawer class that will be used to prepare and render the widget.
colorsets the tabbedSelector body color; use the format #rrggbb.
followUp the URL associated with the tabbedSelector selected tab. If the followUp attribute of the selected tab does not override the tabbedSelector followUp attribute, the tabbedSelector component appends to the current page URL the string: "webGUI.tabbedSelector.${tabbedSelectorName}.tab=${selectedTab_name}" where selectedTab_name is the name of the selected tab.
idid attribute.
namethe name of the tabbedSelector component.
selectedTabthe name of the tabbedSelector tab component to select.
width sets the width of the tabbedSelector component. The width management is left to the related drawer class; for example, "amazon" drawer uses the width parameter to set the width of the "amazon" tabbedSelector bottom bar, while "backoffice" drawer uses this value to set the width of the right-most part of the "backoffice" tabbedSelector component.

tab

Can contain: JSP

Example

Defines an Tab for a parent tabbedSelector component. Example:


<gui:tab drawer="backoffice" name="tab1" title="click me">
  Hello !! This is a "window".
</gui:tab>

    

Attributes

NameDescription
*drawerdefines the drawer class that will be used to prepare and render the widget.
colorsets the tabbedSelector body color; use the format #rrggbb.
followUp the URL associated with the tabbedSelector selected tab. If the followUp attribute of the selected tab does not override the tabbedSelector followUp attribute, the tabbedSelector component appends to the current page URL the string"webGUI.tabbedSelector.tab={selectedTab_name}" where selectedTab_name is the name of the selected tab.
idid attribute.
namesets the tab name.
titlesets the tab title.
titleType defines the window title type. It can be: "text" - title attribute value is used directly as the title string"image" - title attribute value point out the image filepath

lister

Can contain: JSP

Example

Defines an HTML lister component. Example:


<gui:lister drawer="amazon" name="newsLister" title="news">
  ...
</gui:lister>

    

Attributes

NameDescription
*drawerdefines the drawer class that will be used to prepare and render the widget.
*titlesets the lister title.
colorsets the lister body color; use the format #rrggbb.
followUp the URL associated with the lister tab.
idid attribute.
namesets the lister name.
titleType defines the lister title type. It can be: "text" - title attribute value is used directly as the title string"image" - title attribute value point out the image filepath
widthsets the lister width.

contentProvider

Can contain: JSP

Example

Definesa contentProvider for a given component. Example:

<%
  Collection myCollection = myObject.getMyCollection();
  HashMap map = new HashMap();
  map.put("name",    "myName");
  map.put("surname", "mySurname");
%>

<gui:lister width="100" drawer="amazon" title="welcome">
  <gui:contentProvider name          = "default"
                       collection    = "<%=myCollection %>"
                       propertiesMap = "<%=map %>"
                       template      = "myTemplate.vm"/>
</gui:lister>

    

Attributes

NameDescription
*collectionthe collection object
*namethe name of the content provider class.
*templatethe template path
propertiesMap a properties HashMap that contains further informations that can be used into the Velocity template. Reference a map entry using its key name.