the other thing that causes problems very often is this:
rendered="#{xxx.xxx"
no errror-message, no nothing-no output as well where you could check...
I have been spending hours on searching the cause for problems like this.
regards,
Martin
>
> (Normally would ask another developer to look over my code, but there's only
> 1 & his away for 3 weeks)
>
>
>
> Also #{UserController.user.isPQE} does not work.
>
>
>
> Jeff.
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 21 October 2005 14:34
> To: [email protected]
> Subject: RE: IF statement..?
>
>
>
> Use
>
> <h:outputLabel rendered="{#UserController.user.PQE}" for="finalLiability"
>
>
>
> Rather than
>
> <h:outputLabel rendered="{#UserController.user.isPQE}" for="finalLiability"
>
>
>
>
>
>
>
>
> Stefan Maric | IT & Professional Services | BT Global Services
>
> E: [EMAIL PROTECTED] | www.bt.com/globalservices
>
>
>
> This electronic message contains information from British Telecommunications
> plc, which may be privileged
>
> or confidential. The information is intended for use only by the
> individual(s) or entity named above. If you
>
> are not the intended recipient, be aware that any disclosure, copying,
> distribution or use of the contents of
>
> this information is strictly prohibited. If you have received this
> electronic message in error, please notify
>
> me by telephone or email (to the number or email address above) immediately.
>
>
>
> Activity and use of the British Telecommunications plc e-mail system is
> monitored to secure its effective
>
> operation and for other lawful business purposes. Communications using this
> system will also be monitored
>
> and may be recorded to secure effective operation and for other lawful
> business purposes.
>
>
>
> British Telecommunications plc. Registered office: 81 Newgate Street London
> EC1A 7AJ Registered in
>
> England no: 1800000
>
>
>
> <hr size=2 width="100%" align=center tabindex=-1>
>
> From: Jeffrey Porter
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 21, 2005 1:27 PM
> To: MyFaces Discussion
> Subject: RE: IF statement..?
>
>
>
>
> What am I missing here?
>
>
>
> <h:outputLabel rendered="{#UserController.user.isPQE}" for="finalLiability"
> value="#{my_properties['NCM_label_finalLiability']}" />
>
>
>
> &&
>
>
>
> <h:selectOneRadio
>
> rendered="{#UserController.user.isPQE}"
>
> required="true"
>
> disabledClass="bodyheading"
>
> enabledClass="bodyheading"
>
> id="finalLiability"
>
> value="#{nonConformingMaterial.finalLiability}"
>
> immediate="true"
>
> layout="lineDirection"
>
> styleClass="selectOneRadio">
>
>
>
> <f:selectItem itemValue="0"
> itemLabel="#{ebusiness_properties['NCM_label_finalLiability_0']}" />
>
> <f:selectItem itemValue="1"
> itemLabel="#{ebusiness_properties['NCM_label_finalLiability_1']}" />
>
> </h:selectOneRadio>
>
>
>
>
>
> Code…
>
>
>
> public class User implements Serializable
>
> {
>
> ………REMOVED OTHER CODE………….
>
>
>
> public boolean isPQE()
>
> {
>
> boolean x = Arrays.asList(roles).contains(User.PQE_ROLE);
>
> return x;
>
> }
>
> }
>
>
>
> When ever I debug I never hit the method isPQE(). Also neither of the above
> JSF tags get rendered, no matter what is returned by the method.
>
>
>
> I can get other values from the user bean.
>
>
>
> e.g. this works…
>
> <h:outputText value="#{UserController.user.firstName}" />
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 20 October 2005 18:54
> To: MyFaces Discussion
> Subject: Re: IF statement..?
>
>
>
>
> [EMAIL PROTECTED] wrote on 10/20/2005 01:50:37 PM:
>
> >
> > "Jeffrey Porter" <[EMAIL PROTECTED]>
> wrote on
> > 10/20/2005 01:45:04 PM:
> >
> > >
> > >
> > > Does MyFaces contain an IF statement?
> > >
> > > Something like…
> > >
> > > <x:if user.admin == true >
> > > <h:outputLabel value="ADMIN" />
> > > <x:else >
> > > <h:outputLabel value="NOT ADMIN" />
> > > </x>
> > >
> > >
> > > I would put my IF statement in JSP.
> > > But this doesn't seem to work.
> > >
> > > For example
> > >
> > > <%=user.admin%>
> > >
> >
> > You should I think be able to use the "rendered" attribute within
> > <h:outputLabel..? As in:
> > <h:outputLabel value="ADMIN" rendered="user.admin" />
> >
>
> umm,.. sorry.. I meant: rendered="#{user.admin}"
>
> > Geeta
--
http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German