Package org.jboss.seam.faces

Examples of org.jboss.seam.faces.FacesMessages


   public class SimpleEntityHomeWithMessageStubs extends Home<EntityManager, SimpleEntity> {

      private StatusMessages statusMessages;

      public SimpleEntityHomeWithMessageStubs() {
         statusMessages = new FacesMessages();
      }
View Full Code Here


  {
    ExternalContext context = facesContext.getExternalContext();

    if (data == null)
    {
      FacesMessages messages = FacesMessages.instance();

      FacesMessage message = new FacesMessage();
      message.setDetail("MANCA IL FILE");
      message.setSummary("MANCA IL FILE");
      message.setSeverity(FacesMessage.SEVERITY_INFO);

      messages.add(message);
      return;
    }

    HttpServletResponse response = (HttpServletResponse) context.getResponse();
    response.setHeader("Content-Disposition", "attachment;filename=\"" + fileName + "\"");
View Full Code Here

      return true;
    }
    catch (NoResultException ex)
    {
      FacesMessages messages = FacesMessages.instance();
      messages.clear();
      return false;
    }
  }
View Full Code Here

  }

  //@End()
  public String processChangePassword()
  {
    FacesMessages messages = FacesMessages.instance();

    if (!getNewPassword().equals(getNewPasswordConfirmed()))
    {

      String message = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "form_ChangePassword_no_matching_password", null, facesContext.getViewRoot().getLocale());

      messages.add(message);

      return "/ChangePassword.xhtml";
    }

    user.setPassword(new DesEncrypter().encrypt(getNewPassword()));
    entityManager.merge(user);

    entityManager.flush();   
   
    messages.clear();
    return "/Index.xhtml";
  }
View Full Code Here

   class TestHome1 extends Home<EntityManager, SimpleEntity> {

      private FacesMessages facesMessages;

      public TestHome1() {
         facesMessages = new FacesMessages();
      }
View Full Code Here

            emailLogEventsValue.setValue(Boolean.toString(enableLogEmail));
        }
        applicationConfigurationDAO.makePersistent(emailLogEventsValue);

        applicationConfigurationDAO.flush();
        FacesMessages facesMessages = FacesMessages.instance();
        facesMessages.clearGlobalMessages();
        facesMessages.add("Configuration was successfully updated.");
        return "success";
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.faces.FacesMessages

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.