This is an old revision of the document!
Blurb.
Checks to see if there is child data for the given subid available for this object.
This method is generally only used internally by derived classes. You probably won't need to use this method unless you are actually extending the library itself.
if( tfGet("joe").hasPersistent("lastName") ) alert( "Joe has a lastName child field!" );
Returns the child data for the given subid on this object.
This method is generally only used internally by derived classes. You probably won't need to use this method unless you are actually extending the library itself.
alert( "Joe's last name is " + tfGet("joe").getPersistent("lastName") + "!" );
Sets the child data for the given subid on this object to value.
This method is generally only used internally by derived classes. You probably won't need to use this method unless you are actually extending the library itself.
tfGet("joe").setPersistent( "lastName", "Josephson" );
Resets the child data for the given subid on this object to whatever was defined in Persistence.setDefaults().
This method is generally only used internally by derived classes. You probably won't need to use this method unless you are actually extending the library itself.
tfGet("joe").resetPersistent( "lastName" );
Returns the “name” field for this object.
var someDude = tfGet("joe"); alert( "someDude's full name is " + someDude.getName() + " " + someDude.getLastName() + "." );
this.getAName = function() { var name = this.getName(); if( this.getPersistent("nameIsProper") || name.charAt(0) == name.charAt(0).toUpperCase() ) return name; if( this.hasPersistent("nameIrregularArticle") ) return this.getPersistent("nameIrregularArticle")+" "+name; switch( name.charAt(0) ) { case 'a': case 'e': case 'i': case 'o': case 'u': return "an " + name; default: return "a " + name; } }