AjaxAnywhere, Great Java Based Ajax Solution
it’s just an amazing to see what AjaxAnywhere can do. it provides ajax-based page refresh function without any kind of pain. just cool!
though you have to add some javascript code for manipulation and automatic refresh, it’s not a big deal.
just like this.
<aa:zone name="yourTable">
<!– displaytag here –>
</aa:zone>
<script src="scripts/aa.js"></script>
<script type="text/javascript">
ajaxAnywhere.getZonesToReaload = function() { return "yourTable" }
function reloadAjaxAnywhere () {
ajaxAnywhere.getAJAX(location.href, ‘yourTable’);
window.setTimeout("reloadAjaxAnywhere()", 60000);
}
reloadAjaxAnywhere();
</script>
that’s all!
it may take some time to install AjaxAnywhere in your project.
1. add jar from maven repository
2. add aa.js to script folder manually. i get it from jar file.
3. add taglib like this
<%@ taglib uri="http://ajaxanywhere.sourceforge.net/" prefix="aa" %>
good luck!
sample pages
http://ajaxanywhere.sourceforge.net/
http://raibledesigns.com/rd/entry/the_future_of_the_displaytag
AjaxAnywhere는 displaytag를 ajax로 갱신하는 방법을 찾다가 발견한 라이브러리입니다. 주요한 기능은 refresh없이 페이지의 내용을 갱신하는 것입니다. 사실 이 기능말고는 지원하는게 없습니다. 하지만 써보면 딱 그 정도가 적당하다는 느낌입니다. 다른 기능은 DWR같은 걸로 구현하면 되니까요. 이런게 오픈소스 커뮤니티의 힘이겠지요. 뭔가 필요하다고 느낄때 누군가가 이미 작업을 해놓았다는걸 알면 개발자로서 굉장히 안도감이 듭니다.
몇번을 확인해보고 displaytag로는 아마도 ajax가 불가능하리라 생각했는데, 이 라이브러리를 써보니 그렇지 않다는 것을 알았습니다. 세상은 넓고 신기한 자바 라이브러리는 많더군요. 정기적으로 mvnrepository를 뒤져볼 필요가 있을 듯합니다.
더 자세한 정보는 링크한 페이지를 확인해보시길..
