>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 2 - data repository jsf class application form listing public

 
Registered tutorials: 501
Registered Users: 32542



Rating: 4 out of 2 votes cast


  
Category: Ajax and Java

Tags Map

accessed accesses accessing addition afterphase ajax andrei anonymous app application applications article authenticated author auto automatically autosavelistener autosavescriptjs based bean browser browserid browseridfilter build button call calls case children choose cioroianu class comp component components config configuring context contextinitialized cookie cookies copy creates ctx current data datafile datamap datamappersistence datamaprepository developer developerworks development dofilter download easy editablevalueholder environment error exception extends faces facescontext file filter final find form forms framework getbrowserid getdatamap getdatamapid header http httpservletrequest ibm id identify implement implementing implements import information input instance instances int interface java javaioserializable javascript jsf learn library limit linkedhashmap listener listing loaded managed map maps mapstring maxdatamaps memory method methods multithreaded named null number object objects obtain package page parameter part path persistence phase presented principal private processing property public rate read recursive remember repository repositorywrapper request requests resources response restore restoring retrieving return returns root safe sample save savecurrentview saved saves savevalues saving scope sctx series server services servlet servletcontext servletcontextlistener session sessions set setdatamap shown shows single site solution specification state static stop store stored storing string submit submitted synchronized techniques technology temporary thread time top tree uicomponent unique user userid users valid values view void web wrapper

Keyword Cloud Navigation Map

Auto-save JSF forms with Ajax: Part 2

Digg this   Post to del.icio.us

Abstract: In this second installment of the three-part series, you will see how to identify anonymous users across browser sessions, how to manage the automatically saved form data for multiple users and pages, how to choose a data repository.

Introduction

Part 1 of this series describes a scenario in which your application automatically saves form data on the server and you want to be able to restore forms after your users close and reopen their browsers. The solution works even if the user's browser crashes, or if the user leaves the application without clicking Submit on the Web form.

The sample application included with this article (see Download) contains a typical JSF form named SupportForm.jsp whose data is periodically submitted to the server using the JavaScript functions of the AutoSaveScript.js file. Both SupportForm.jsp and AutoSaveScript.js are described in Part 1, which also shows how to use a JSF phase listener to process Ajax requests without interfering with the application logic.

In this article, you'll learn how to build a thread-safe data repository for keeping auto-saved form data. You'll see how to choose data structures, how to populate them with the form data extracted from the JSF component tree, how to restore the state of the JSF components, how to limit the memory resources of the data repository, and how to implement its persistence. You'll also learn several Web techniques, such as using filters and browser ID cookies.


Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 105
Unique Hits: 96


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0.1 0.1 0.7 1 5.1 5.7
Current 0 0 0 0 2 5
Previous 0 0 0 0 5 5
Nov 19 0 0 1 1 1 1
Nov 18 0 0 0 0 5 5
Nov 17 0 0 1 4 11 11
Nov 16 0 0 0 0 9 11
Nov 15 0 0 1 1 0 0
Nov 14 0 0 1 1 5 6
Nov 13 0 0 2 2 6 6
Nov 12 1 1 1 1 7 7
Highest 4 4 7 7 17 19


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