Thanks Volker :)

On 11/5/07, Volker Weber <[EMAIL PROTECTED]> wrote:
>
> Hi Daniel,
>
> you can get the session from the externalContext:
>
>     HttpSession session = facesContext.getExternalContext().getSession();
>     Enumeration enumeration = session.getAttributeNames();
>
> or you can also get the keys (attributeNames) from the Map:
>
>
>     Map sessionMap = facesContext.getExternalContext().getSessionMap();
>     Iterator attributeNames = sessionMap.keySet().iterator();
>
>
> Regards,
>     Volker
>
>
>
>
> 2007/11/5, daniel ccss <[EMAIL PROTECTED]>:
> > Hi all,
> >
> > In Struts I get the list of session attributes names like this:
> >
> >      HttpSession session = request.getSession();
> >      Enumeration enumeration = session.getAttributeNames();
> >
> > How I can get the the session attributes names in JSF??? Actually I get
> the
> > session like this:
> >
> >             Map session =
> > FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
> >
> > And I can get the values of the attributes like this
> >            Collection collection = session.values ();
> >
> > But this give me the values of the attributes in session, not the
> attributes
> > name, I need the attributes names because i need to delete or not some
> > attributes depending of the name
> >
> > thanks
> >
> >
> >
>

Reply via email to