Monday, November 26, 2012

jQuery dynatree adapter for JSF 2

Introduction

dynatree-for-jsf is a JSF 2 adapter for dynatree jQuery plugin (http://code.google.com/p/dynatree/). dynatree allows to dynamically create html tree view controls using JavaScript.

Why this adapter though Richfaces or Primefaces already implements> tree components ? Because dynatree has more features, is more mature, robust and is a prooven component.

Source code and sample are available on https://github.com/nithril/dynatree-for-jsf 
Sample is running on Cloudbees at http://dynatree.nithril.cloudbees.net/tree.jsf

Features

This adapter handles events for all of the dynatree events. All events can be mapped to JSF ajax events.
Here is a typical use of the adapter

onLazyRead and onActivate ajax events are binded to methods of the managed bean treeBean.
  • lazyRead populates the tree dynamicaly.
  • activate refresh a JSF panel with the selected node key.
All with Ajax.
This project does not include jquery, nor dynatree. You should include their by yourself.

Example

I have create an example with an infinite ajax tree
Browse to http://localhost:8080/tree/tree.jsf
alt Screenshot


Licenses

Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0

 


Credits

Authors of dynatree, a great component. Authors of Primefaces and Mojarra, a source of inspiration on how to create an JSF 2 component with Ajax behaviour

10 comments:

  1. Are you sure that is an accurate representation of your code? I just set this up on jsFiddle, and can select upwards of 62k nodes in chrome in under a second. Upwards of that and Dynatree throws a RangeError exception. Dmtech

    ReplyDelete
  2. This is really a great post. Thank you for taking time to provide us some of the useful and exclusive information with us. Keep on blogging!!
    Android Training in Chennai Thiruvanmiyur

    ReplyDelete
  3. Superb i really enjoyed very much with this article here. Really its a amazing article i had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your updation.
    Digital Marketing
    Company in Chennai

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.

    Self Employment Tax
    TaxPreparation Services
    Tax Accountant
    Tax Consultant
    Tax Advisor

    ReplyDelete
  6. Thanks for such a great article here. I was searching for something like this for quite a long time and at last, I’ve found it on your blog. It was definitely interesting for me to read about their market situation nowadays.angularjs best training center in chennai | angularjs training in velachery |angularjs training in omr | angularjs training in chennai

    ReplyDelete
  7. Nice Post. I was checking constantly this blog and I am impressed! Very useful info specifically the last part ?? I care for such information much. Thank you and good luck.
    Best Packers and Movers Services in Old City
    Best Packers and Movers in India
    best transportation sources in Hyderabad

    ReplyDelete
  8. Nice Post. I was checking constantly this blog and I am impressed! Very useful info specifically the last part ?? I care for such information much. Thank you and good luck.

    best relocation and shiftinig source in Adarsh Nagar Hyderabad

    Best Packers and Movers in India

    Hyderabad's best packers and movers

    ReplyDelete
  9. Great blog! I enjoyed reading the valuable insights you provided. We are Swaran Homeopathic Clinic in Dwarka, Delhi offers homeopathic treatment and medicine. With a focus on natural healing, they provide personalized care to patients, addressing various health issues. Experience the benefits of homeopathy in a trusted clinic setting.

    ReplyDelete