myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <simon.kitch...@rhe.co.nz>
Subject Re: resotring state
Date Wed, 13 Dec 2006 23:44:51 GMT
Matt Tyson wrote:
> Got it.  Here's the params I needed to send with the ajax request:
> 
> var clientTree = document.getElementById("jsf_tree_64").value;
> 	var clientState = document.getElementById("jsf_state_64").value;
> 	var viewId = document.getElementById("jsf_viewid").value;
> 	
> 	dojo.io.bind({
> 		url: url,
> 		load: function(type, data, evt){ treeTools.handleAjaxResponse(data) },
> 		mimetype: "text/xml",
> 		content: {  "ajaxTreeRequest": treeTools.getThisTreeId(clickedNode),
> 		 			"id": id,
> 		 			"name": name,
> 		    		"provider": treeTools.getNodeDataProvider(clickedNode),
> 		    		"jsf_tree_64": clientTree,
> 		    		"jsf_state_64":clientState,
> 		    		"jsf_viewid":viewId}
> 	});
> 
> Only took a day.  Thanks for pointing me in the right direction Simon.

The only problem with this is that an AJAX request is supposed to be 
"light", but the saved state trees can be quite large. In the case of 
the app I'm currently working on, often around 100kb :-).

You might want to consider if client-side state is appropriate in your case.

Regards,

Simon

Mime
View raw message