Portal template taglib ver. 1.4

    Custom JSP tags library. Two visual tags: Portal and Portlet. Body tag Portal generates a "standard" portal view as a set of columns from given pages (portlets). Body contains descriptions for portlets. Tag Portlet generates a "standard" view for an individual data element in the portal. This tag just wraps own body with a colored border and add title.

For example:

Simple portal from two columns:
 


<%@ taglib uri="taglib.tld" prefix="port" %>
<html>
<port:Portal table="cellspacing=20">
   <port:Portlet border="0">
    The first portlet is here
    Your first information element
  </port:Portlet>
   <port:Portlet border="0">
    The second portlet is here
    Your second information element
  </port:Portlet>
</port:Portal>
</html>

and you will get the following picture:

The first portlet is here
Your first information element
The second portlet is here
Your second information element

You can define own parameters for the each column:
 


<%@ taglib uri="taglib.tld" prefix="port" %>
<html>
<port:Portal table="cellspacing=20">
   <port:Portlet border="0" bodyColor="yellow" column="'width=30%'">
    The first portlet is here
    Your first information element
  </port:Portlet >
   <port:Portlet border="0" bodyColor="#00FF00">
    The second portlet is here
    Your second information element
  </port:Portlet>
</port:Portal>
</html>

and you will get the following picture:

The first portlet is here
You first information element
The second portlet is here
Your second information element

When you describe portlet you may set JSP code as tag's body or as a parameter body
 


<port:Portlet border="1">
    First line<br>
    second line
</port:Portlet>
</html>

and you will get the following picture:

First line
second line

or you may have some like this:

<port:Portlet border="1" body="your_body.jsp"/>

the same with your own title:
 


<port:Portlet border="1" title="Info">
    First line<br>
    second line
</port:Portlet>
</html>

and you will get the following picture:

Info
First line
second line

Tags are:

Portal

Body tag generates a table from portlets. Parameters are:

1) table. Optional parameter. Describes common settings (attributes) for HTML table

Portlet

generates a "standard" view for portlet. Parameters are:

1) body Optional parameter. Describes your jsp file for portlet
2) column Optional parameter. Describes HTML settings for table's column with portlet.
3) border Optional parameter. Describes border. Default value is 0 (no border)
4) borderColor Optional parameter: color for the border. Default value is #0000FF (blue)
5) bodyColor Optional parameter: color for the background. Default value is #FFFFFF (white)
6) title Optional parameter. Describes title. There is no title by default
7) titleColor Optional parameter. Describes title's background. Default value is #00FF00 (green)
8) titleHeight Optional parameter. Describes title's height. Default value is 25
9) maximize Optional parameter. Describes an URL for maximize button
10) target Optional parameter. Describes target frame to hyperlink for maximize button
 

for downloading:

 Library: porttag.jar     Description: taglib.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.