[jboss-cvs] jboss-seam/doc/reference/en/modules ...

Peter Muir peter at bleepbleep.org.uk
Mon Jan 7 11:11:33 EST 2008


  User: pmuir   
  Date: 08/01/07 11:11:33

  Modified:    doc/reference/en/modules  controls.xml
  Log:
  include examples of usage
  
  Revision  Changes    Path
  1.63      +18 -15    jboss-seam/doc/reference/en/modules/controls.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: controls.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/controls.xml,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -b -r1.62 -r1.63
  --- controls.xml	7 Jan 2008 15:54:48 -0000	1.62
  +++ controls.xml	7 Jan 2008 16:11:33 -0000	1.63
  @@ -1282,11 +1282,10 @@
           <literal>@Converter</literal>
         </term>
         <listitem>
  -        <programlisting>
  -<![CDATA[@Name("fooConverter") 
  +        <programlisting><![CDATA[@Name("itemConverter") 
   @BypassInterceptors 
   @Converter
  -public class FooConverter implements Converter {
  +public class ItemConverter implements Converter {
      
     @Transactional
     public Object getAsObject(FacesContext context, UIComponent cmp, String value) {
  @@ -1300,6 +1299,9 @@
     }
     
   }]]></programlisting>
  +
  +          <programlisting><![CDATA[<h:inputText value="#{shop.item}" converter="itemConverter" />]]></programlisting>
  +            
               <para>
                 Registers the Seam component as a JSF converter.  Shown here is a 
                 converter which is able to access the JPA EntityManager inside a 
  @@ -1313,19 +1315,20 @@
           <literal>@Validator</literal>
         </term>
         <listitem>
  -        <programlisting>
  -<![CDATA[@Name("barValidator") 
  +        <programlisting><![CDATA[@Name("itemValidator") 
   @BypassInterceptors 
   @Validator
  -public class BarValidator implements Validator {
  +public class ItemValidator implements Validator {
      
     public void validate(FacesContext context, UIComponent cmp, Object value)
       throws ValidatorException {
  -    FooController fooController = (FooController) Component.getInstance("fooController");
  -    return fooController.validate(value);
  +    ItemController ItemController = (ItemController) Component.getInstance("itemController");
  +    return itemController.validate(value);
     }
     
  -}]]></programlisting>
  +  }]]></programlisting>
  +         
  +         <programlisting><![CDATA[<h:inputText value="#{shop.item}" validator="itemValidator" />]]></programlisting>
               <para>
                 Registers the Seam component as a JSF validator.  Shown here is a 
                 validator which injects another Seam component; the injected 
  
  
  



More information about the jboss-cvs-commits mailing list