Hi,
We have been testing Roo for some projects that need jQuery. Are there any known issues with pluging in jQuery.
-Irshad
Hi,
We have been testing Roo for some projects that need jQuery. Are there any known issues with pluging in jQuery.
-Irshad
Hi Irshad,
We are currently working on revamping the JSP scaffolding for Roo. Part of this is that we want to support different JS solutions like JQuery, YUI, ExtJS, and Dojo. You can expect to see us providing the first milestones of this new support by end of February - early March.
If you are asking if there are any technical reasons why the integration between JQuery and Spring MVC would not work - I am not aware of any. In fact, Keith Donald has just recently published a blog post to show it in action:
http://blog.springsource.com/2010/01...in-spring-3-0/
HTH,
Stefan
Stefan Schmidt
Software Engineer, Spring Roo
SpringSource - a division of VMware
twitter @schmidtstefan
Hi guys,
Just to know, will these JS solutions be compatible with GWT?
Enrique Ruiz
DiSiD - http://www.disid.com
As you know GWT is itself generating JS code so I am not quite clear what you are asking for here. I have not seen the need for mixing GWT with other JS frameworks.
If you are asking if we are working on support for GWT scaffolding as an alternative to the current Spring MVC scaffolding, then yes, we are working on that.
-Stefan
Stefan Schmidt
Software Engineer, Spring Roo
SpringSource - a division of VMware
twitter @schmidtstefan
Hi,
As part of Release 1.1, are there plans to provide integration with JQuery for Roo? I wish to use JQuery instead of Dojo for a project and it would have been great if Roo could created scaffolding for JQuery as it does for Dojo toolkit...
Thanks,
Ratish
I have not seen any immediate plans for JQuery and from what I have gathered in y informal meetings with spring source people is that they have a good relationship with dojo people.
Is there any thing in particular that you need from JQuery that is not present in dojo. is there any thing in specific that Dojo is stopping you to do?
You can always integrate both libraries.
Hi Stefan,
I've been searching on google a way to integrate Spring Roo and Jquery, but the maximum I've found was this quote. A year has passed, and the Spring Roo Team has plans to continue that feature? And if not, who could I add Jquery on my Roo Project avoiding to create a new add-on or removing dojo references?
I am currently working on a web application project that uses Spring Roo 1.1.5 and initially I wanted to use jQuery too as that was my previous experience and I had little knowledge of Dojo. Not as easy as you would hope unfortunately but I hope these few points might help people out:
The Spring JavaScript library and jQuery do not work together by default. If you add the following jQuery lines to the load-scripts.tagx file:
<spring:url value="/css/south-street/jquery-ui-1.8.14.custom.css" var="jquery_css_url" />
<spring:url value="/js/jquery-1.5.1.min.js" var="jquery_url" />
<spring:url value="/js/jquery-ui-1.8.14.custom.min.js" var="jquery_ui_url" />
<link rel="stylesheet" type="text/css" media="screen" href="${jquery_css_url}"><!-- required for FF3 and Opera --></link>
<script src="${jquery_url}" type="text/javascript"><!-- required for FF3 and Opera --></script>
<script src="${jquery_ui_url}" type="text/javascript"><!-- required for FF3 and Opera --></script>
you will find Spring Dojo functionality will not work.
To get around this I have taken three basic approaches (waiting in hope that jQuery will be supported nicely in Spring Roo / Spring MMV) to get around this:
1. Limited jQuery usage - I use the default scaffolds for the administration aspects of my site (that need vanilla CRUD functionality) and have avoided jQuery here. This decision meant I had to learn dojo.xhrGet() (Dojo AJAX calls) but this was no more difficult that using the similar jQuery functionality.
2. Only use jQuery on a page - I simply created a load-jquery-scripts.jspx tag to load jQuery and avoid Dojo. I use this tag and jQuery on the main UI, then switch to Spring Roo Dojo generated stuff for edit forms etc. This 'works' well enough as the overall layout can be tempated with Tiles and the correct JavaScript library chosen.
3. If you need to mix jQuery and Dojo then you can do this if you avoid the use of the Spring JavaScript stuff. To do this you simply add all the jQuery sections to another util tag library (say load-all-scripts.jspx) and comment out the following:
<!--<spring:url value="/resources/spring/Spring.js" var="spring_url" />-->
<!--<spring:url value="/resources/spring/Spring-Dojo.js" var="spring_dojo_url" />-->
and
<!--<script src="${spring_url}" type="text/javascript"><!– /required for FF3 and Opera –></script>-->
<!--<script src="${spring_dojo_url}" type="text/javascript"><!– required for FF3 and Opera –></script>-->
Then to use Dojo I simply make the calls manually instead of using the Spring.addDecoration stuff that Spring Roo produces. Again this is pretty easy... instead of say:
<page:list id="pl_gov_uk_london_ems_domain_nomination_Candida te" items="${candidates}" z="DxLsb0i/D/ICLfai9vQmTK1TQwE=">
...
</page>
you get
<script type="text/javascript">dojo.require("dijit.TitlePane");</script>
<div id="_title_pl_gov_uk_london_ems_domain_nomination_ PoliticalParty_id" dojoType="dijit.TitlePane" class="dijitTitlePane" title="List all Political Partys">
...
</div>
<script type="text/javascript">dojo.parser.parse();</script>
So in that example you get the standard title pane layout but my div then contains a jQuery table.
All of that is pretty hacky and not very nice but I have found that this has allowed me to benefit the most from the web scaffolding whilst also coding the essential UI elements in jQuery. For me learning Dojo in more detail was not really an option due to budget and time constraints - I would certainly prefer to have a jQuery native option and feel this would greatly enhance the utility of a Spring Roo web solution.
Of course I also think that a Spring Roo - Backbone JavaScript framework combination (with Spring Roo producing the RESTful web api) might be a better combination again and something I would be interested in investigating.