use of com.codename1.rad.models.Attribute in project CodeRAD by shannah.
the class UI method textField.
public static FieldNode textField(Attribute... atts) {
FieldNode fieldNode = new FieldNode(atts);
fieldNode.setAttributes(TEXT);
return fieldNode;
}
use of com.codename1.rad.models.Attribute in project CodeRAD by shannah.
the class UI method checkboxList.
public static FieldNode checkboxList(Attribute... atts) {
FieldNode fieldNode = new FieldNode(atts);
fieldNode.setAttributes(CHECKBOX_LIST);
return fieldNode;
}
use of com.codename1.rad.models.Attribute in project CodeRAD by shannah.
the class TablePropertyView method update.
@Override
public void update() {
super.update();
EntityListTableModel model = (EntityListTableModel) getComponent().getModel();
EntityList list = model.getEntityList();
EntityList ePropertyVal = getPropertyAsEntityList();
if (ePropertyVal == list) {
return;
}
TableColumns columns = (TableColumns) getField().findAttribute(TableColumns.class);
if (columns == null) {
throw new IllegalStateException("Cannot create TablePropertyView for field " + getField() + " because the field does not define any columns. Add a ColumnsNode attribute to the field.");
}
EntityListTableModel newModel = new EntityListTableModel(list.getRowType(), ePropertyVal, columns);
getComponent().setModel(newModel);
}
use of com.codename1.rad.models.Attribute in project CodeRAD by shannah.
the class SectionNode method setAttributes.
public void setAttributes(Attribute... atts) {
if (fields == null) {
fields = new Fields();
}
for (Attribute att : atts) {
if (att.getClass() == FieldNode.class) {
att = ((FieldNode) att).createProxy(this);
fields.add((FieldNode) att);
// ((FieldNode)att).setParent(this);
} else {
super.setAttributes(att);
}
}
}
use of com.codename1.rad.models.Attribute in project CodeRAD by shannah.
the class Controller method extendAction.
/**
* Extends an action from a parent controller, and registers it as an action on this controller.
* @param category The category to register the action to.
* @param callback Callback which is executed immediately on the action, which is used to configure
* the action.
* @return The action node that was added/extended.
* @see #extendAction(ActionNode.Category, boolean, Attribute[])
*/
public ActionNode extendAction(ActionNode.Category category, SuccessCallback<ActionNode> callback) {
ActionNode extendedAction = extendAction(category, false);
callback.onSucess(extendedAction);
return extendedAction;
}
Aggregations