You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by bansi <ma...@yahoo.com> on 2008/07/04 04:43:29 UTC
JSF/Facelets with Spring Security 2.0.2
I am able to successfully implement Acegi JSF Component for Spring Security
2.0.2 into Facelets file from the link
http://cagataycivici.wordpress.com/2006/01/19/acegi_jsf_components_hit_the/
acegi_jsf_components
but we have a requirement when a user is not in a particular role, then
simply making it read-only field or even combining conditional processing
e.g.
if value of “status” = “new” and role = “customer” then component is
editable else component is read only.
--
View this message in context: http://www.nabble.com/JSF-Facelets-with-Spring-Security-2.0.2-tp18271738p18271738.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: JSF/Facelets with Spring Security 2.0.2
Posted by Cagatay Civici <ca...@gmail.com>.
Hello Bansi,
AcegiJSF has a limitation here, it's only good if you want to show/hide
components. In order to overcome this and bring some flexibility, I've added
the SecurityContext EL
extension. It works with Acegi(Spring Security) and Container Security out
of the box.
http://wiki.apache.org/myfaces/SecurityContext
Cagatay
On Fri, Jul 4, 2008 at 6:31 AM, Kito D. Mann <km...@virtua.com> wrote:
> Bansi,
>
> You should be able to use the disabled property and an EL expression to do
> this. I'm not familiar with Acegi, but it would be something like this:
>
> <h:inputText value="#{myBean.value}" disabled="#{user.status != 'new'}"/>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Kito D. Mann - Author, JavaServer Faces in Action
> http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
> phone: +1 203-653-2989
> fax: +1 203-653-2988
>
> Come to the first annual JSFOne Conference this September! Visit
> http://www.jsfone.com for details.
>
>
> > -----Original Message-----
> > From: bansi [mailto:mail2bansi@yahoo.com]
> > Sent: Thursday, July 03, 2008 10:43 PM
> > To: users@myfaces.apache.org
> > Subject: JSF/Facelets with Spring Security 2.0.2
> >
> >
> > I am able to successfully implement Acegi JSF Component for Spring
> > Security
> > 2.0.2 into Facelets file from the link
> >
> http://cagataycivici.wordpress.com/2006/01/19/acegi_jsf_components_hit_the
> > /
> > acegi_jsf_components
> > but we have a requirement when a user is not in a particular role, then
> > simply making it read-only field or even combining conditional processing
> > e.g.
> >
> > if value of "status" = "new" and role = "customer" then component is
> > editable else component is read only.
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://www.nabble.com/JSF-Facelets-with-
> > Spring-Security-2.0.2-tp18271738p18271738.html
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>
RE: JSF/Facelets with Spring Security 2.0.2
Posted by "Kito D. Mann" <km...@virtua.com>.
Bansi,
You should be able to use the disabled property and an EL expression to do this. I'm not familiar with Acegi, but it would be something like this:
<h:inputText value="#{myBean.value}" disabled="#{user.status != 'new'}"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann - Author, JavaServer Faces in Action
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
phone: +1 203-653-2989
fax: +1 203-653-2988
Come to the first annual JSFOne Conference this September! Visit http://www.jsfone.com for details.
> -----Original Message-----
> From: bansi [mailto:mail2bansi@yahoo.com]
> Sent: Thursday, July 03, 2008 10:43 PM
> To: users@myfaces.apache.org
> Subject: JSF/Facelets with Spring Security 2.0.2
>
>
> I am able to successfully implement Acegi JSF Component for Spring
> Security
> 2.0.2 into Facelets file from the link
> http://cagataycivici.wordpress.com/2006/01/19/acegi_jsf_components_hit_the
> /
> acegi_jsf_components
> but we have a requirement when a user is not in a particular role, then
> simply making it read-only field or even combining conditional processing
> e.g.
>
> if value of “status” = “new” and role = “customer” then component is
> editable else component is read only.
>
>
>
>
>
>
> --
> View this message in context: http://www.nabble.com/JSF-Facelets-with-
> Spring-Security-2.0.2-tp18271738p18271738.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.