Skip to main content

JSTL in Facelets not working as expected.

3 replies [Last post]
tracker09
Offline
Joined: 2007-09-07
Points: 0

I'm attempting do something like this.

4">

2">

When this renders I get the following.

This isn't exactly what I was looking for. I know the Facelets handles the JSTL on my page, why would it do so in this manner? I would like to be able to set the rendered property directly here without binding it to something in the backing bean.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ryan Lubke

The namespace mapping:

xmlns:c="http://java.sun.com/jstl/core"

Should be:

xmlns:c="http://java.sun.com/jsp/jstl/core"

On 3/30/10 1:31 PM, webtier@javadesktop.org wrote:
> I'm attempting do something like this.
>
>
> > xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:ice="http://www.icesoft.com/icefaces/component"
> xmlns:c="http://java.sun.com/jstl/core">
>
>
>
>
>

>
>
>

>
>
>
>

>
> When this renders I get the following.
>
>
>
>
>

>
>
>
>

>

tracker09
Offline
Joined: 2007-09-07
Points: 0

You were right. I thought I had tried that before but I guess not. The namespace change fixed it.

digitalseraphim
Offline
Joined: 2008-04-30
Points: 0

If your "problem" is that the first button never renders, then I would say, it is working as written. Your first test says "if 2 is greater than 4, set rendered to true". this [b]is not[/b] true, so do nothing. Your second test says "if 5 is greater than 2, set rendered to false". This [b]is[/b] true, so rendered is set to false.

If this is not your "problem" then, please enlighten us, as with your current information, we can't help.

-ds

(edit: just noticed the part that says "When this renders I get the following." sorry)

Message was edited by: digitalseraphim