[jboss-cvs] jboss-seam/src/mail/org/jboss/seam/mail/ui ...

Peter Muir peter at bleepbleep.org.uk
Sat Feb 10 18:01:42 EST 2007


  User: pmuir   
  Date: 07/02/10 18:01:42

  Modified:    src/mail/org/jboss/seam/mail/ui  UIMessage.java
  Log:
  JBSEAM-695
  
  Revision  Changes    Path
  1.10      +15 -28    jboss-seam/src/mail/org/jboss/seam/mail/ui/UIMessage.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UIMessage.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/mail/org/jboss/seam/mail/ui/UIMessage.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- UIMessage.java	10 Feb 2007 20:44:19 -0000	1.9
  +++ UIMessage.java	10 Feb 2007 23:01:42 -0000	1.10
  @@ -13,6 +13,7 @@
   
   import org.jboss.seam.mail.MailSession;
   import org.jboss.seam.mail.ui.context.MailFacesContextImpl;
  +import org.jboss.seam.ui.JSF;
   
   /**
    * JSF component which delimites the start and end of the mail message.
  @@ -43,8 +44,6 @@
   
      private String urlBase;
   
  -   private String absoluteUrlBase;
  -
      /**
       * Get the JavaMail Session to use. If not set the default session is used
       */
  @@ -83,13 +82,10 @@
      @Override
      public void encodeBegin(FacesContext context) throws IOException
      {
  -      if ( getAbsoluteUrlBase() != null ) 
  -      {
  -         MailFacesContextImpl.start( getAbsoluteUrlBase() );
  -      } 
  -      else if ( getUrlBase() != null ) 
  +      if (getUrlBase() != null)
         {
  -         MailFacesContextImpl.start( getUrlBase() + context.getExternalContext().getRequestContextPath() );
  +         MailFacesContextImpl.start(getUrlBase()
  +                  + context.getExternalContext().getRequestContextPath());
         }
         mimeMessage = null;
         try
  @@ -123,7 +119,6 @@
      @Override
      public void encodeEnd(FacesContext ctx) throws IOException
      {
  -      super.encodeEnd(ctx);
         try
         {
            if (isRequestReadReceipt() && getMimeMessage().getFrom() != null
  @@ -138,13 +133,22 @@
         {
            throw new FacesException(e.getMessage(), e);
         }
  +      finally
  +      {
         MailFacesContextImpl.stop();
      }
  +   }
   
      @Override
      public boolean getRendersChildren()
      {
  -      return false;
  +      return true;
  +   }
  +
  +   @Override
  +   public void encodeChildren(FacesContext context) throws IOException
  +   {
  +      JSF.renderChildren(FacesContext.getCurrentInstance(), this);
      }
   
      public String getImportance()
  @@ -198,23 +202,6 @@
         this.requestReadReceipt = requestReadReceipt;
      }
   
  -   public String getAbsoluteUrlBase()
  -   {
  -      if (absoluteUrlBase == null)
  -      {
  -         return getString("absoluteUrlBase");
  -      }
  -      else
  -      {
  -         return absoluteUrlBase;
  -      }
  -   }
  -
  -   public void setAbsoluteUrlBase(String absoluteUrlBase)
  -   {
  -      this.absoluteUrlBase = absoluteUrlBase;
  -   }
  -
      public String getUrlBase()
      {
         if (urlBase == null)
  
  
  



More information about the jboss-cvs-commits mailing list