Skip Headers

Oracle Application Server Wireless Developer's Guide
10g (9.0.4)

Part Number B10948-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

G
JSP Tag Library

Mobile Studio pages are written using J2EE JSP technology, making use of the power of custom tag libraries. This section documents the custom tags available for use when customizing Mobile Studio pages.


Note:

The JSP tag library is only used to customize Mobile Studio, and is not required for developing wireless applications.


This document contains a listing of JSP tags. Tags include:

Table G-1 <om:is />
Specification in taglib Usage

<tag>

<name>is</name>

<attribute>

<name>attr</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>value</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>name</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>prefix</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<tagclass>oracle.panama.studio.taglib.IsTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>Evaluate the body if the value found from the bean matches the given value</info>

</tag>

<om:is attr= attrName value= attrValue (name= beanName) (prefix= prefixName) >.</om:is>

Note: The attributes in parenthesis are optional.

<om:is> is a body tag, that is, if the condition evaluates to true, then the body content will be processed and output as appropriate.

attr is the attribute of the bean whose value is being tested.

value is the value of the bean attribute being tested against.

name (optional) is the name of the bean in context.

prefix (optional) When asking the bean for the attribute, we add the prefix to the name of the attribute (for example, if prefix is is, and the attr is empty, then the method to invoke on the bean is isEmpty() which follows Java naming convention). If not given, then we test first get and then is as the prefixes, if neither one is found, then an exception will be thrown.

Table G-2 <om:not>
Specification in taglib Usage

<tag>

<name>not</name>

<attribute>

<name>attr</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>value</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>name</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>prefix</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<tagclass>oracle.panama.studio.taglib.NotTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>Evaluate the body if the value found from the bean does not match the given value.</info>

</tag>

<om:not attr= attrName value= attrValue (name= beanName) (prefix= prefixName) >.</om:not>

Note: The attributes in parenthesis are optional.

<om:is> is a body tag, that is, if the condition evaluates to true, then the body content will be processed and output as appropriate.

attr is the attribute of the bean whose value is being tested.

value is the value of the bean attribute being tested against.

name (optional) is the name of the bean in context.

prefix (optional) When asking the bean for the attribute, we add the prefix to the name of the attribute (for example, if prefix is is, and the attr is empty, then the method to invoke on the bean is isEmpty() which follows Java naming convention). If not given, then we test first get and then is as the prefixes, if neither one is found, then an exception will be thrown.

Table G-3 <om:get />
Specification in taglib Usage

<tag>

<name>get</name>

<attribute>

<name>attr</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>name</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<tagclass>oracle.panama.studio.taglib.GetTag</tagclass>

<bodycontent>empty</bodycontent>

<info>Gets the value of a bean attribute using reflection.</info>

</tag>

<om:get attr= attrName (name= beanName)/>

<om:get> is a simple tag, that is, it does not allow content inside its body. This tag attempts to get the attribute from the bean and outputs it if found. It does nothing if the bean or the attribute are not found.

attr is the attribute of the bean whose value is being tested.

name (optional) is the name of the bean in context.

Table G-4 <om:bean />
Specification in taglib Usage

<tag>

<name>bean</name>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<tagclass>oracle.panama.studio.taglib.BeanTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>Sets up the context for the bean.</info>

</tag>

<om:bean name= beanName/>

<om:bean> is a simple tag, that is, it does not allow content inside its body. This tag puts the bean in the context (same as JSP page context) with the given name.

attr is the attribute of the bean that is being tested.

name (optional) is the name of the bean in context.

Table G-5 <om:test />
Specification in taglib Usage

<tag>

<name>test</name>

<attribute>

<name>attr</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>value</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>prefix</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<tagclass>oracle.panama.studio.taglib.TestTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>Test if the value of a bean attribute is the same as given using reflection.</info>

</tag>

<om:test attr= attrName value= attrValue (prefix = prefix)>.</om:test>

<om:test> is a body tag, that is, its body content is evaluated and output as appropriate if the test condition evaluates to true.

attr is the attribute of the bean being tested.

value is the value of the attribute of the bean being tested against.

prefix (optional) is the prefix used when invoking the method against the bean in context.

Table G-6 <om:equals />
Specification in taglib Usage

<tag>

<name>equals</name>

<attribute>

<name>attr</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>prefix</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<tagclass>oracle.panama.studio.taglib.EqualsTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>Test if the value of a bean attribute is the same as given using reflection.</info>

</tag>

<om:equals attr= attrName name= attrName (prefix = prefix)>.</om:equals>

<om:equals> is a body tag, that is, its body content is evaluated and output as appropriate if the test condition evaluates to true.

attr is the attribute of the bean being tested.

name is the name of the attribute in context whose value is being tested against.

prefix (optional) is the prefix used when invoking the method against the bean in context.

