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

Norman Richards norman.richards at jboss.com
Thu Mar 8 12:40:13 EST 2007


  User: nrichards
  Date: 07/03/08 12:40:13

  Modified:    src/pdf/org/jboss/seam/pdf/ui  ITextComponent.java
  Log:
  minor refactoring
  
  Revision  Changes    Path
  1.11      +2 -17     jboss-seam/src/pdf/org/jboss/seam/pdf/ui/ITextComponent.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ITextComponent.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/pdf/org/jboss/seam/pdf/ui/ITextComponent.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- ITextComponent.java	7 Mar 2007 05:41:26 -0000	1.10
  +++ ITextComponent.java	8 Mar 2007 17:40:13 -0000	1.11
  @@ -8,11 +8,10 @@
   import java.io.*;
   import java.util.List;
   
  -import org.jboss.seam.pdf.EntitiesToEncode;
   import org.jboss.seam.ui.JSF;
   
   import com.lowagie.text.*;
  -//import com.lowagie.text.xml.simpleparser.EntitiesToUnicode;
  +import com.lowagie.text.xml.simpleparser.EntitiesToUnicode;
   
   public abstract class ITextComponent
       extends UIComponentBase
  @@ -21,7 +20,6 @@
   	
       protected String inFacet;
       protected Object currentFacet;
  -	//protected Map<String,Object> facets = new HashMap<String,Object>();   
     
       /**
        * get the current Itext object
  @@ -189,7 +187,7 @@
           for (UIComponent child: (List<UIComponent>) this.getChildren()) {
               // ugly hack to be able to capture facelets text
               if (child.getFamily().equals("facelets.LiteralText")) {
  -                String text = replaceEntities(extractText(context, child));
  +                String text = EntitiesToUnicode.decodeString(extractText(context, child));
                   Font   font = getFont();
                   Chunk chunk = null;
                   if (font == null) {
  @@ -219,19 +217,6 @@
           return stringWriter.getBuffer().toString();
       }
   
  -    /**
  -     * facelets automatically escapes text, so we have to undo the
  -     * the damage here.  This is just a placeholder for something
  -     * more intelligent.  The replacement strategy here is not
  -     * sufficient.
  -     */
  -    private String replaceEntities(String text) {
  -        System.out.println("PRE:" + text);
  -        String result = EntitiesToEncode.decodeString(text);
  -        System.out.println("POST: " + result);
  -        return result;
  -    }
  -
   
       @SuppressWarnings("unchecked")
   	public void encode(FacesContext context,
  
  
  



More information about the jboss-cvs-commits mailing list