public BndIJTextField bind(JTextComponent component, String fieldName, Validator validator) { BndIJTextField inputComponent = new BndIJTextField(currentInputCmpMgr, component, fieldName); inputComponent.registerValidator(validator); presenter.getValidatorMgr().registerBasicValidator(validator); currentInputCmpMgr.initComponent(inputComponent); return inputComponent; }
public BndIJComboBox bind( JComboBox component, List dropDownValues, String fieldName, String rule) { BndIJComboBox inputComponent = new BndIJComboBox(currentInputCmpMgr, component, dropDownValues, fieldName); presenter.getValidatorMgr().registerBasicRule(inputComponent, rule); currentInputCmpMgr.initComponent(inputComponent); return inputComponent; }
public BndIJComboBox bind( JComboBox component, MetaLoader metaLoader, String fieldName, String rule) { BndIJComboBox inputComponent = new BndIJComboBox(currentInputCmpMgr, component, decorateMetaLoader(metaLoader), fieldName); presenter.getValidatorMgr().registerBasicRule(inputComponent, rule); currentInputCmpMgr.initComponent(inputComponent); return inputComponent; }
protected MetaLoader decorateMetaLoader(MetaLoader metaLoader) { String pstViewMode = presenter.getViewMode(); if (presenter instanceof FindPresenter || ViewMode.MODE_PICK.equals(pstViewMode)) { if (!metaLoader.isTopRowSet()) { metaLoader = metaLoader.addTodosNRow(); } } else { if (!metaLoader.isTopRowSet()) { metaLoader = metaLoader.addSeleccioneNRow(); } } if (!ViewMode.MODE_READONLY.equals(pstViewMode)) { metaLoader = metaLoader.activeRows(); } return metaLoader; }
public BndIJTextField bind(JTextComponent component) { BndIJTextField inputComponent = new BndIJTextField(currentInputCmpMgr, component); presenter.getValidatorMgr().registerBasicRule(inputComponent, ""); currentInputCmpMgr.initComponent(inputComponent); return inputComponent; }