BBJSP CORE:Template Tag (Deprecated)

Description

In BBj 16.0 and higher, the template tag can be used in a BBJSP Page to allow easy use of fields held in a BBjTemplatedString.

Attributes

Attribute Name

Description

Required

Expression

Data Type

data

the data attribute should evaluate to a value representative of the template.

false

true

String

id

the id attribute specifies the name of the value to be stored in the BBjspPageContext.

true

true

String

template

the template attribute format for the data attribute .

false

false

String

Remarks

The Core Tag Library library needs to be referenced in the BBJSP Page

This example demonstrates using the <c:out> tag to output a value from a BBjTemplatedString .

Example



<%-- Import the tag library --%>
<%@ taglib uri='/WEB-CFG/tld/core.tld' prefix='c' %>

<%
tpl$ = "name:c(32),price:N(12*),qty:u(1)"
t! = BBjAPI().makeTemplatedString(tpl$)
t!.setFieldValue("name","Apple")
t!.setFieldValue("price",1.20)
t!.setFieldValue("qty",3)

#PageContext!.setAttribute("template",tpl$)
System.out.println("setting item")
#PageContext!.setAttribute("theItem",t!)
System.out.println("done")
%>


 
<c:out> 





 


See Also

BBJSP

Core Tag Library