Table G-7 <om:indexIs />
Specification in taglib Usage

<tag>

<name>indexIs</name>

<tagclass>oracle.panama.studio.taglib.IndexIsTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>Test if the index inside iteration is the same as given by the user.</info>

<attribute>

<name>value</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

<om:indexIs value= value >.</om:indexIs>

<om:indexIs> is a body tag, that is, its body content is evaluated and output as appropriate if the test condition evaluates to true.

value is the value of the index being tested against.

Table G-8 <om:indexEquals />
Specification in taglib Usage

<tag>

<name>indexEquals</name>

<tagclass>oracle.panama.studio.taglib.IndexEqualsTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>Test if the index inside iteration is the same as the value found.</info>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

<om:indexEquals name= attrName >.</om:indexEquals>

<om:indexEquals> is a body tag, that is, its body content is evaluated and output as appropriate if the test condition evaluates to true.

name is the name of the attribute in context whose value is being tested against.

Table G-9 <om:index />
Specification in taglib Usage

<tag>

<name>index</name>

<tagclass>oracle.panama.studio.taglib.IndexTag</tagclass>

<bodycontent>empty</bodycontent>

<info>Gets the current index during iteration.</info>

</tag>

<om:index/>

<om:index> is a simple tag, that is, there is no content inside the tag allowed. It simply outputs the index of the current bean which is used mostly inside <om:iterate>.

Table G-10 <om:res />
Specification in taglib Usage

<tag>

<name>res</name>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<tagclass>oracle.panama.studio.taglib.ResourceTag</tagclass>

<bodycontent>empty</bodycontent>

<info>A generic "get-resource" tag.</info>

</tag>

<om:res name= resName>.</om:res>

<om:res> is a simple tag, that is, there is no content allowed inside its body.

name is the name of the attribute in context whose value is output (if it exists).

The context is defined as the HTTP request parameter, the JSP page context, or the current HTTP session.

Table G-11 <om:enc />
Specification in taglib Usage

<tag>

<name>enc</name>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<tagclass>oracle.panama.studio.taglib.EncodeTag</tagclass>

<bodycontent>empty</bodycontent>

<info>A generic "encode-resource" tag.</info>

</tag>

Table G-12 <om:exist />
Specification in taglib Usage

<tag>

<name>exist</name>

<tagclass>oracle.panama.studio.taglib.ExistTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>A logical exists tag.</info>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

<om:exist name= attrName >.</om:exist>

<om:exist> is a body tag, that is, its body content is evaluated and output as appropriate if the test condition evaluates to true.

name is the name of the attribute in context being tested against.

The context is defined as the HTTP request parameter, the JSP page context, or the current HTTP session.

Table G-13 <om:notexist />
Specification in taglib Usage

<tag>

<name>notexist</name>

<tagclass>oracle.panama.studio.taglib.NotExistTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>A logical not-exists tag.</info>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

<om:notexist name= attrName >.</om:notexist>

<om:notexist> is a body tag, that is, its body content is evaluated and output as appropriate if the test condition evaluates to true.

name is the name of the attribute in context being tested against.

The context is defined as the HTTP request parameter, the JSP page context, or the current HTTP session.

Table G-14 <om:if />
Specification in taglib Usage

<tag>

<name>if</name>

<tagclass>oracle.panama.studio.taglib.IfTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>A logical if tag.</info>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>value</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>op</name>

<required>true</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

</tag>

<om:if name= attrName value= attrValue" op= equal >

<om:then> .</om:then>

<om:elseif name=attrName value=attrValue op=equal>

<om:then> </om:then>

<om:ese>

<om:then> </om:then>

</om:else>

</om:elseif>

</om:if>

<om:if> is used in combination with <om:elseif>, <om:else> and <om:then>.

If the application of the operator between the value of the given attribute in context and the value given evaluates to true, then the immediate child <om:then> tag's content is evaluated and output. Otherwise, the <om:elseif> or <om:else> that is an immediate child of the <om:if> is evaluated, and their contents are output as appropriate to them.

name: The name of the attribute in context whose value we want to test against.

The context is the defined as the HTTP request parameter, the JSP page context, or the current HTTP session.

value: The value of the attribute that we are testing against.

Table G-15 <om:elseif>
Specification in taglib Usage

<tag>

<name>elseif</name>

<tagclass>oracle.panama.studio.taglib.ElseIfTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>A logical elseif tag, allowed only inside if or elseif.</info>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>value</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>op</name>

<required>true</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

</tag>

<om:if name= attrName value= attrValue op= equal >

<om:then> .</om:then>

<om:elseif name=attrName value=attrValue op=equal>

<om:then> </om:then>

<om:ese>

<om:then> </om:then>

</om:else>

</om:elseif>

</om:if>

