Tags:
create new tag
, view all tags
-- PedroRio - 01 Feb 2011

XEO Object Model Reference - Attribute Base Reference

This page contains a reference of properties that are applicable to all attributes types in a XEO Object Model.

Name

The name of the attribute. It's a required field and its value can be anything that it's not an SQL reserved word, as it's name of the attribute that will be used to create the corresponing column in the database table. When using the XEO's Java API, this is name to use when doing something like the following (assuming an attribute named "description").

boObject myObj = //retrieveObject code
myObj.getAttribute("description").getValueString()

_

Label

The label of the attribute. It's used especially with the XEO Web Components layer, in forms to edit instances of the XEO Object Model and in lists of instances (the label of a given column). It's also a required attribute.

Description

A description of the attribute, essentially used as documentation about the attribute.

Tooltip

A tooltip to be displayed along side the attribute when it's rendered in a form (at the present time it's not implemented in the XWC layer).

Attribute Behavior

This section groups all common attribute properties that are related to the attribute's behavior.

Required

Whether the attribute is required or not. If an attribute is required, every instance of a given Object Model which has a required attribute cannot be saved until the attribute has a value.

The required property can be set using BOL, the Java API , or smily boolean values ("1" and "0", for true and false respectivelly). Using boolean values, will make it that the attribute is always or never required. By using BOL or the Java API you can make it that the attribute is only required under some specific conditions.

When an attribute is used in a form, if it's required the attribute's label will be displayed in red.

onChangeSubmit

The onChangeSubmit property, makes it then this attribute is changed it triggers a new request to the server (only works in connection with the XWC layer). Making it possible to trigger anything that is dependant on the value of this attribute.

Default Value

The default value property allows you to create a rule to fill the value of the attribute when a new instance is created. The default value can depend on a number of other attributes?

The default value can be set using BOL, the JAVA API or boolean values.

(Dependents não funcionam (obviamente))

Valid

Allows tou to create a rule to check whether or not the value of attribute is valid. The value of rule must be true/false, you can also user BOL/Java/Boolean to create such a rule. When the validate operation on a given instance is called, this method is also be called and the instance cannot be saved if it has errors.

(Dependents não funcionam (obviamente))

Formula

Allows you to define a formula to calculate the value of the attribute. The formula only works when you declare depencies on other attributes. The formula can be defined using BOL or Java cod.

The formula may depend on other attributes, which are declared using XEO Studio's edit interface. When any of those attributes changes its value the formula of this attribute will be triggered.

Disable When

The "disable when" property allows you to declare when the attribute is disabled (i.e. its value cannot be changed). You can set the conditions using BOL, Java or Boolean values. This property will also affect forms created using the Web Components layer, by disabling the field to edit the value. Naturally, when an attribute is disabled you cannot edit its value either with the Java API.

The disabled when property can also be dependent on the value of other attributes.

Hidden When

The hidden when feature is very closed connected to the Web Components layes and allows you to declare a rule for when this attribute should not be rendered in the viewer.

This feature can also be dependent of the value of other attributes

Text Index

The text index property allows you to control the index behavior regarding this attribute

VOLTAR AQUI, não sei como funciona

_

Events

Every attribute can respond to certain events and trigger an action when that event occurs. The types of events vary with the type of attribute, but as explained in the XEO Concepts section, there are two events common to every type of attribute, listed as follows.

  • OnBeforeChange (Triggered before the attribute is actually changed)
  • OnAfterChange (Triggered after the attribute is actually changed)

Attribute events can only be defined using the Java API.

aaa

Database

The database property allows you to control several database-related properties of the attribute. Namely,

(VOLTAR AQUI, NÃO FAÇO IDEIA)

FieldName - The name of the column????

Unique - If checked, creates a unique constraint in the column

Indexed - If checked, creates an index in the column

Contraint - If checked, and if it's an object/collection attribute, creates a foreign key constraint between the tables (???)

Index Full - If checked the attributes is indexed by the Text Indexer

Tabled -

Binding -

_

Edit | Attach | Print version | History: r10 | r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 2011-02-03 - PedroRio
 

No permission to view TWiki.WebTopBar

This site is powered by the TWiki collaboration platform Powered by Perl

No permission to view TWiki.WebBottomBar