Results 1 to 6 of 6

Thread: Treeview like jQuery

  1. #1

    Default Treeview like jQuery

    Hi all,

    I want to design a tree view menu in roo application like jQuery tree view,
    I found that using jQuery library in the roo project is not possible.
    So, is there any other way to implement the same.

    Actually I want to develop the exact jQuery treeview in my application because I am developing the mirror of another application which is using jQuery for treeview menu.

    Please help,

    Thanks & Regards,
    Rohit

  2. #2
    Join Date
    Jun 2010
    Posts
    440

    Default

    On the technical side there is nothing to stop you using jQuery and the jQuery ecosystem- with Roo...

    You can visit my blog where I showcase multiple Roo projects using both.
    Blog link is http://pragmatikroo.blogspot.com/ or http://pragmatikroo.blogspot.com/201...-mvc-view.html.

    Thx
    jD

  3. #3
    Join Date
    Jun 2008
    Location
    Philadelphia, PA, USA
    Posts
    212

    Default

    Quote Originally Posted by rohit_virbhadre View Post
    Hi all,

    I want to design a tree view menu in roo application like jQuery tree view,
    I found that using jQuery library in the roo project is not possible.
    So, is there any other way to implement the same.
    Rohit,

    Are you saying that this not possible because your project team is not allowed to use jQuery, or because you think it's not possible in Roo?

    Have you tried mounting jQuery alongside of Dojo? You should just have to load the jQuery JS file and any framework (jqueryui, etc) and the specific css. They basically live in separate worlds but there is a compatibility script somewhere in the Dojo dojox (experimental) library. I haven't used it so I can't comment on whether it works or how...

    Try this:

    This morning I downloaded jquery-ui, put it in the webapp directory, and added an accordion to the index.jspx page, and it worked fine. Here's my script:

    Add to webapp/tags/util/load-scripts.tagx
    Code:
    <!-- install jQuery -->
      <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="jqueryui_url" />
      <spring:url value="/css/ui-lightness/jquery-ui-1.8.14.custom.css" var="jqueryui_css_url" />
      <script src="${jquery_url}" type="text/javascript"><!-- required for FF3 and Opera --></script>
      <script src="${jqueryui_url}" type="text/javascript"><!-- required for FF3 and Opera --></script>
      <link rel="stylesheet" type="text/css" media="screen" href="${jqueryui_css_url}"><!-- required for FF3 and Opera --></link>
    add to index.jspx, just below the welcome_text spring message tag (directly from the index.html file provided by jquery ui)

    Code:
    <script type="text/javascript">
          			$(function(){
    
          				// Accordion
          				$("#accordion").accordion({ header: "h3" });
                });
          </script>
          
          <h2 class="demoHeaders">Accordion</h2>
          		<div id="accordion">
          			<div>
          				<h3><a href="#">First</a></h3>
          				<div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
          			</div>
          			<div>
          				<h3><a href="#">Second</a></h3>
          				<div>Phasellus mattis tincidunt nibh.</div>
          			</div>
          			<div>
          				<h3><a href="#">Third</a></h3>
          				<div>Nam dui erat, auctor a, dignissim quis.</div>
          			</div>
          		</div>
    You may have challenges interoperating with the Dojo components - for example, the client-side validation is a Dojo feature, so you'd have to create tags for each jQuery UI component you'd want to use and figure out how to hook it into the validation lifecycle, if that's something you'd want to do.
    Ken Rimple
    Chariot Solutions
    email: krimple@chariotsolutions.com
    work: www.chariotsolutions.com/education
    personal: www.rimple.com

    Author: Spring Roo in Action (Manning)
    MEAP Site: manning.com/rimple

  4. #4
    Join Date
    Jun 2010
    Posts
    440

    Default

    Yeah...
    BTW there is a new Spring Roo book announced here: http://www.joshlong.com/jl/archives/all/0.html.
    I'm sure is a good book coming from O'REILLY and from a well known Spring stuff author.

    I hope it would include all these topics in there.

    In the meantime you can review another of my articles where I introduced an jQuery-Web MVC add on. Link is here http://pragmatikroo.blogspot.com/201...ve-jquery.html

    B.Roogards
    jD

  5. #5

    Default

    Thanks for the reply,

    Can you please post the sample code using jQuery and Spring roo.

    Thanks & Regards,
    Rohit

  6. #6
    Join Date
    Jun 2010
    Posts
    440

    Default Up and running jQuery here

    @Rohit,

    I am looking for (an) sponsor(s) that allow me to release in a sustainable and responsible way all my Spring Roo solutions including the jQuery-Web MVC add on. I hope getting (one/them) soon.

    My cache of solutions is describe here: http://pragmatikroo.blogspot.com/

    Roogards
    jD

    Note: On the other hand you can have access to it rigjt away through my consulting services.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •