Home >Web Front-end >JS Tutorial >Integrated implementation code of dwr spring_javascript skills

Integrated implementation code of dwr spring_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:55:111479browse

1. Correct use of spring
1. Configuration of dwr.xml

Copy code The code is as follows:










customerManager It is the Id
2 registered by spring, and the page calls
Copy code The code is as follows:



Second, explain
If the regular methods used in the business logic class customerManagerImpl.java will not be called by the static page, such as
Copy code The code is as follows:

public String test(){
return "hello" ;
}

The following code cannot be executed:
Copy code The code is as follows:

JCustomerManager.test(function(data){
alert(data);}
)
JCustomerManager.test(function(data){
alert(data);}
)

Need to use new registration method
Copy code The code is as follows:


















Third, you need to use new and spring correctly, and pay attention to the difference between the two.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn