You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by "Baker,Jonathan" <Ba...@oclc.org> on 2006/10/16 21:15:20 UTC

Node Stamp Facet, af:commandNavigationItem rendered attribute, and boolean operators

I am using the af:page component.  Inside of the NodeStamp facet I am
referencing a af:commandNavigationItem with a rendered attribute.
Inside of the rendered attribute I am calling two methods on the same
backing bean and ANDing them together.  For some reason this makes my
navigation hierarchy disappear.

If the rendered attribute looks like this #{navItem.rendered} it works
correctly
If the rendered attribute looks like this #{navItem.authorized} it works
correctly
If the rendered attribute looks like this #{navItem.rendered &&
navItem.authorized} then nothing is rendered even though both values =
true.

I have used the same combination outside of the node stamp facet and the
components are rendered correctly, so it is somehow related to how the
nodestamp facet of the page component is rendered.  

As a work-around I have created a method in my backing bean that
performs the anding of the two methods, so that is not a problem, I just
preferred to have these two methods separated as they stand for two
different sets of criteria.


JB


RE: Node Stamp Facet, af:commandNavigationItem rendered attribute, and boolean operators

Posted by "Baker,Jonathan" <Ba...@oclc.org>.
I tried and and got the same results.  I should have mentioned that in
my previous post.  Sorry about that.


JB

-----Original Message-----
From: Adam Winer [mailto:awiner@gmail.com] 
Sent: Monday, October 16, 2006 7:16 PM
To: adffaces-user@incubator.apache.org
Subject: Re: Node Stamp Facet, af:commandNavigationItem rendered
attribute, and boolean operators

Have you seen what happens if you use "and" instead of "&&"?
I'm guessing this is an EL syntax problem.

-- Adam


On 10/16/06, Baker,Jonathan <Ba...@oclc.org> wrote:
>
> I am using the af:page component.  Inside of the NodeStamp facet I am 
> referencing a af:commandNavigationItem with a rendered attribute.
> Inside of the rendered attribute I am calling two methods on the same 
> backing bean and ANDing them together.  For some reason this makes my 
> navigation hierarchy disappear.
>
> If the rendered attribute looks like this #{navItem.rendered} it works

> correctly If the rendered attribute looks like this 
> #{navItem.authorized} it works correctly If the rendered attribute 
> looks like this #{navItem.rendered && navItem.authorized} then nothing

> is rendered even though both values = true.
>
> I have used the same combination outside of the node stamp facet and 
> the components are rendered correctly, so it is somehow related to how

> the nodestamp facet of the page component is rendered.
>
> As a work-around I have created a method in my backing bean that 
> performs the anding of the two methods, so that is not a problem, I 
> just preferred to have these two methods separated as they stand for 
> two different sets of criteria.
>
>
> JB
>
>
>

Re: Node Stamp Facet, af:commandNavigationItem rendered attribute, and boolean operators

Posted by Adam Winer <aw...@gmail.com>.
Have you seen what happens if you use "and" instead of "&&"?
I'm guessing this is an EL syntax problem.

-- Adam


On 10/16/06, Baker,Jonathan <Ba...@oclc.org> wrote:
>
> I am using the af:page component.  Inside of the NodeStamp facet I am
> referencing a af:commandNavigationItem with a rendered attribute.
> Inside of the rendered attribute I am calling two methods on the same
> backing bean and ANDing them together.  For some reason this makes my
> navigation hierarchy disappear.
>
> If the rendered attribute looks like this #{navItem.rendered} it works
> correctly
> If the rendered attribute looks like this #{navItem.authorized} it works
> correctly
> If the rendered attribute looks like this #{navItem.rendered &&
> navItem.authorized} then nothing is rendered even though both values =
> true.
>
> I have used the same combination outside of the node stamp facet and the
> components are rendered correctly, so it is somehow related to how the
> nodestamp facet of the page component is rendered.
>
> As a work-around I have created a method in my backing bean that
> performs the anding of the two methods, so that is not a problem, I just
> preferred to have these two methods separated as they stand for two
> different sets of criteria.
>
>
> JB
>
>
>