Combobox - imona/tutorial GitHub Wiki

Combobox

** Note: Some method don't use for persistent, but you can use for transient all methods. **

  • addEntityItem(Object item) Adds the given object (item) to the combobox. Note that this method only works for transient components.

Parameters: item - item to be added

Example: getComponent("combobox").addEntityItem(item);

  • addItem(Object key, List languages) Adds the given item (key) to the target ComboBox or Radio Button. Note that this method only works for transient components.

Parameters: item - item to be added languages - array of item's natural languages.

var firma_listesi = query("from account");
foreach(item : firma_listesi)
{
getComponent("combobox_firmalar").addItem(item.account_tax_number, [item.account_name + "-"+item.account_tax_number, item.account_name+"-"+item.account_tax_number]);
}

Example: addItem(item, ["name","isim"]);

  • captionForSelectedItem
  • deleteSelectedItem() Deletes the selected item. Field must be embeeded combobox. Note that deleteSelectedItem is a database operation and does not work for entity list combobox.

Example: getComponent("combobox").deleteSelectedItem();

  • focus(): Focus on the target component
  • height: Sets height on the target component.
  • readOnly: Sets the target component as read-only or editable;
  • remove(Object item) Removes the item(s) with the given id from the field. Field can be permanent or transient. Remove operation works on UI level for embedded combobox,doesn't effect database record.

Parameters: item - item to be removed

Example: getComponent("combobox").remove(item);

  • removeAll() Removes all items(s) from the field. Field can be permanent or transient. Remove operation works on UI level for embedded combobox, doesn't effect database record.

Example: getComponent("combobox").removeAllItems();

  • removeSelected() Removes selected item(s) from the field. Field can be permanent or transient. Remove operation works on UI level for embedded combobox, doesn't effect database record.

Example: getComponent("combobox").removeSelected();

  • required: Require the target component as mandatory or optional

  • selectedItem: Selects the clicked item

  • setValueRendered(String mvel): İf you want you can custom value
    Example : getComponent("combobox").setValueRendered("id+ " : " +id");

  • value: Set/Get value the target component

  • visible: Sets the target component as visible or invisible

  • width: Sets width on the target component.

⚠️ **GitHub.com Fallback** ⚠️