aspose file tools*
The moose likes JSF and the fly likes If - else with JSF ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "If - else with JSF ?" Watch "If - else with JSF ?" New topic
Author

If - else with JSF ?

Kurt Boets
Greenhorn

Joined: Oct 19, 2004
Posts: 14
Hello,

I would like to perform a check while iterating over an Array. If
the value is equal to a certain number , the background must be blue, white otherwise.

In old jsp it would be something like:
<% for(int i=0;i<ArrayToIterate.length;i++){
if(ArrayToIterate.value) == 2{ %>
<td bgcolor="blue">BLaBLA</td>
<% }else{ %>
<td bgcolor="white">BLaBLA</td>
}
}
%>

How do you do it in JSF ?
This is my for loop...

<x ataList id="something"
value="#{ArrayToIterate}"
var="TEST">

and here I want to perform a check ->
<h utputText value="#{ArrayToIterate.value}" />



Thx.
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
What are you tring to do ?
I think using dataTable you can easily do this by just specifying rowClasses attribute.


- Varun
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: If - else with JSF ?
 
Similar Threads
Change TD width in Netscape 4
session management problem with iframes
Problem displaying a dynamic table on a JSP....
integration of struts- jsf Problem related t url
JSP error 500