page:pageAttribute

This tag let’s you share and use shared data between components globally on a page. Data can be anything but keep it simple. This is an essential part of the new preprocessing mechanism. If no value is given the tag assumes you wish to read the value of that attribute and returns it. Otherwise it save the value.

Parameters

Name

Required

Default

Type

Description

name

true

 

Object/String

The name of the variable/attribute.

value

false

 

Object/String

The value to save in the attribute.

 

Examples

The following example shows how we first store a value and then reads it again. If you read the description of the new preprocessing mechanism you can share it between templates. Otherwise it’s very dependent on rendering order.

<%@ taglib uri="infoglue-page" prefix="page" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<page:pageAttribute name="dummyVar" value="Testing"/>

The variable is <page:pageAttribute name="dummyVar”/>



comments powered by Disqus