aspose file tools
The moose likes JSF and the fly likes Reg:Facing problem with <choose > and <when > tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Reg:Facing problem with <choose > and <when > tags" Watch "Reg:Facing problem with <choose > and <when > tags" New topic

Reg:Facing problem with <choose > and <when > tags

dhanaraja rajendran

Joined: Nov 02, 2012
Posts: 3
Hi ,
i have declared the required tag libs like this on top of my xhtml page

<html xmlns=""

from my below code
<hutputText value="#{fn:length(my String)}"/> <========>>> is priting as 450 which correct
<hutputText value="#{fn:length(my String) > 350}"/> <========>>> is priting as "true" which is also perfect
<c:when test="#{fn:length(myString) > 350}"> <=========>> but it is not going inside c:when ..instead of it is going to ctherwise
<hutputText value="#{fn:substring(my String, 0, 350)}..."/>
<hutputText value="#{my String}"/>
</c therwise>

Note: 1.If I am manualy setting test="#{true}" or test="true" it is properly workng and going inside <c:when>
2. If iam using test="${true}" ie,instead of # symbol if i am using $ also same problem occurs for me..

can anybody please help me out from this problem
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16737

Welcome to the JavaRanch, Dhanaraja!

We have a "Code" button that generates special tags in the message editor for wrapping sample code, XML, and other formatted text. It makes such things a lot easier to read. No smiley faces for one thing.

I do not recommend using JSTL with JSF. JSF has native equivalents that work much better.

Customer surveys are for companies who didn't pay proper attention to begin with.
It is sorta covered in the JavaRanch Style Guide.
subject: Reg:Facing problem with <choose > and <when > tags