makumba hackers: this page is generated, don't edit it! Instead edit the text in the included pages.

Taglib documentation for tag mak:attribute#


Displays the value of an attribute, or sets it to a Java variable.


Name Required Runtime expression Description Comments
name true false
the name of the attribute. Will be printed if var is not present and there is no exception when finding the argument. If there is an exception but exceptionVar is indicated, nothing will be printed.
var false false
The name of the java.lang.Object variable where to store the attribute value. Note that you will have to cast it to its specific type.

exceptionVar false false
The name of the created java.lang.Throwable variable that will hold eventual exceptions raised when trying to compute the attribute. If exceptionVar is missing, any raised exception will stop page execution. If it is present, and AttibuteNotFoundException occurs, the attribute is set to null (so a next request for the attribute will return null)

db false true
The database in which the business logic (if any) will compute the attribute. The default database is normally used.



<mak:attribute name="pattern" var="pattern" exceptionVar="exception"/>

<% if (exception!=null) {
     pageContext.setAttribute("pattern", (String)pattern+"%");
   <mak:list from="type t" where="t.field like $pattern" >...</mak:list>

<% } else { %>
   No pattern argument. Please indicate one.
<% } %>

Category Documentation

Add Comment
« This page was last updated on August 1 2010