Class CompoundRecordModel<R extends SRecordInstance>
java.lang.Object
com.inductiveautomation.ignition.gateway.web.models.CompoundRecordModel<R>
- All Implemented Interfaces:
- Serializable,- org.apache.wicket.model.IChainingModel<List<R>>,- org.apache.wicket.model.IComponentInheritedModel<List<R>>,- org.apache.wicket.model.IDetachable,- org.apache.wicket.model.IModel<List<R>>,- org.apache.wicket.util.io.IClusterable
public class CompoundRecordModel<R extends SRecordInstance>
extends Object
implements org.apache.wicket.model.IComponentInheritedModel<List<R>>, org.apache.wicket.model.IChainingModel<List<R>>
An implementation of model that is both chaining and inherited. The value represented by this model is always a list
 of SRecordInstance objects (one or more), with at most one record for any given RecordMeta type. They may be nested
 in deeper models (for instance, a LoadableDetchableModel). Components that wish to use this model by inheritance
 should implement IRecordFieldComponent. They may also use the field name as their Id, so long as the field name is
 unique among the types of records represented.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCompoundRecordModel(List<R> records) Creates a CompoundRecordModel directly on the record instanceCompoundRecordModel(org.apache.wicket.model.IModel<List<R>> targetModel) Creates a a CompoundRecordModel using a chained model.CompoundRecordModel(R... records) Creates a CompoundRecordModel directly on the record instance
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.wicket.model.IModelbind(SFieldMeta field) Binds this model to a specific field by returning a model that has this compound model as its nested/wrapped model and the property which should be evaluated.voiddetach()org.apache.wicket.model.IModel<?>voidsetChainedModel(org.apache.wicket.model.IModel<?> model) voidorg.apache.wicket.model.IWrapModel<Object>wrapOnInheritance(org.apache.wicket.Component component) 
- 
Constructor Details- 
CompoundRecordModelCreates a CompoundRecordModel directly on the record instance
- 
CompoundRecordModelCreates a CompoundRecordModel directly on the record instance
- 
CompoundRecordModelCreates a a CompoundRecordModel using a chained model. The target model must return a List of SRecordInstance from getObject()
 
- 
- 
Method Details- 
getObject- Specified by:
- getObjectin interface- org.apache.wicket.model.IModel<R extends SRecordInstance>
- See Also:
- 
- IModel.getObject()
 
 
- 
setObject- Specified by:
- setObjectin interface- org.apache.wicket.model.IModel<R extends SRecordInstance>
- See Also:
- 
- IModel.setObject(java.lang.Object)
 
 
- 
getObjectAsRecordList
- 
bindBinds this model to a specific field by returning a model that has this compound model as its nested/wrapped model and the property which should be evaluated. This can be used if the id of the Component isn't a valid property for the record.- Returns:
- The IModel that is a wrapper around the current model and the field
 
- 
wrapOnInheritancepublic org.apache.wicket.model.IWrapModel<Object> wrapOnInheritance(org.apache.wicket.Component component) - Specified by:
- wrapOnInheritancein interface- org.apache.wicket.model.IComponentInheritedModel<R extends SRecordInstance>
 
- 
detachpublic void detach()- Specified by:
- detachin interface- org.apache.wicket.model.IDetachable
 
- 
getChainedModelpublic org.apache.wicket.model.IModel<?> getChainedModel()- Specified by:
- getChainedModelin interface- org.apache.wicket.model.IChainingModel<R extends SRecordInstance>
- See Also:
- 
- IChainingModel.getChainedModel()
 
 
- 
setChainedModelpublic void setChainedModel(org.apache.wicket.model.IModel<?> model) - Specified by:
- setChainedModelin interface- org.apache.wicket.model.IChainingModel<R extends SRecordInstance>
 
 
-