How Can I use EL in JSF

Dear AllI want to add If condition in JSF page .How can I use EL at JSF pageI want ot Add If condition .With Thanks and RegardsGunjan Bohra
[181 byte] By [Gunjan-Bohraa] at [2007-11-27 9:19:08]
# 1
You can use conditional expressions in EL. Basic example:<h:someComponent someAttribute="#{myBean.someBooleanValue ? 'someString' : 'anotherString'}" />
BalusCa at 2007-7-12 22:11:02 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Also, you may be interested in the rendered attribute, which appears on nearly every JSF component.
RaymondDeCampoa at 2007-7-12 22:11:02 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Actually By Problem Is Regarding DataTable Binding Method

<f:subview id="vesselist" rendered="#{vesselBaseVO.dfsVO.dfsData.dfsResultBeanListSize>0}" >

<t:dataTable value="#{vesselBaseVO.dfsVO.dfsData.dfsResultBeanList}"

sortable="false"

var="result"

id="dfsTable"

forceId="true"

rowClasses="AlternateRow1, AlternateRow2"

columnClasses="TableColumnText, TableColumnText, TableColumnText, TableColumnText, TableColumnText, TableColumnText, TableColumnText, TableColumnNumber, TableColumnNumber, TableColumnText"

headerClass="TableHeader"

frame="box"

width="100%"

preserveDataModel="false"

rows="10" binding="#{vesselBackingBean.searchResultDataTable}" rendered="true">

</t:dataTable>

</f:subview>

Although I had block it with renderer attribute ,

DataTable would not show if resultList size is 0 but

DATA Table binding method is still called even dataTable is not rendered on page I want to block that binding method calling ...

How can I do that !!!!

Gunjan-Bohraa at 2007-7-12 22:11:02 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

> Although I had block it with renderer attribute ,

> DataTable would not show if resultList size is 0

That's simple:<h:dataTable value="#{myBean.list}" rendered="#{!empty myBean.list}" />

> but DATA Table binding method is still called even

> dataTable is not rendered on page I want to block

> that binding method calling ...

Why? It sounds like that you're trying to hide bad designs.

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

> Although I had block it with renderer attribute ,

> DataTable would not show if resultList size is 0 but

> DATA Table binding method is still called even

> dataTable is not rendered on page I want to block

> that binding method calling ...

Even if the rendered attribute is false, the component still exists within the view and it is entirely proper for the JSF implementation to invoke your binding. In fact, the managed bean could manipulate the rendered attribute of the data table after the binding is invoked.

It seems to be that it shouldn't be too hard to modify your code to handle the fact that the binding method will always be called.

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