<om:elseif> is used in combination with <om:if>, <om:else> and <om:then>.

If the application of the operator between the value of the given attribute in context and the value given evaluates to true, then the immediate child <om:then> tag's content is evaluated and output. Otherwise, the <om:else> that is an immediate child of the <om:elseif> is evaluated, and its contents are output as appropriate to it.

name is the name of the attribute in context whose value is being tested against.

The context is defined as the HTTP request parameter, the JSP page context, or the current HTTP session.

value is the value of the attribute being tested against.

Table G-16 <om:else />
Specification in taglib Usage

<tag>

<name>else</name>

<tagclass>oracle.panama.studio.taglib.ElseTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>A logical else tag.</info>

</tag>

<om:if name= attrName value= attrValue op= equal >

<om:then> .</om:then>

<om:elseif name=attrName value=attrValue op=equal>

<om:then> </om:then>

<om:ese>

<om:then> </om:then>

</om:else>

</om:elseif>

</om:if>

<om:else> is used in combination with <om:elseif>, <om:else> and <om:then>.

When the parent <om:if> or <om:elseif> evaluates to false, then the content of the child <om:then> tag is evaluated and output as appropriate, otherwise, no action is taken.

Table G-17 <om:then />
Specification in taglib Usage

<tag>

<name>then</name>

<tagclass>oracle.panama.studio.taglib.ThenTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>A logical else tag.</info>

</tag>

<om:if name= attrName value= attrValue op= equal >

<om:then> .</om:then>

<om:elseif name=attrName value=attrValue op=equal>

<om:then> </om:then>

<om:ese>

<om:then> </om:then>

</om:else>

</om:elseif>

</om:if>

<om:then> is used in combination with <om:if> , <om:elseif> and <om:else>.

If the parent <om:if> , <om:elseif> and <om:else> evaluate to true, then the contents of the <om:then> tag are evaluated and output as appropriate.

Table G-18 <om:iterate />
Specification in taglib Usage

<tag>

<name>iterate</name>

<tagclass>oracle.panama.studio.taglib.IterateTag</tagclass>

<!-- teiclass>oracle.panama.studio.taglib.IterateTagTEI</teiclass -->

<bodycontent>JSP</bodycontent>

<info>An iteration tag.</info>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

<om:iterate name= collectionName >

. . .

</om:iterate>

<om:iterate> is used for iterating over a collection of bean objects. If an object with the given name is found in the context, and it is of Java Collection type, then we can loop through the collection and use each of the objects inside the collection as we loop through it. The body of the <om:iterate> tag will be output n times where n is the number of objects inside the collection.

Table G-19 <om:switch />
Specification in taglib Usage

<tag>

<name>switch</name>

<tagclass>oracle.panama.studio.taglib.SwitchTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>A switch tag.</info>

<attribute>

<name>name</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

<om:switch name= attrName>

<om:case value= value1>

</om:case>

<om:case value= value2 >

</om:case>

<om:default>

</om:default>

</om:switch>

<om:switch> is used in combination with <om:case> and <om:default>, where in <om:switch> we specify the name of the attribute we are testing upon, and inside <om:case> we specify the value of the attribute we are testing against, in case of a match, the body of the <om:case> that satisfies the match is evaluated and output as appropriate, otherwise if the <om:default > is specified, then its body is evaluated and output instead.

Table G-20 <om:case />
Specification in taglib Usage

<tag>

<name>case</name>

<tagclass>oracle.panama.studio.taglib.CaseTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>A case tag.</info>

<attribute>

<name>value</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

<om:switch name= attrName>

<om:case value= value1>

</om:case>

<om:case value= value2 >

</om:case>

<om:default>

</om:default>

</om:switch>

<om:switch> is used in combination with <om:case> and <om:default>, where in <om:switch> we specify the name of the attribute we are testing upon, and inside <om:case> we specify the value of the attribute we are testing against, in case of a match, the body of the <om:case> that satisfies the match is evaluated and output as appropriate, otherwise if the <om:default > is specified, then its body is evaluated and output instead.

Table G-21 <om:default />
Specification in taglib Usage

<tag>

<name>default</name>

<tagclass>oracle.panama.studio.taglib.DefaultTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>A default tag. </info>

</tag>

<om:switch name= attrName>

<om:case value= value1>

</om:case>

<om:case value= value2 >

</om:case>

<om:default>

</om:default>

</om:switch>

<om:switch> is used in combination with <om:case> and <om:default>, where in <om:switch> we specify the name of the attribute we are testing upon, and inside <om:case> we specify the value of the attribute we are testing against, in case of a match, the body of the <om:case> that satisfies the match is evaluated and output as appropriate, otherwise if the <om:default > is specified, then its body is evaluated and output instead.


Go to previous page Go to next page
Oracle
Copyright © 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index