|
A robust starter web application to ease Java webapp development. Home | Tutorials | Demos | Issues |
|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
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: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
|
|
|
Re: Ajax?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 David_Wang@... 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: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------------------------- > 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: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Ajax?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 <thogau@...>: > 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 > > > > David_Wang@... 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: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > --------------------------------------------------------------------------------------- > > 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: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Ajax?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 <thogau@...>: > > >>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 >> >> >> >>David_Wang@... 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: users-unsubscribe@... >>>For additional commands, e-mail: users-help@... >>> >>>--------------------------------------------------------------------------------------- >>>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: users-unsubscribe@... >>For additional commands, e-mail: users-help@... >> >> >> >> > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@... >For additional commands, e-mail: users-help@... > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Ajax?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 <josip@...> wrote: Hi folks. |
|
|
Re: Ajax?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 <josip@...>: > 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 <thogau@...>: > > > > > >>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 > >> > >> > >> > >>David_Wang@... 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: users-unsubscribe@... > >>>For additional commands, e-mail: users-help@... > >>> > >>>--------------------------------------------------------------------------------------- > >>>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: users-unsubscribe@... > >>For additional commands, e-mail: users-help@... > >> > >> > >> > >> > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: users-unsubscribe@... > >For additional commands, e-mail: users-help@... > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Ajax?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 <felipenasc@...> wrote:
Nice tutorial. |
|
|
Re: Ajax?On 2/27/06, Matt Campbell <mattcampbell.85@...> wrote:
|
| Free embeddable forum powered by Nabble | Forum Help |
