Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ManagedProperty(value="#{sessionBean}")
- private SessionBean sb;
- public SessionBean getSb() {
- return sb;
- }
- public void setSb(SessionBean sb) {
- this.sb = sb;
- }
- if(loggedIn){
- // registra l'evento di log nel db
- new EventoLog(u.getIdUtente(),TipoEvento.TIPO_EVENTO_LOGIN).insert();
- LOG.info(u.getCognome() +" "+ u.getNome());
- // carica nel session bean l'utente
- this.getSb().setUtente(u);
- // genera la matrice delle pagine autorizzate nel session bean
- System.out.println("------------------------------" + sb.getUtente().getUsernameApplicativo());
- LOG.info("Sono qui - 5");
- }
- <p:dialog header="Login" widgetVar="dlg" resizable="false">
- <h:panelGrid columns="2" cellpadding="5">
- <h:outputLabel for="username" value="Username:"/>
- <p:inputText id="username" value="#{login.username}" label="Username"/>
- <h:outputLabel for="password" value="Password:" />
- <p:password id="password" value="#{login.password}" label="Password"/>
- <h:outputLabel for="tipoLogin" value="Tipo login:" />
- <p:selectOneMenu label="tipoLogin" value="#{login.valueTipoLogin}">
- <f:selectItem itemLabel="" itemValue="0" />
- <f:selectItems value="#{applicationBean.optionTipoLogin}" />
- </p:selectOneMenu>
- <f:facet name="footer">
- <p:commandButton value="Login"
- icon="loginIcon"
- update="growl"
- actionListener="#{login.btnLogin_action()}"
- oncomplete="handleLoginRequest(xhr, status, args)" />
- </f:facet>
- </h:panelGrid>
- </p:dialog>
- @ManagedBean(name = "sessionBean")
- @SessionScoped
- public class SessionBean implements Serializable{
- private Utente utente;
- public Utente getUtente() {
- return utente;
- }
- public void setUtente(Utente utente) {
- this.utente = utente;
- }
Add Comment
Please, Sign In to add comment