0

Hello placed a managedbean in session scope named loginBean and Im trying to get that object from a xhtml without managed bean, I tried this:

<h:outputText value="#{loginBean.user.userName}" />

but it doesnt work, so put this line to see if the object is already in session:

<h:outputText value="#{sessionScope}" /> 

and yes, the bean is there:

loginBean=com.bean.LoginBean@1dfae73, javax.faces.request.charset=UTF-8}

how I can access it without Managed Bean, directly from xhtml?

Thank you!

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Mariah
  • 1,073
  • 1
  • 14
  • 33
  • Hello BalusC, thanks for answer, well i put to see the objects in session and i see {com.sun.faces.renderkit.ServerSideStateHelper.LogicalViewMap={839306770636811414={4245116754698124366=[Ljava.lang.Object;@1642ee5}}, loginBean=com.bean.LoginBean@1dfae73, javax.faces.request.charset=UTF-8}, i supossed that this mean that the object is in session.. if loginBean was null i think that i see loginBean=null, instead com.bean.LoginBean@1dfae73... im wrong? – Mariah Oct 15 '14 at 16:23
  • additionally i can say that i access to loginBean object from another ManagedBean @ManagedProperty(value="#{loginBean}"), and i is not null... Thanks – Mariah Oct 15 '14 at 16:26
  • no, i want print some attribute, but i dont know how access it... – Mariah Oct 15 '14 at 16:27
  • 're right, the user was null, excuse the trouble I'm new at this .. Thankx! – Mariah Oct 15 '14 at 16:35
  • BalusC can u help me with this question? http://stackoverflow.com/questions/26389506/primefaces-change-center-layout-with-menubar thanks in advance! – Mariah Oct 15 '14 at 19:13

0 Answers0