|
|
|
David_Wang
|
I want to try Ajax with AppFuse 1.9. Are there any examples or tutorials with AppFuse for a new Ajax developer? ====================================================================== Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession. ====================================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
David_Wang
|
I found Bindows (http://www.bindows.net/)is a platform to develop AJAX
applicaitons. It works with any server and it makes Ajax development much easier. But it is not open source. David Wang/IT/CF/CCI To 02/23/2006 10:00 [hidden email] AM cc Subject Ajax? I want to try Ajax with AppFuse 1.9. Are there any examples or tutorials with AppFuse for a new Ajax developer? ====================================================================== Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession. ====================================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Thomas Gaudin
|
In reply to this post
by David_Wang
There are already some ajax stuff integrated in Appfuse (dwr,
scriptaculous, prototype...). By integrated, I mean everything is configured so that you can use those libraries. So it is up to you to decide what you want to do with ajax, here are some places where you may get inspiration : http://getahead.ltd.uk/dwr/examples http://wiki.script.aculo.us/scriptaculous/show/Demos http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html There is a very trivial example of how to use dwr in the facelet prototype (on the main menu page) : http://www.thogau.net/appfuse-facelets/mainMenu.html Hope it helps, Thomas [hidden email] a écrit : > I want to try Ajax with AppFuse 1.9. Are there any examples or tutorials > with AppFuse for a new Ajax developer? > > > ====================================================================== > Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law.. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession. > ====================================================================== > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------------------------- > Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
felipenasc
|
I dont know if there is a tutorial. If not, you can write one with
your experience and everybodies tips, and then, I guess, send it to Matt so he add it to the wiki (right Matt?). In my opinion, you have two good options in Appfuse: 1) DWR This is good when you want to get javascript objects from Java and vice-versa. DWR is already configured in web.xml so you call its servlet. the url pattern used is "/dwr/*". If you want to integrate it with your Spring config, you can do: - in your action-servlet.xml, add a url mapping to your urlMapping bean like this (add it after all the others): <prop key="/**/*">dwrController</prop> (dont know if this the best, but it works). - define your dwrController: <bean id="dwrController" class="org.springframework.web.servlet.mvc.ServletWrappingController"> <property name="servletClass"> <value>uk.ltd.getahead.dwr.DWRServlet</value> </property> <property name="initParameters"> <props> <prop key="debug">false</prop> </props> </property> </bean> - configure your WEB-INF/dwr.xml <dwr> <allow> <convert converter="bean" match="br.com.facio.progenda.model.*" /> <create creator="spring" javascript="DwrManager"> <param name="beanName" value="dwrManager" /> </create> </allow> </dwr> - I created a DWRManager in applicationContext-service.xml: <bean id="dwrManager" parent="txProxyTemplate"> <property name="target"> <bean class="br.com.facio.progenda.service.impl.DWRManagerImpl" autowire="byName" /> </property> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED,readOnly</prop> </props> </property> </bean> - Now, you can play with it by creating methods in this DWRManager and calling them from your javascript code, lke this: <script> function test(){ DwrManager.getPerson(_replyPerson, document.getElementById('personId').value); } var _replyPerson = function(person){ alert("The person name is:" + person.name); } </script> 2) Script.aculo.us This is very nice. If you want, for example, to update a content of a div with html code received from the server, use scriptsaculous Ajax.Updater. There is nothing to confire. This will only request your server as it was a normal request, receiving a response that your controller flushes (html, xml, whatever). Felipe 2006/2/24, Thomas Gaudin <[hidden email]>: > There are already some ajax stuff integrated in Appfuse (dwr, > scriptaculous, prototype...). > By integrated, I mean everything is configured so that you can use those > libraries. > So it is up to you to decide what you want to do with ajax, here are > some places where you may get inspiration : > http://getahead.ltd.uk/dwr/examples > http://wiki.script.aculo.us/scriptaculous/show/Demos > http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html > There is a very trivial example of how to use dwr in the facelet > prototype (on the main menu page) : > http://www.thogau.net/appfuse-facelets/mainMenu.html > Hope it helps, > > Thomas > > > > [hidden email] a écrit : > > I want to try Ajax with AppFuse 1.9. Are there any examples or tutorials > > with AppFuse for a new Ajax developer? > > > > > > ====================================================================== > > Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law.. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession. > > ====================================================================== > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [hidden email] > > For additional commands, e-mail: [hidden email] > > > > --------------------------------------------------------------------------------------- > > Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. > > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Josip Mihelko
|
Hi folks.
I tried to put together a little introduction for usage of DWR in AppFuse. You can find it at http://www.resmoked.net:8080/JSPWiki/Wiki.jsp?page=AppFuseAjaxWithDWR If you find it useful I'll post it on Matt's Wiki. Comments appreciated...! Best regards. Josip Felipe Nascimento wrote: >I dont know if there is a tutorial. If not, you can write one with >your experience and everybodies tips, and then, I guess, send it to >Matt so he add it to the wiki (right Matt?). > >In my opinion, you have two good options in Appfuse: > >1) DWR >This is good when you want to get javascript objects from Java and vice-versa. >DWR is already configured in web.xml so you call its servlet. the url >pattern used is "/dwr/*". >If you want to integrate it with your Spring config, you can do: >- in your action-servlet.xml, add a url mapping to your urlMapping >bean like this (add it after all the others): ><prop key="/**/*">dwrController</prop> (dont know if this the best, >but it works). > >- define your dwrController: > <bean id="dwrController" >class="org.springframework.web.servlet.mvc.ServletWrappingController"> > <property name="servletClass"> > <value>uk.ltd.getahead.dwr.DWRServlet</value> > </property> > <property name="initParameters"> > <props> > <prop key="debug">false</prop> > </props> > </property> > </bean> > >- configure your WEB-INF/dwr.xml ><dwr> > <allow> > <convert converter="bean" match="br.com.facio.progenda.model.*" /> > > <create creator="spring" javascript="DwrManager"> > <param name="beanName" value="dwrManager" /> > </create> > </allow> ></dwr> > >- I created a DWRManager in applicationContext-service.xml: > <bean id="dwrManager" parent="txProxyTemplate"> > <property name="target"> > <bean >class="br.com.facio.progenda.service.impl.DWRManagerImpl" >autowire="byName" /> > </property> > <property name="transactionAttributes"> > <props> > <prop key="*">PROPAGATION_REQUIRED,readOnly</prop> > </props> > </property> > </bean> > >- Now, you can play with it by creating methods in this DWRManager and >calling them from your javascript code, lke this: ><script> >function test(){ > DwrManager.getPerson(_replyPerson, document.getElementById('personId').value); >} > >var _replyPerson = function(person){ > alert("The person name is:" + person.name); >} ></script> > > >2) Script.aculo.us >This is very nice. If you want, for example, to update a content of a >div with html code received from the server, use scriptsaculous >Ajax.Updater. There is nothing to confire. This will only request your >server as it was a normal request, receiving a response that your >controller flushes (html, xml, whatever). > > > >Felipe > >2006/2/24, Thomas Gaudin <[hidden email]>: > > >>There are already some ajax stuff integrated in Appfuse (dwr, >>scriptaculous, prototype...). >>By integrated, I mean everything is configured so that you can use those >>libraries. >>So it is up to you to decide what you want to do with ajax, here are >>some places where you may get inspiration : >>http://getahead.ltd.uk/dwr/examples >>http://wiki.script.aculo.us/scriptaculous/show/Demos >>http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html >>There is a very trivial example of how to use dwr in the facelet >>prototype (on the main menu page) : >>http://www.thogau.net/appfuse-facelets/mainMenu.html >>Hope it helps, >> >>Thomas >> >> >> >>[hidden email] a écrit : >> >> >>>I want to try Ajax with AppFuse 1.9. Are there any examples or tutorials >>>with AppFuse for a new Ajax developer? >>> >>> >>>====================================================================== >>>Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law.. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession. >>>====================================================================== >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: [hidden email] >>>For additional commands, e-mail: [hidden email] >>> >>>--------------------------------------------------------------------------------------- >>>Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. >>>Aucun virus connu a ce jour par nos services n'a ete detecte. >>> >>> >>> >>> >>> >>> >>> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [hidden email] >>For additional commands, e-mail: [hidden email] >> >> >> >> > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [hidden email] >For additional commands, e-mail: [hidden email] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Sanjiv Jivan
|
Thanks for putting together the tutorial. A couple of comments/questions :
1. I would remove 'DWR' from the name of the service implementation. Although its being invoked by the javascript client via DWR, it could also be serving other kinds of clients. 2.You are returning wrapper objects over the model objects and say that this is not required but you don't explain why you have done so (unless i missed it). Regards, Sanjiv On 2/25/06, Josip Mihelko <[hidden email]> wrote: Hi folks. |
||||||||||||||||
|
felipenasc
|
In reply to this post
by Josip Mihelko
Nice tutorial.
How did you used DWR Servlet? As a servlet it is, or wrapped, integrating with Spring? How did you mapped DWr requests (url pattern?)? That is what I missed in the tutorial. It would be nice to put this in Matts wiki, dont you think? Felipe 2006/2/25, Josip Mihelko <[hidden email]>: > Hi folks. > I tried to put together a little introduction for usage of DWR in AppFuse. > You can find it at > > http://www.resmoked.net:8080/JSPWiki/Wiki.jsp?page=AppFuseAjaxWithDWR > > If you find it useful I'll post it on Matt's Wiki. > Comments appreciated...! > > Best regards. > Josip > > Felipe Nascimento wrote: > > >I dont know if there is a tutorial. If not, you can write one with > >your experience and everybodies tips, and then, I guess, send it to > >Matt so he add it to the wiki (right Matt?). > > > >In my opinion, you have two good options in Appfuse: > > > >1) DWR > >This is good when you want to get javascript objects from Java and vice-versa. > >DWR is already configured in web.xml so you call its servlet. the url > >pattern used is "/dwr/*". > >If you want to integrate it with your Spring config, you can do: > >- in your action-servlet.xml, add a url mapping to your urlMapping > >bean like this (add it after all the others): > ><prop key="/**/*">dwrController</prop> (dont know if this the best, > >but it works). > > > >- define your dwrController: > > <bean id="dwrController" > >class="org.springframework.web.servlet.mvc.ServletWrappingController"> > > <property name="servletClass"> > > <value>uk.ltd.getahead.dwr.DWRServlet</value> > > </property> > > <property name="initParameters"> > > <props> > > <prop key="debug">false</prop> > > </props> > > </property> > > </bean> > > > >- configure your WEB-INF/dwr.xml > ><dwr> > > <allow> > > <convert converter="bean" match="br.com.facio.progenda.model.*" /> > > > > <create creator="spring" javascript="DwrManager"> > > <param name="beanName" value="dwrManager" /> > > </create> > > </allow> > ></dwr> > > > >- I created a DWRManager in applicationContext-service.xml: > > <bean id="dwrManager" parent="txProxyTemplate"> > > <property name="target"> > > <bean > >class="br.com.facio.progenda.service.impl.DWRManagerImpl" > >autowire="byName" /> > > </property> > > <property name="transactionAttributes"> > > <props> > > <prop key="*">PROPAGATION_REQUIRED,readOnly</prop> > > </props> > > </property> > > </bean> > > > >- Now, you can play with it by creating methods in this DWRManager and > >calling them from your javascript code, lke this: > ><script> > >function test(){ > > DwrManager.getPerson(_replyPerson, document.getElementById('personId').value); > >} > > > >var _replyPerson = function(person){ > > alert("The person name is:" + person.name); > >} > ></script> > > > > > >2) Script.aculo.us > >This is very nice. If you want, for example, to update a content of a > >div with html code received from the server, use scriptsaculous > >Ajax.Updater. There is nothing to confire. This will only request your > >server as it was a normal request, receiving a response that your > >controller flushes (html, xml, whatever). > > > > > > > >Felipe > > > >2006/2/24, Thomas Gaudin <[hidden email]>: > > > > > >>There are already some ajax stuff integrated in Appfuse (dwr, > >>scriptaculous, prototype...). > >>By integrated, I mean everything is configured so that you can use those > >>libraries. > >>So it is up to you to decide what you want to do with ajax, here are > >>some places where you may get inspiration : > >>http://getahead.ltd.uk/dwr/examples > >>http://wiki.script.aculo.us/scriptaculous/show/Demos > >>http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html > >>There is a very trivial example of how to use dwr in the facelet > >>prototype (on the main menu page) : > >>http://www.thogau.net/appfuse-facelets/mainMenu.html > >>Hope it helps, > >> > >>Thomas > >> > >> > >> > >>[hidden email] a écrit : > >> > >> > >>>I want to try Ajax with AppFuse 1.9. Are there any examples or tutorials > >>>with AppFuse for a new Ajax developer? > >>> > >>> > >>>====================================================================== > >>>Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law.. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession. > >>>====================================================================== > >>> > >>>--------------------------------------------------------------------- > >>>To unsubscribe, e-mail: [hidden email] > >>>For additional commands, e-mail: [hidden email] > >>> > >>>--------------------------------------------------------------------------------------- > >>>Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. > >>>Aucun virus connu a ce jour par nos services n'a ete detecte. > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>--------------------------------------------------------------------- > >>To unsubscribe, e-mail: [hidden email] > >>For additional commands, e-mail: [hidden email] > >> > >> > >> > >> > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [hidden email] > >For additional commands, e-mail: [hidden email] > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Matt Campbell
|
Very nice tutorial, it covered most of the steps to get DWR working. The one thing i noticed that was missing was the signatures in the dwr.xml. These are important when your using objects like arraylists. If you dont define the signature for each call, DWR assumes that they are lists of strings. If you wanted to send in something else like an integer you would have to make a signature like this.
< signatures><![CDATA[ import java.util.List; import com.kroger.mbe.ajax.BudgetFindAjax ; BudgetFindAjax.findCustomerTypes(List<Integer>); ]]> </signatures > On 2/27/06, Felipe Nascimento <[hidden email]> wrote:
Nice tutorial. |
||||||||||||||||
|
Sanjiv Jivan
|
Some javascript/style in this post has been disabled (why?)
This reminds me of that I also use the "auth" element to specify which roles have access to particular DWR exposed bean. This is described here : http://getahead.ltd.uk/dwr/server/dwrxml/creators
On 2/27/06, Matt Campbell <[hidden email]> wrote:
|
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |