You should know how to add PersonManager to applicationContext.xml
from the tutorials.  Beyond that, it's just a matter of adding the
following to dwr.xml:

       <create creator="spring" javascript="PersonManager">
           <param name="class"
value="org.appfuse.tutorial.service.PersonManager"/>
           <param name="beanName" value="personManager"/>
           <include method="findByLastName"/>
       </create>
       <convert converter="bean" match="org.appfuse.tutorial.model.Person"/>

Then add the appropriate JavaScript includes to the <head> of your
page to call methods.

If you go to http://localhost:8080/dwr, it should tell you the
includes you need.

Matt

On 4/8/07, Struts2 Fan <[EMAIL PROTECTED]> wrote:

Hi all,

I wonder what is the best way to call personManager.findByLastName(String)
method in the class file used to dynamically update html using dwr? In other
words what should I add to applicationContext.xml and how to define the
personManager in Demo class.

I am new to springframework so it will be a newbee question.
-------------------------------
Here is the Demo class

public class Demo {

    public String getServerInfo() {
        return WebContextFactory.get().getServletContext().getServerInfo()
                + " running on JDK "
                + System.getProperty("java.specification.version")
                + " using DWR "
                + WebContextFactory.get().getVersion();
    }
}

I want to user a manager in this class.

Thanks in advance.
--
View this message in context: 
http://www.nabble.com/How-to-reach-the-personManager-in-DWR%27s-Demo-class-tf3542955s2369.html#a9890671
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to