>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

Auto-save JSF forms with Ajax: Part 3 - jsf form data restore request listing function method

 
Registered tutorials: 501
Registered Users: 32529



Rating: 2.67 out of 3 votes cast


  
Category: Ajax and Java

Tags Map

action actionlistener add adding ajax andrei anonymous application applications apply article articles attribute attributes author auto automatically autosaveinterval autosavelistener autosavescriptjs bean box browser button buttons call called calls change check cioroianu class clicks code combination command commandbutton comp component components conclusion context control current cycle data datamap datamaprepository developer developerworks development discussed download editablevalueholder element events expression faces false feature file find form forms framework function functions generated handle hidden html ibm identify idsupportform implement implementation implements information init input invoice invoke iscurrentviewrestorable isrestorable java javaioserializable javascript jsf learn library life listener listeners listing managed map means method methods model named object onclick output overview package page part phase phases post presents previous process processed processing property provide public rate render renderresponse repository repositorywrapper request requests resources response restore restorecurrentview restored restoretrigger restorevalues restoring return returns sample save saved saving section sending series server services servlet sessions set setautosaving shown shows side skipping specification submit submitallforms submitrestorerequest submitsaverequest submitted submitting supportform supportformjsp technology time trademarks transparently tree trigger true understanding update user users validation validations valuechangelistener values var verifying view viewrestorer void web wrapper

Keyword Cloud Navigation Map

Auto-save JSF forms with Ajax: Part 3

Digg this   Post to del.icio.us

Abstract: In this article you'll find out how to restore the data of a JSF form, which is trickier than you might think. You will learn interesting JSF techniques.

Introduction to the series

All three articles of this series present a single Web application, which was progressively enhanced with each subsequent part. This section provides a brief overview of the sample application.

Part 1 starts with a typical JSF form named SupportForm.jsp and presents a set of reusable JavaScript functions for getting, encoding, and submitting form data with Ajax, which lets you save user input automatically, periodically, and transparently. You can find the source code of the JavaScript functions in the AutoSaveScript.js file of the sample application. Part 1 also explains how to build a JSF phase listener named AutoSaveListener, which handles the Ajax requests. The listener class was modified in Part 2.

In Part 2, you see how to store the data of the current JSF view into a data repository. The DataMapRepository class is a Map containing data maps. Each data map maintains the user input of a single form instance. Any access to the data repository is made through a thread-safe wrapper class named RepositoryWrapper. A servlet context listener named DataMapPersistence is used to serialize the repository into a file before shutdown and restore the repository's state after startup. Part 2 also presents a servlet filter named BrowserIdFilter, which is used to identify anonymous users across browser sessions.


Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 580
Unique Hits: 534


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0.2 0.2 1.6 2 12.2 13.4
Current 0 0 0 0 8 9
Previous 0 0 0 0 11 14
Nov 19 0 0 4 4 10 10
Nov 18 0 0 0 0 11 12
Nov 17 0 0 4 5 9 10
Nov 16 0 0 0 0 27 29
Nov 15 0 0 1 1 0 0
Nov 14 0 0 2 2 15 17
Nov 13 1 1 5 8 8 8
Nov 12 1 1 0 0 23 25
Highest 16 18 68 73 254 278


Script Execution Time: 0.83351 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2