Condition Check problem

Hi,

I am new in jsf, I have got a problem...

I have a bean namedUserBean, It has a age property.

I want check a condition on Age property, and using JSTL for that, The Code is like that...

<c:if test ="${UserBean.age>17}">

<h:outputText value=" You are Adult"/>

</c:if>

Can Any one help me?

It will be better if any one send me code....

Thanks

Palash

[531 byte] By [Palasha] at [2007-11-27 4:06:01]
# 1
u can control by using render property instead of JSTL.Srikanth
srikanthga at 2007-7-12 9:11:02 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

The 'rendered' attribute to be precise :) You can put any boolean expression in it. When this evaluates to true, then the component and it's children will be rendered, otherwise if false, then they will be hidden.

Some basic examples:<h:someComponent rendered="#{myBean.booleanValue}" />

<h:someComponent rendered="#{myBean.intValue > 10}" />

<h:someComponent rendered="#{myBean.objectValue == null}" />

<h:someComponent rendered="#{myBean.stringValue != 'someValue'}" />

<h:someComponent rendered="#{!empty myBean.collectionValue}" />

<h:someComponent rendered="#{!myBean.booleanValue && myBean.intValue != 0}" />

<h:someComponent rendered="#{myBean.stringValue == 'oneValue' || myBean.stringValue == 'anotherValue'}" />

BalusCa at 2007-7-12 9:11:02 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...