Using the sandbox in AJAX to persist data accross events


Permalink to this snippet:


The authors comment:

This snippet shows an example of the usage of the sandbox in an AJAX event context.

 

The value $iCounter increments and is persisted on each click on the button.

 

Also note how the sandbox implements an init() method, automatically called by the Framework if defined, giving the developper a chance to initalize some internal members, in our case, the typoscript conf taken from the parent plugin.

 

For more informations, read this:

 

 

 

Jerome Schneider, 2009-01-30@12:30:45, pasted: