![]() |
![]() |
Home:Projects Russian | About Author |
Cocoon Java Sserver Faces ![]() ![]() ![]() | |
AbstractGoals for this project - create framework for building light-weight clients for applications like ERP, CMS, Mail ( like Gmail ) etc. with AJAX technology, based on Java Server Faces. It designed for maximal compability with standard JSF lifecicle, and can use any existing JSF components. Since JSF support most of capability desctop application like SWING ( MVC, events, validation, converters ) such client may be designed ( and work ) same as non-web desktop application. In short, base idea very simple :In JSF application, we have tree of components, wich rendered ( at render responce phase ) to HTML code. This tree have good navigation with unique ID's path's. This ID's having a single meaning to convert as HTML element ID ( clientID ). On other hand, on client side we have DOM tree, builded from HTML code. This tree reflect view tree on server side. Role of AJAX framevork - send user input information to server, render ONLY changed components and update client DOM tree with this changes. To set up a correspondence between rendered component and element in DOM tree used clientID. In resault, we have two - way communication between client and server, what keep same both tree. You can see process on UML sequence diagram. For some reasons, list of components, rendered at current response, must be builded by application author. I assume, what it must be more effectively, when automatic comparison. Realisationlink to code repository http://svn.demi.spb.ru/repository/myfaces-ajax/src/ . Also, You can see JavaDoc at http://smirnov.org.ru/api/ 3 main parts of code :
As result, we have two-way communications between client DOM Tree and Java Server Faces View tree. Worked sampleYou can see worked sample at my server. On left side of page - MyFaces Tomahawk TabbedPane component, with custom tag and custom renderer. On change tab, only content of pane updated. First tab - MyFaces Tomahawk Tree2 component, with same tag but little changed renderer. It not modification, but any bug correction ( changed 4 lines of original code ). On expand-collapse leaf, only content of tree updated. On item, only updated content of box on right side page.Second tab - any input-output components. Third tab - x:DataTable component with DataScpoller. Usual Components, with original tags and renderers. On scrolling, only content of table updated. Right side of page - standard SelectOne component, with custom onchange JavaScript code. On select item, changed visible panel of PanelStack below. Bottom of page - request status indicator. On start request, color changed to red. After last request completed, color change to green. | |
Cocoon Java Server Faces ![]() ![]() ![]() | |
Copyright 2005. All rights reserved. Contact: Webmaster |
2006년 1월 2일 월요일
AJAX-JSF Framework
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기