[EXTENSION] defaultpersister Save/load attribute values as default to session
Posted 26 October 2010 - 09:13 AM
Check out the extension page for more details and a full usage example:
Questions and suggestions are welcome.
Posted 11 January 2011 - 03:47 PM
The extension now also allows to load ActiveRecord attributes that where defined in the model file only.
resetDefaults() can be used to reset (clear) attributes. If no argument is supplied, all values will be cleared. It can also be called with a single attribute name or an array of names that should be cleared.
Posted 11 January 2011 - 04:35 PM
Posted 12 January 2011 - 03:30 AM
In fact i really got used to this little helper. For example it's useful if you want to create wizard like forms over multiple pages: I create scenarios for each page and if a page validates i use saveAsDefaults() to remember the form inputs. Only after the last page i call save() to finally store the data to DB. Works like a charm
Posted 12 January 2011 - 04:34 AM