0

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?

1
Contributor
1
Reply
2
Views
10 Years
Discussion Span
Last Post by woopsor
0

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>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.