Changeset 30034

Show
Ignore:
Timestamp:
02/11/08 17:53:37 (10 months ago)
Author:
gracinet
Message:

Fix Seam remoting and explain a bit in comments

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.project.sample/trunk/src/main/java/org/nuxeo/project/sample/BookManager.java

    r29877 r30034  
    1313import org.nuxeo.project.sample.BookManagerBean.BookInfo; 
    1414 
     15/** 
     16 * Interface for the <code>bookManager</code> Seam component. 
     17 * <p> 
     18 * Use of this interface would be of course necessary if the Seam 
     19 * component was also an EJB3. In that latter case, the <code>WebRemote</code> 
     20 * annotation has to be put on the interface method, instead of the 
     21 * implementation method. 
     22 * </p> 
     23 */ 
    1524public interface BookManager { 
    1625 
     
    7887    public String changeFilter(); 
    7988 
     89    /** 
     90     * Method to demonstrate Seam Remoting. 
     91     * <p>The annotation has to be on the 
     92     * interface in EJB3 situation. Otherwise it has to be on the 
     93     * component implementation. 
     94     * </p> 
     95     * @param param parameter used from the javascript code. 
     96     * @return something that uses the parameter 
     97     */ 
    8098    @WebRemote 
    8199    public String something(String param); 
  • org.nuxeo.project.sample/trunk/src/main/java/org/nuxeo/project/sample/BookManagerBean.java

    r29877 r30034  
    2626import org.jboss.seam.annotations.Factory; 
    2727import org.jboss.seam.annotations.In; 
     28import org.jboss.seam.annotations.WebRemote; 
    2829import org.jboss.seam.annotations.Name; 
    2930import org.jboss.seam.annotations.Observer; 
     
    320321     */ 
    321322 
     323    /** 
     324     * @param param some string, that is directly passed 
     325     * from the Javascript code. 
     326     */ 
     327    @WebRemote 
    322328    public String something(String param) { 
    323329        return "It worked: " + param;