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

Gavin King gavin.king at jboss.com
Thu Nov 16 12:39:16 EST 2006


  User: gavin   
  Date: 06/11/16 12:39:16

  Modified:    doc/reference/en/modules  events.xml
  Log:
  minor
  
  Revision  Changes    Path
  1.6       +23 -3     jboss-seam/doc/reference/en/modules/events.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: events.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/events.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- events.xml	14 Nov 2006 05:28:03 -0000	1.5
  +++ events.xml	16 Nov 2006 17:39:16 -0000	1.6
  @@ -317,10 +317,28 @@
               <para>
                   You might wonder why I've not mentioned anything about event objects in
                   this discussion. In Seam, there is no need for an event object to propagate
  -                state between event producer and listener. All state is held in the Seam
  -                contexts, and is shared between components.
  +                state between event producer and listener. State is held in the Seam
  +                contexts, and is shared between components. However, if you really want
  +                to pass an event object, you can:
               </para>
               
  +            <programlisting><![CDATA[@Name("helloWorld")
  +public class HelloWorld {
  +    private String name;
  +    public void sayHello() {
  +        FacesMessages.instance().add("Hello World, my name is #0.", name);
  +        Events.instance().raiseEvent("hello", name);
  +    }
  +}]]></programlisting>
  +
  +            <programlisting><![CDATA[@Name("helloListener")
  +public class HelloListener {
  +    @Observer("hello")
  +    public void sayHelloBack(String name) {
  +        FacesMessages.instance().add("Hello #0!", name);
  +    }
  +}]]></programlisting>
  +
           </sect2>
           
           <sect2>
  @@ -349,6 +367,8 @@
               <listitem><para><literal>org.jboss.seam.endTask.&lt;name&gt; </literal>&mdash; called when the task &lt;name&gt; is ended</para></listitem>
               <listitem><para><literal>org.jboss.seam.postCreate.&lt;name&gt; </literal>&mdash; called when the component &lt;name&gt; is created</para></listitem>
               <listitem><para><literal>org.jboss.seam.preDestroy.&lt;name&gt; </literal>&mdash; called when the component &lt;name&gt; is destroyed</para></listitem>
  +            <listitem><para><literal>org.jboss.seam.beforePhase </literal>&mdash; called before the start of a JSF phase</para></listitem>
  +            <listitem><para><literal>org.jboss.seam.afterPhase </literal>&mdash; called after the end of a JSF phase</para></listitem>
                </itemizedlist>
                
                <para>
  
  
  



More information about the jboss-cvs-commits mailing list