Difference between revisions of "Documentation/DevGuide/Forms/Validation and Bindings"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Documentation/Developers Guide/Forms)
m
 
(2 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
|NextPage=Documentation/DevGuide/Forms/Scripting and Events
 
|NextPage=Documentation/DevGuide/Forms/Scripting and Events
 
}}
 
}}
{{DISPLAYTITLE:Validations and Bindings}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Forms/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Validations and Bindings}}
 
Chapter [[Documentation/DevGuide/Forms/Value Bindings|Value Bindings]] introduced form components that can exchange the value with external components, as long as those support the <idls>com.sun.star.form.binding.XValueBinding</idls> interface. Also, chapter [[Documentation/DevGuide/Forms/Validation|Validation]] introduced form components whose value can be validated by external components.
 
Chapter [[Documentation/DevGuide/Forms/Value Bindings|Value Bindings]] introduced form components that can exchange the value with external components, as long as those support the <idls>com.sun.star.form.binding.XValueBinding</idls> interface. Also, chapter [[Documentation/DevGuide/Forms/Validation|Validation]] introduced form components whose value can be validated by external components.
  
Line 14: Line 15:
 
As soon as you establish a validator at the model (<idlm>com.sun.star.form.validation.XValidatable:setValidator</idlm>), which is also an <idls>com.sun.star.form.binding.XBindableValue</idls>, then it is used both as value binding and as validator. Every attempt to establish another binding will be denied, as long as the combined validator/binding is in place.
 
As soon as you establish a validator at the model (<idlm>com.sun.star.form.validation.XValidatable:setValidator</idlm>), which is also an <idls>com.sun.star.form.binding.XBindableValue</idls>, then it is used both as value binding and as validator. Every attempt to establish another binding will be denied, as long as the combined validator/binding is in place.
  
{{Documentation/Note|In {{PRODUCTNAME}}, every form control model that can be validated ''and'' is also bindable, also supports the <idls>com.sun.star.form.validation.ValidatableBindableControlModel</idls> service. That is, the validator and the binding are coupled, if possible.}}
+
{{Note|In {{AOo}}, every form control model that can be validated ''and'' is also bindable, also supports the <idls>com.sun.star.form.validation.ValidatableBindableControlModel</idls> service. That is, the validator and the binding are coupled, if possible.}}
  
 
{{PDL1}}
 
{{PDL1}}
  
 
[[Category:Documentation/Developer's Guide/Forms]]
 
[[Category:Documentation/Developer's Guide/Forms]]

Latest revision as of 15:55, 21 December 2020



Chapter Value Bindings introduced form components that can exchange the value with external components, as long as those support the XValueBinding interface. Also, chapter Validation introduced form components whose value can be validated by external components.

These concepts can be combined. This way, it is possible to build highly customized form documents.

In fact, this is what the com.sun.star.form.validation.ValidatableBindableControlModel service does: it combines the services BindableControlModel with the ValidatableControlModel.

As soon as you establish a validator at the model (setValidator), which is also an XBindableValue, then it is used both as value binding and as validator. Every attempt to establish another binding will be denied, as long as the combined validator/binding is in place.

Documentation note.png In Apache OpenOffice, every form control model that can be validated and is also bindable, also supports the ValidatableBindableControlModel service. That is, the validator and the binding are coupled, if possible.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages