Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue with if-else conditional statements in JSF

user8769643Oct 15 2009 — edited Oct 18 2009
Hi ,

I have an existing JSP which i need to modify using JSF tags. I need to perform some conditional checks to render the h:outputText components in a dataTable column.

My original JSP:
if (ap.License()) { %>
         <%=ap.getMaxRows()%>
         <% if (ap.getMaxRows()<=ap.getUsedRows() && ap.wheels.size()>0) { 
               if (ap.getMaxRows()<ag.getUsedRows()) { %>
                  <span class='text_red'>Over Limit: </span>
               <% } else {%>
                   <span class='text_red'>At Limit: </span>
               <%}%>
               No available Rows </br>
             <%}%>    
      <% } else if (ap.getWheels()) { %>
       <%=ap.getWheelsSU()%>
      <%} else { %>
          No Limit
      <%}%>		
Basically some nested if-else conditions . So i want to test these conditions using JSTL 1.1 <c:if> or <c:choose> tag. Please let me know if there is a better way to do this.

Thanks and appreciate your help in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2009
Added on Oct 15 2009
4 comments
2,323 views