Ext.NET  5.3.0
.NET Component Framework for Enterprise Level Apps
Ext.Net.ModelProxy Class Reference

Class for model instance manipulation More...

Public Member Functions

 ModelProxy (AbstractStore store, object id)
 
 ModelProxy (AbstractStore store, object id, bool isInternal)
 
 ModelProxy (AbstractStore store, int index)
 
 ModelProxy (AbstractStore store)
 
 ModelProxy (AbstractStore store, string expression)
 
void Abort ()
 Aborts a pending load operation. If the record is not loading, this does nothing. More...
 
void BeginEdit ()
 Begin an edit. While in edit mode, no events (e.g. the update event) are relayed to the containing store. When an edit has begun, it must be followed by either endEdit or cancelEdit. More...
 
void CancelEdit ()
 Cancels all changes made in the current edit operation. More...
 
ModelProxy Clone ()
 Creates a clone of this record. States like dropped, phantom and dirty are all preserved in the cloned record. More...
 
void Commit ()
 Usually called by the Ext.data.Store which owns the model instance. Commits all changes made to the instance since either creation or the last commit operation. Developers should subscribe to the Ext.data.Store.update event to have their code notified of commit operations. More...
 
void Commit (bool silent)
 Usually called by the Ext.data.Store which owns the model instance. Commits all changes made to the instance since either creation or the last commit operation. Developers should subscribe to the Ext.data.Store.update event to have their code notified of commit operations. More...
 
void Destroy ()
 Destroys the model using the configured proxy More...
 
void Destroy (object options)
 Destroys the model using the configured proxy More...
 
void Drop (bool cascade=true)
 Marks this record as dropped and waiting to be deleted on the server. When a record is dropped, it is automatically removed from all association stores and any child records associated to this record are also dropped (a "cascade delete") depending on the cascade parameter. More...
 
