DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JSP (http://www.daniweb.com/forums/forum24.html)
-   -   <c:if problem. (http://www.daniweb.com/forums/thread92144.html)

woopsor Oct 8th, 2007 10:18 am
<c:if problem.
 
I am new to JSP and am having trouble with an if statement.

<c:if test="#{authorizedProduct.product.product.orderMethod}=='H'">
  <h:outputText id="orderMethod" value="#{authorizedProduct.product.product.orderMethod}"/>
</c:if>

The order method does equal H because it will display that if I don't put in inside the if statement. Can someone help me with my if statement syntax please?

woopsor Oct 8th, 2007 11:15 am
Re: <c:if problem.
 
I figured it out. Changed it to this.

<c:set var="OrderMethod" value="#{authorizedProduct.product.product.orderMethod}"></c:set>
<c:if test="${OrderMethod != null}">
  <h:outputText id="orderMethod" value="#{authorizedProduct.product.product.orderMethod}" />
</c:if>


All times are GMT -4. The time now is 3:46 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC