An AnonymousRecord is a record without a predefined name. It acts as a wrapper around an actual record that can be swapped out for another one whilst keeping all bindings intact.
This is useful to easily populate user-interface with data choosen from a list of entries.
Learn more about AnonymousRecords in this tutorial
Methods
name()
String name()
Returns the name of the underlying record the anonymous record is bound to. java String recordName = anonymousRecord.name()
setName(name)
AnonymousRecord setName(String recordName)
argument | type | description |
---|---|---|
recordName | String | The name of the underlying record to use |
Sets the underlying record the anonymous record is bound to. Can be called multiple times.
anonymousRecord.setName('person/bob')
addRecordNameChangedListener(listener)
AnonymousRecord addRecordNameChangedListener(AnonymousRecordNameChangedListener listener)
argument | type | description |
---|---|---|
listener | AnonymousRecordNameChangedListener | The listener to add |
Add a callback to be notified whenever setName(String) is called.
anonymousRecord.addRecordNameChangedListener(...)
removeRecordNameChangedCallback(listener)
AnonymousRecord removeRecordNameChangedCallback(AnonymousRecordNameChangedListener listener)
argument | type | description |
---|---|---|
listener | AnonymousRecordNameChangedListener | The listener to remove |
Remove a previously registered AnonymousRecordNameChangedListener
anonymousRecord.removeRecordNameChangedCallback(...)