void EndEdit ()
 End an edit. If any data was modified, the containing store is notified (ie, the store's update event will fire). More...
 
void EndEdit (bool silent)
 End an edit. If any data was modified, the containing store is notified (ie, the store's update event will fire). More...
 
void Erase (object options)
 Destroys the model using the configured proxy. More...
 
void Load ()
 Load the model instance using the configured proxy. More...
 
void Load (object options)
 Load the model instance using the configured proxy. More...
 
void Reject ()
 Usually called by the Ext.data.Store to which this model instance has been joined. Rejects all changes made to the model instance since either creation, or the last commit operation. Modified fields are reverted to their original values. Developers should subscribe to the Ext.data.Store.update event to have their code notified of reject operations. More...
 
void Reject (bool silent)
 Usually called by the Ext.data.Store to which this model instance has been joined. Rejects all changes made to the model instance since either creation, or the last commit operation. Modified fields are reverted to their original values. Developers should subscribe to the Ext.data.Store.update event to have their code notified of reject operations. More...
 
void Save ()
 Saves the model instance using the configured proxy More...
 
void Save (object options)
 Saves the model instance using the configured proxy More...
 
void Set (string fieldName, object value)
 Sets the given field to the given value, marks the instance as dirty More...
 
void Set (object values)
 Sets the given field to the given value, marks the instance as dirty More...
 
void SetId (object id)
 Sets the model instance's id field to the given id More...
 

Static Public Member Functions

static string Serialize (ModelProxy[] array)
 

Protected Member Functions

virtual int GetID ()
 

Properties

AbstractStore Store [get]
 
virtual string ModelInstance [get]
 
bool CreateVariable [get, set]
 
virtual string????? ModelScript [get]
 

Detailed Description

Class for model instance manipulation

Constructor & Destructor Documentation

◆ ModelProxy() [1/5]

Ext.Net.ModelProxy.ModelProxy ( AbstractStore  store,
object  id 
)
inline

Parameters
store
id

◆ ModelProxy() [2/5]

Ext.Net.ModelProxy.ModelProxy ( AbstractStore  store,
object  id,
bool  isInternal 
)
inline

Parameters
store
id
isInternal

◆ ModelProxy() [3/5]

Ext.Net.ModelProxy.ModelProxy ( AbstractStore  store,
int  index 
)
inline

Parameters
store
index

◆ ModelProxy() [4/5]

Ext.Net.ModelProxy.ModelProxy ( AbstractStore  store)
inline

Parameters
store

◆ ModelProxy() [5/5]

Ext.Net.ModelProxy.ModelProxy ( AbstractStore  store,
string  expression 
)
inline

Parameters
store
expression

Member Function Documentation

◆ Abort()

void Ext.Net.ModelProxy.Abort ( )
inline

Aborts a pending load operation. If the record is not loading, this does nothing.

◆ BeginEdit()

void Ext.Net.ModelProxy.BeginEdit ( )
inline

Begin an edit. While in edit mode, no events (e.g. the update event) are relayed to the containing store. When an edit has begun, it must be followed by either endEdit or cancelEdit.

◆ CancelEdit()

void Ext.Net.ModelProxy.CancelEdit ( )
inline

Cancels all changes made in the current edit operation.

◆ Clone()

ModelProxy Ext.Net.ModelProxy.Clone ( )
inline

Creates a clone of this record. States like dropped, phantom and dirty are all preserved in the cloned record.

Returns
The cloned record.

◆ Commit() [1/2]

void Ext.Net.ModelProxy.Commit ( )
inline

Usually called by the Ext.data.Store which owns the model instance. Commits all changes made to the instance since either creation or the last commit operation. Developers should subscribe to the Ext.data.Store.update event to have their code notified of commit operations.

◆ Commit() [2/2]

void Ext.Net.ModelProxy.Commit ( bool  silent)
inline

Usually called by the Ext.data.Store which owns the model instance. Commits all changes made to the instance since either creation or the last commit operation. Developers should subscribe to the Ext.data.Store.update event to have their code notified of commit operations.

Parameters
silentTrue to skip notification of the owning store of the change

◆ Destroy() [1/2]

void Ext.Net.ModelProxy.Destroy ( )
inline

Destroys the model using the configured proxy

◆ Destroy() [2/2]

void Ext.Net.ModelProxy.Destroy ( object  options)
inline

Destroys the model using the configured proxy

Parameters
optionsOptions to pass to the proxy

◆ Drop()

void Ext.Net.ModelProxy.Drop ( bool  cascade = true)
inline

Marks this record as dropped and waiting to be deleted on the server. When a record is dropped, it is automatically removed from all association stores and any child records associated to this record are also dropped (a "cascade delete") depending on the cascade parameter.

Parameters
cascadePass false to disable the cascade to drop child records. Defaults to true.

◆ EndEdit() [1/2]

void Ext.Net.ModelProxy.EndEdit ( )
inline

End an edit. If any data was modified, the containing store is notified (ie, the store's update event will fire).

◆ EndEdit() [2/2]

void Ext.Net.ModelProxy.EndEdit ( bool  silent)
inline

End an edit. If any data was modified, the containing store is notified (ie, the store's update event will fire).

Parameters
silentTrue to not notify the store of the change

◆ Erase()

void Ext.Net.ModelProxy.Erase ( object  options)
inline

Destroys the model using the configured proxy.

Parameters
optionsConfig options for this load.

◆ GetID()

virtual int Ext.Net.ModelProxy.GetID ( )
inlineprotectedvirtual

◆ Load() [1/2]

void Ext.Net.ModelProxy.Load ( )
inline

Load the model instance using the configured proxy.

◆ Load() [2/2]

void Ext.Net.ModelProxy.Load ( object  options)
inline

Load the model instance using the configured proxy.

Parameters
options

◆ Reject() [1/2]

void Ext.Net.ModelProxy.Reject ( )
inline

Usually called by the Ext.data.Store to which this model instance has been joined. Rejects all changes made to the model instance since either creation, or the last commit operation. Modified fields are reverted to their original values. Developers should subscribe to the Ext.data.Store.update event to have their code notified of reject operations.

◆ Reject() [2/2]

void Ext.Net.ModelProxy.Reject ( bool  silent)
inline

Usually called by the Ext.data.Store to which this model instance has been joined. Rejects all changes made to the model instance since either creation, or the last commit operation. Modified fields are reverted to their original values. Developers should subscribe to the Ext.data.Store.update event to have their code notified of reject operations.

Parameters
silentreject

◆ Save() [1/2]

void Ext.Net.ModelProxy.Save ( )
inline

Saves the model instance using the configured proxy

◆ Save() [2/2]

void Ext.Net.ModelProxy.Save ( object  options)
inline

Saves the model instance using the configured proxy

Parameters
optionsOptions to pass to the proxy

◆ Serialize()

static string Ext.Net.ModelProxy.Serialize ( ModelProxy[]  array)
inlinestatic

Parameters
array
Returns

◆ Set() [1/2]

void Ext.Net.ModelProxy.Set ( object  values)
inline

Sets the given field to the given value, marks the instance as dirty

Parameters
valuesObject with values

◆ Set() [2/2]

void Ext.Net.ModelProxy.Set ( string  fieldName,
object  value 
)
inline

Sets the given field to the given value, marks the instance as dirty

Parameters
fieldNameThe field to set
valueThe value to set

◆ SetId()

void Ext.Net.ModelProxy.SetId ( object  id)
inline

Sets the model instance's id field to the given id

Parameters
idThe new id

Property Documentation

◆ CreateVariable

bool Ext.Net.ModelProxy.CreateVariable
getset

◆ ModelInstance

virtual string Ext.Net.ModelProxy.ModelInstance
get

◆ ModelScript

virtual string????? Ext.Net.ModelProxy.ModelScript
getprotected

◆ Store

AbstractStore Ext.Net.ModelProxy.Store
get


The documentation for this class was generated from the following file: