[jboss-cvs] jboss-seam/seam-ui-cdk/jboss-seam-ui/src/main/java/org/jboss/seam/ui/component ...

Peter Muir peter at bleepbleep.org.uk
Fri Mar 23 10:31:43 EDT 2007


  User: pmuir   
  Date: 07/03/23 10:31:43

  Modified:    seam-ui-cdk/jboss-seam-ui/src/main/java/org/jboss/seam/ui/component   
                        UIFormattedText.java UISpan.java UIDiv.java
  Log:
  CDK port improvements
  
  Revision  Changes    Path
  1.2       +25 -0     jboss-seam/seam-ui-cdk/jboss-seam-ui/src/main/java/org/jboss/seam/ui/component/UIFormattedText.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UIFormattedText.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/seam-ui-cdk/jboss-seam-ui/src/main/java/org/jboss/seam/ui/component/UIFormattedText.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- UIFormattedText.java	19 Mar 2007 20:48:16 -0000	1.1
  +++ UIFormattedText.java	23 Mar 2007 14:31:43 -0000	1.2
  @@ -21,8 +21,16 @@
   
   package org.jboss.seam.ui.component;
   
  +import java.io.Reader;
  +import java.io.StringReader;
  +
   import javax.faces.component.UIOutput;
   
  +import org.jboss.seam.text.SeamTextLexer;
  +import org.jboss.seam.text.SeamTextParser;
  +
  +import antlr.ANTLRException;
  +
   /**
    * JSF component class
    *
  @@ -35,4 +43,21 @@
   	@SuppressWarnings("unused")
      private static final String COMPONENT_FAMILY = "org.jboss.seam.ui.FormattedText";
   	
  +   public String getFormattedText() 
  +   {
  +      if ( getValue() == null) return null;
  +      Reader r = new StringReader( (String) getValue() );
  +      SeamTextLexer lexer = new SeamTextLexer(r);
  +      SeamTextParser parser = new SeamTextParser(lexer);
  +      try
  +      {
  +         parser.startRule();
  +      }
  +      catch (ANTLRException re)
  +      {
  +         throw new RuntimeException(re);
  +      }
  +      return parser.toString();
  +   }
  +	
   }
  
  
  
  1.2       +6 -0      jboss-seam/seam-ui-cdk/jboss-seam-ui/src/main/java/org/jboss/seam/ui/component/UISpan.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UISpan.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/seam-ui-cdk/jboss-seam-ui/src/main/java/org/jboss/seam/ui/component/UISpan.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- UISpan.java	20 Mar 2007 17:58:58 -0000	1.1
  +++ UISpan.java	23 Mar 2007 14:31:43 -0000	1.2
  @@ -33,4 +33,10 @@
   	
   	private static final String COMPONENT_FAMILY = "org.jboss.seam.ui.Span";
   	
  +   @Override
  +   public boolean getRendersChildren()
  +   {
  +      return true;
  +   }
  +	
   }
  
  
  
  1.2       +6 -0      jboss-seam/seam-ui-cdk/jboss-seam-ui/src/main/java/org/jboss/seam/ui/component/UIDiv.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UIDiv.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/seam-ui-cdk/jboss-seam-ui/src/main/java/org/jboss/seam/ui/component/UIDiv.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- UIDiv.java	20 Mar 2007 17:58:58 -0000	1.1
  +++ UIDiv.java	23 Mar 2007 14:31:43 -0000	1.2
  @@ -33,4 +33,10 @@
   	
   	private static final String COMPONENT_FAMILY = "org.jboss.seam.ui.Div";
   	
  +   @Override
  +   public boolean getRendersChildren()
  +   {
  +      return true;
  +   }
  +   
   }
  
  
  



More information about the jboss-cvs-commits mailing list