public TableEditor(FacesContext context, UIComponent component) { Map<String, Object> attributes = component.getAttributes(); id = component.getClientId(context) + Constants.TABLE_EDITOR_PREFIX; table = (IOpenLTable) attributes.get(Constants.ATTRIBUTE_TABLE); editable = BooleanUtils.toBoolean(attributes.get(Constants.ATTRIBUTE_EDITABLE), true); mode = (String) attributes.get(Constants.ATTRIBUTE_MODE); view = (String) attributes.get(Constants.ATTRIBUTE_VIEW); linkBuilder = (LinkBuilder) attributes.get(Constants.ATTRIBUTE_LINK_BUILDER); showFormulas = BooleanUtils.toBoolean(attributes.get(Constants.ATTRIBUTE_SHOW_FORMULAS)); collapseProps = BooleanUtils.toBoolean(attributes.get(Constants.ATTRIBUTE_COLLAPSE_PROPS)); castToFilters(component.getAttributes().get(Constants.ATTRIBUTE_FILTERS)); beforeEditAction = FacesUtils.getValueExpressionString(component, Constants.ATTRIBUTE_BEFORE_EDIT_ACTION); beforeSaveAction = FacesUtils.getValueExpressionString(component, Constants.ATTRIBUTE_BEFORE_SAVE_ACTION); afterSaveAction = FacesUtils.getValueExpressionString(component, Constants.ATTRIBUTE_AFTER_SAVE_ACTION); onBeforeEdit = (String) attributes.get(Constants.ATTRIBUTE_ON_BEFORE_EDIT); onBeforeSave = (String) attributes.get(Constants.ATTRIBUTE_ON_BEFORE_SAVE); onError = (String) attributes.get(Constants.ATTRIBUTE_ON_ERROR); onAfterSave = (String) attributes.get(Constants.ATTRIBUTE_ON_AFTER_SAVE); onRequestStart = (String) attributes.get(Constants.ATTRIBUTE_ON_REQUEST_START); onRequestEnd = (String) attributes.get(Constants.ATTRIBUTE_ON_REQUEST_END); excludeScripts = (String) attributes.get(Constants.ATTRIBUTE_EXCLUDE_SCRIPTS); rowIndex = (Integer) attributes.get(Constants.ATTRIBUTE_ROW_INDEX); }
public TableEditor(FacesContext context, UIComponent component) { Map<String, Object> attributes = component.getAttributes(); id = component.getClientId(context) + Constants.TABLE_EDITOR_PREFIX; table = (IOpenLTable) attributes.get(Constants.ATTRIBUTE_TABLE); editable = BooleanUtils.toBoolean(attributes.get(Constants.ATTRIBUTE_EDITABLE), true); mode = (String) attributes.get(Constants.ATTRIBUTE_MODE); view = (String) attributes.get(Constants.ATTRIBUTE_VIEW); linkBuilder = (LinkBuilder) attributes.get(Constants.ATTRIBUTE_LINK_BUILDER); showFormulas = BooleanUtils.toBoolean(attributes.get(Constants.ATTRIBUTE_SHOW_FORMULAS)); collapseProps = BooleanUtils.toBoolean(attributes.get(Constants.ATTRIBUTE_COLLAPSE_PROPS)); castToFilters(component.getAttributes().get(Constants.ATTRIBUTE_FILTERS)); beforeEditAction = FacesUtils.getValueExpressionString(component, Constants.ATTRIBUTE_BEFORE_EDIT_ACTION); beforeSaveAction = FacesUtils.getValueExpressionString(component, Constants.ATTRIBUTE_BEFORE_SAVE_ACTION); afterSaveAction = FacesUtils.getValueExpressionString(component, Constants.ATTRIBUTE_AFTER_SAVE_ACTION); onBeforeEdit = (String) attributes.get(Constants.ATTRIBUTE_ON_BEFORE_EDIT); onBeforeSave = (String) attributes.get(Constants.ATTRIBUTE_ON_BEFORE_SAVE); onError = (String) attributes.get(Constants.ATTRIBUTE_ON_ERROR); onAfterSave = (String) attributes.get(Constants.ATTRIBUTE_ON_AFTER_SAVE); onRequestStart = (String) attributes.get(Constants.ATTRIBUTE_ON_REQUEST_START); onRequestEnd = (String) attributes.get(Constants.ATTRIBUTE_ON_REQUEST_END); excludeScripts = (String) attributes.get(Constants.ATTRIBUTE_EXCLUDE_SCRIPTS); rowIndex = (Integer) attributes.get(Constants.ATTRIBUTE_ROW_INDEX); }