new UIField(ctn, obj, field, index)
- Description:
UIField
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | container |
obj |
Simplicite.Ajax.BusinessObject | Object |
field |
Simplicite.Ajax.ObjectField | Field or name |
index |
string | optional edit list index = rowId |
Methods
(static) this.blur(handler)
- Description:
Bind 'blur' event
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | related handler |
(static) this.cascad(f, handler, …args)
- Description:
Apply a UI function to all referenced fields
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
f |
Simplicite.Ajax.ObjectField | field |
|
handler |
function | function to apply |
|
args |
* |
<repeatable> |
function arguments |
(static) this.change(handler)
- Description:
Bind 'change' event
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | related handler |
(static) this.draw(d)
- Description:
Draw the UI field
Parameters:
Name | Type | Description |
---|---|---|
d |
jQuery | Field container |
(static) this.find(checked)
- Description:
Get all inputs related to field
Parameters:
Name | Type | Description |
---|---|---|
checked |
boolean | search only checked input ? |
Returns:
field UI elements (input, select...)
(static) this.focus(handler)
- Description:
Bind 'focus' event
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | related handler |
(static) this.keyup(handler)
- Description:
Bind 'keyup' event
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | related handler |
(static) this.off(event)
- Description:
Unbind UI event
Parameters:
Name | Type | Description |
---|---|---|
event |
string | event name (change, keydown...) |
(static) this.on(event, handler)
- Description:
Bind UI event
Parameters:
Name | Type | Description |
---|---|---|
event |
string | event name (change, keydown...) |
handler |
function | related handler |
(static) this.redraw()
- Description:
Redraw the UI field at same place
(static) this.required(req)
- Description:
Set required UI field
Parameters:
Name | Type | Description |
---|---|---|
req |
boolean | is required ? |
(static) this.updatable(upd)
- Description:
Enable/Disable UI field
Parameters:
Name | Type | Description |
---|---|---|
upd |
boolean | number | updatable ? true/false or Simplicite.UPD_READ_ONLY|ALWAYS|FORM_ONLY|LIST_ONLY
|
(static) this.val(v, tran)
- Description:
Get/Set a service value to UI
- get: v undefined = return the UI value converted to service
- set: v is a server value = to be set on UI and field.v
Parameters:
Name | Type | Description |
---|---|---|
v |
* | optional value (service syntax) |
tran |
string | optional transition to select (when value is ambiguous) |
Returns:
set: itself / get: the UI value converted to service
(static) this.visible(vis, slide, context)
- Description:
Show/Hide UI field
Parameters:
Name | Type | Description |
---|---|---|
vis |
boolean | number | visibility ?
|
slide |
boolean | true to add a slide effect |
context |
number | optional Simplicite.CONTEXT_* |