LibreOffice
LibreOffice 24.2 SDK API Reference
|
is an abstract service for specialized FormControlModels which are data aware and thus can be bound to a data source. More...
import"DataAwareControlModel.idl";
Included Services | |
service | com::sun::star::form::FormControlModel |
![]() | |
service | com::sun::star::awt::UnoControlModel |
service | com::sun::star::form::FormComponent |
![]() | |
service | com::sun::star::awt::UnoControlDialogElement |
This service is present when the control model is embedded in an UnoControlDialogModel. More... | |
Exported Interfaces | |
interface | com::sun::star::form::XBoundComponent |
makes it possible to transfer the data of the model to the connected data field. More... | |
interface | com::sun::star::form::XLoadListener |
must be implemented in order to recognize when the containing form of the model connects to its data source (loads its data). More... | |
interface | com::sun::star::form::XReset |
Each DataAwareControlModel should be resettable for setting default values. More... | |
![]() | |
interface | com::sun::star::beans::XFastPropertySet |
This optional interface gives an efficient access to all properties at once or an ability to set more than one property at once. More... | |
interface | com::sun::star::beans::XPropertyState |
This optional interface gives access to the state of the properties, e.g. More... | |
![]() | |
interface | com::sun::star::awt::XControlModel |
interface | com::sun::star::lang::XComponent |
interface | com::sun::star::beans::XPropertySet |
interface | com::sun::star::beans::XMultiPropertySet |
interface | com::sun::star::io::XPersistObject |
interface | com::sun::star::util::XCloneable |
![]() | |
interface | com::sun::star::form::XFormComponent |
identifies the component as a candidate for being part of a form. More... | |
interface | com::sun::star::lang::XComponent |
allows life-time control of form components. More... | |
interface | com::sun::star::container::XNamed |
Each FormComponent must supply a name for identification. More... | |
interface | com::sun::star::beans::XPropertySet |
gives access to the properties. More... | |
interface | com::sun::star::io::XPersistObject |
Each FormComponent must be able to be stored into and read from a stream. More... | |
interface | com::sun::star::beans::XPropertyBag |
allows to associate arbitrary properties with the form component More... | |
![]() | |
interface | com::sun::star::beans::XPropertySet |
interface | com::sun::star::beans::XPropertyContainer |
interface | com::sun::star::beans::XPropertyAccess |
Public Attributes | |
string | DataField |
specifies the name of the bound database field. More... | |
boolean | InputRequired |
determines whether or not input into this field is required, when it is actually bound to a database field. More... | |
com::sun::star::beans::XPropertySet | BoundField |
references to the cursor field to which the control is bound. More... | |
com::sun::star::beans::XPropertySet | LabelControl |
references to a control model within the same document which should be used as a label. More... | |
![]() | |
short | ClassId |
specifies the ID for classification of the component. More... | |
short | TabIndex |
determines the relative taborder of the control associated with the model. More... | |
string | Tag |
used for additional information. More... | |
![]() | |
string | DefaultControl |
specifies the service name of the default control for this model. More... | |
![]() | |
string | Name |
the name of the component. More... | |
Additional Inherited Members | |
![]() | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
![]() | |
void | dispose () |
The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More... | |
void | addEventListener ([in] XEventListener xListener) |
adds an event listener to the object. More... | |
void | removeEventListener ([in] XEventListener aListener) |
removes an event listener from the listener list. More... | |
![]() | |
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo () |
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException ) |
sets the value of the property with the specified name. More... | |
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
adds an XPropertyChangeListener to the specified property. More... | |
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
removes an XPropertyChangeListener from the listener list. More... | |
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
adds an XVetoableChangeListener to the specified property with the name PropertyName. More... | |
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
removes an XVetoableChangeListener from the listener list. More... | |
![]() | |
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo () |
void | setPropertyValues ([in] sequence< string > aPropertyNames, [in] sequence< any > aValues) raises ( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException ) |
sets the values to the properties with the specified names. More... | |
sequence< any > | getPropertyValues ([in] sequence< string > aPropertyNames) |
void | addPropertiesChangeListener ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener) |
adds an XPropertiesChangeListener to the specified property with the specified names. More... | |
void | removePropertiesChangeListener ([in] com::sun::star::beans::XPropertiesChangeListener xListener) |
removes an XPropertiesChangeListener from the listener list. More... | |
void | firePropertiesChangeEvent ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener) |
fires a sequence of PropertyChangeEvents to the specified listener. More... | |
![]() | |
string | getServiceName () |
gives the service name of the object More... | |
void | write ([in] com::sun::star::io::XObjectOutputStream OutStream) raises ( com::sun::star::io::IOException ) |
writes all the persistent data of the object to the stream. More... | |
void | read ([in] com::sun::star::io::XObjectInputStream InStream) raises ( com::sun::star::io::IOException ) |
reads all the persistent data of the object from the stream. More... | |
![]() | |
com::sun::star::util::XCloneable | createClone () |
creates a copy of the object. More... | |
![]() | |
com::sun::star::uno::XInterface | getParent () |
grants access to the object containing this content. More... | |
void | setParent ([in] com::sun::star::uno::XInterface Parent) raises ( com::sun::star::lang::NoSupportException ) |
sets the parent to this object. More... | |
![]() | |
string | getName () |
void | setName ([in] string aName) |
sets the programmatic name of the object. More... | |
![]() | |
void | loaded ([in] com::sun::star::lang::EventObject aEvent) |
is invoked when the object has successfully connected to a datasource. More... | |
void | unloading ([in] com::sun::star::lang::EventObject aEvent) |
is invoked when the object is about to be unloaded. More... | |
void | unloaded ([in] com::sun::star::lang::EventObject aEvent) |
is invoked after the object has disconnected from a datasource. More... | |
void | reloading ([in] com::sun::star::lang::EventObject aEvent) |
is invoked when the object is about to be reloaded. More... | |
void | reloaded ([in] com::sun::star::lang::EventObject aEvent) |
is invoked when the object has been reloaded. More... | |
![]() | |
void | disposing ([in] com::sun::star::lang::EventObject Source) |
gets called when the broadcaster is about to be disposed. More... | |
![]() | |
void | reset () |
resets a component to some default value. More... | |
void | addResetListener ([in] com::sun::star::form::XResetListener aListener) |
adds the specified listener to receive events related to resetting the component. More... | |
void | removeResetListener ([in] com::sun::star::form::XResetListener aListener) |
removes the specified listener More... | |
![]() | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
![]() | |
void | dispose () |
The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More... | |
void | addEventListener ([in] XEventListener xListener) |
adds an event listener to the object. More... | |
void | removeEventListener ([in] XEventListener aListener) |
removes an event listener from the listener list. More... | |
![]() | |
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo () |
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException ) |
sets the value of the property with the specified name. More... | |
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
adds an XPropertyChangeListener to the specified property. More... | |
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
removes an XPropertyChangeListener from the listener list. More... | |
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
adds an XVetoableChangeListener to the specified property with the name PropertyName. More... | |
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
removes an XVetoableChangeListener from the listener list. More... | |
![]() | |
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo () |
void | setPropertyValues ([in] sequence< string > aPropertyNames, [in] sequence< any > aValues) raises ( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException ) |
sets the values to the properties with the specified names. More... | |
sequence< any > | getPropertyValues ([in] sequence< string > aPropertyNames) |
void | addPropertiesChangeListener ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener) |
adds an XPropertiesChangeListener to the specified property with the specified names. More... | |
void | removePropertiesChangeListener ([in] com::sun::star::beans::XPropertiesChangeListener xListener) |
removes an XPropertiesChangeListener from the listener list. More... | |
void | firePropertiesChangeEvent ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener) |
fires a sequence of PropertyChangeEvents to the specified listener. More... | |
![]() | |
string | getServiceName () |
gives the service name of the object More... | |
void | write ([in] com::sun::star::io::XObjectOutputStream OutStream) raises ( com::sun::star::io::IOException ) |
writes all the persistent data of the object to the stream. More... | |
void | read ([in] com::sun::star::io::XObjectInputStream InStream) raises ( com::sun::star::io::IOException ) |
reads all the persistent data of the object from the stream. More... | |
![]() | |
com::sun::star::util::XCloneable | createClone () |
creates a copy of the object. More... | |
![]() | |
void | addProperty ([in] string Name, [in] short Attributes, [in] any DefaultValue) raises ( com::sun::star::beans::PropertyExistException, com::sun::star::beans::IllegalTypeException, com::sun::star::lang::IllegalArgumentException ) |
adds a property to the object. More... | |
void | removeProperty ([in] string Name) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::NotRemoveableException ) |
removes a property from the object. More... | |
![]() | |
sequence< com::sun::star::beans::PropertyValue > | getPropertyValues () |
void | setPropertyValues ([in] sequence< com::sun::star::beans::PropertyValue > aProps) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException ) |
sets the values of given properties. More... | |
![]() | |
void | setFastPropertyValue ([in] long nHandle, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException ) |
sets the value to the property with the specified name. More... | |
any | getFastPropertyValue ([in] long nHandle) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
![]() | |
com::sun::star::beans::PropertyState | getPropertyState ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException ) |
sequence< com::sun::star::beans::PropertyState > | getPropertyStates ([in] sequence< string > aPropertyName) raises ( com::sun::star::beans::UnknownPropertyException ) |
void | setPropertyToDefault ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException ) |
Sets the property to default value. More... | |
any | getPropertyDefault ([in] string aPropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
![]() | |
boolean | commit () |
commits the content of the component into the data source it is bound to. More... | |
![]() | |
void | addUpdateListener ([in] com::sun::star::form::XUpdateListener aListener) |
adds the specified listener to receive the events "approveUpdate" and "updated". More... | |
void | removeUpdateListener ([in] com::sun::star::form::XUpdateListener aListener) |
removes the specified listener. More... | |
![]() | |
void | loaded ([in] com::sun::star::lang::EventObject aEvent) |
is invoked when the object has successfully connected to a datasource. More... | |
void | unloading ([in] com::sun::star::lang::EventObject aEvent) |
is invoked when the object is about to be unloaded. More... | |
void | unloaded ([in] com::sun::star::lang::EventObject aEvent) |
is invoked after the object has disconnected from a datasource. More... | |
void | reloading ([in] com::sun::star::lang::EventObject aEvent) |
is invoked when the object is about to be reloaded. More... | |
void | reloaded ([in] com::sun::star::lang::EventObject aEvent) |
is invoked when the object has been reloaded. More... | |
![]() | |
void | disposing ([in] com::sun::star::lang::EventObject Source) |
gets called when the broadcaster is about to be disposed. More... | |
![]() | |
void | reset () |
resets a component to some default value. More... | |
void | addResetListener ([in] com::sun::star::form::XResetListener aListener) |
adds the specified listener to receive events related to resetting the component. More... | |
void | removeResetListener ([in] com::sun::star::form::XResetListener aListener) |
removes the specified listener More... | |
![]() | |
long | Height |
specifies the height of the control. More... | |
string | Name |
specifies the name of the control. More... | |
string | PositionX |
specifies the horizontal position of the control. More... | |
string | PositionY |
specifies the vertical position of the control. More... | |
long | Step |
specifies the step of the control. More... | |
short | TabIndex |
specifies the tabindex of the control. More... | |
string | Tag |
specifies the tag of the control. More... | |
long | Width |
specifies the width of the control. More... | |
is an abstract service for specialized FormControlModels which are data aware and thus can be bound to a data source.
The connection between a data-aware control model and a form whose data the control should display is made by parentship relations. The parent of a data-aware control model (see com::sun::star::container::XChild, inherited via the FormControlModel and FormComponent services) has always to be a com::sun::star::form::component::DataForm.
|
optional |
makes it possible to transfer the data of the model to the connected data field.
This interface is optional, if a component doesn't support it, it has to forward the changes of its value to the field it is connected to immediately (means whenever a user interaction changes it's content).
interface com::sun::star::form::XLoadListener |
must be implemented in order to recognize when the containing form of the model connects to its data source (loads its data).
After loading the form, the model may bind to its related field source.
This interface will seldom be used directly from outside.
interface com::sun::star::form::XReset |
Each DataAwareControlModel should be resettable for setting default values.
In the context of a control model which is data-aware, the semantics of default value (see XReset) is as follows:
If (and only if) the control is valid bound to a column of its com::sun::star::form::component::DataForm, and the form is not positioned on a new record (see com::sun::star::sdb::RowSet::IsNew), then XReset::reset() does not reset the model's value to its default value, but uses the underlying column value.
In all other cases, the model is reset to the default value as specified by the respective property.
For an example, have a look at the com::sun::star::form::component::TextField. It inherits the com::sun::star::awt::UnoControlEditModel::Text property from the underlying service, and additionally specifies the com::sun::star::form::component::TextField::DefaultText.
In the context of a com::sun::star::form::component::DataForm, controls are automatically reset when one of the following applies
|
propertyreadonly |
references to the cursor field to which the control is bound.
Applies only if the form the control model belongs to is loaded and the control is valid bound. The referenced field supports the com::sun::star::sdb::Column service.
|
property |
specifies the name of the bound database field.
This property makes sense in the context of the control model only. Normally, a control model is a child of a com::sun::star::form::component::DataForm, which is bound to a higher level object such as a table or query - more general, a result set.
This member here describes the column of this result set which the control should act for.
Not every control model can be bound to every database column. Usually, super services of the DataAwareControlModel restrict the column types they can be used with.
|
optionalproperty |
determines whether or not input into this field is required, when it is actually bound to a database field.
If this property is set to FALSE
, then the form runtime will not check the control/model for NULL
values before submitting data to the database. Usually, if a control model is bound to a database field which cannot be NULL
, and the model itself does not have a value, then the database update is prevented, showing an error message to the user. To disable this behavior on a per-control basis, use the InputRequired
property.
|
property |
references to a control model within the same document which should be used as a label.
Any user interface action which needs to refer to the control is assumed to use this property.
A very common design method for forms is to group a data aware control with a label control, with the latter describing the content of the former. For instance, you may have a com::sun::star::form::component::TextField, which is bound to the e-mail column of your data source. Then you will probably add a com::sun::star::form::component::FixedText whose label is "E-Mail", and associate it with the TextField by setting it as LabelControl.
Now if you imagine a component offering data search in a form, this component will examine the LabelControl property, find the com::sun::star::form::component::FixedText, examine it's label, and use this label to refer to the com::sun::star::form::component::TextField.
When setting the property, a number of constraints apply:
Additionally, the support of a special service, indicating that the model is of the right type, is required. Which kind of service is in the request depends on the type of the control model.
For instance, text fields (com::sun::star::form::component::TextField) can be labeled by label controls only (com::sun::star::form::component::FixedText), and radio buttons (com::sun::star::form::component::RadioButton) can be labeled by group boxes (com::sun::star::form::component::GroupBox) only.