BBJSP CORE:Out Tag (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.

Description

In BBj 16.0 and higher, the out tag can be used in a BBJSPBBJSP Page to write text to the resulting HTML output that will be sent to the client browser.

Attributes

Attribute Name

Description

Required

Expression

Data Type

defaultValue

the value specifies in the defaultValue attribute will be used in the absence of a value from the value attribute.

false

false

String

escapeXML

the escapeXML attribute tells the BBJSP framework if the output needs to be escaped.

false

true

boolean

type

the type attribute specifies the type of the data specified in the value attribute.

false

false

String

value

the value attribute specifies the object that should be output.

true

true

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

<!DOCTYPE html/>

<%-- 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")
%>

<html>
<head> 
<title><c:out></title> 
</head>
<body>
<c:log message='before c:template' />
<c:template id='item' template='${template}' data='${theItem}' />
<c:log message='after c:template' />
<c:out value='${item["NAME"]}' /> 
<c:out value='${item["PRICE"]}' default='0.00' />
</body>
</html>

See Also

BBJSP

Core Tag Library