} // loginComplete /// <summary> /// Update Info Window Columns. /// - add new Columns /// - remove columns /// - change dispay sequence /// </summary> /// <param name="AD_Client_ID">AD_Client_ID</param> /// <param name="columns">columns</param> /// <param name="sqlFrom">sqlFrom</param> /// <param name="sqlOrder">sqlOrder</param> /// <returns>true if you updated columns, sequence or sql From clause</returns> public bool UpdateInfoColumns(int AD_Client_ID, List <Info_Column> columns, StringBuilder sqlFrom, StringBuilder sqlOrder) { bool retValue = true; for (int i = 0; i < _validators.Count; i++) { ModelValidator validator = (ModelValidator)_validators[i]; if (validator.GetAD_Client_ID() == 0 || validator.GetAD_Client_ID() == AD_Client_ID) { try { bool bb = validator.UpdateInfoColumns(columns, sqlFrom, sqlOrder); if (bb) { retValue = true; } } catch (Exception e) { s_log.Warning(validator.ToString() + ": " + e); } } } return(retValue); } // updateInfoColumns
} // updateInfoColumns /// <summary> /// Fire Document Validation. /// Call docValidate method of added validators /// </summary> /// <param name="po">persistent objects</param> /// <param name="docTiming">see ModalValidatorVariables.DOCTIMING_ constants</param> /// <returns>error message or null</returns> public String FireDocValidate(PO po, int docTiming) { if (po == null || _docValidateListeners.Count == 0) { return(null); } // String propertyName = po.Get_TableName() + po.GetAD_Client_ID(); List <ModelValidator> list = null; if (_docValidateListeners.ContainsKey(propertyName)) { list = new List <ModelValidator>(); list = _docValidateListeners[propertyName]; } if (list == null || list.Count == 0) { return(null); } // for (int i = 0; i < list.Count; i++) { ModelValidator validator = null; try { validator = (ModelValidator)list[i]; if (validator.GetAD_Client_ID() == po.GetAD_Client_ID()) { String error = validator.DocValidate(po, docTiming); if (error != null && error.Length > 0) { return(error); } } } catch (Exception e) { s_log.Log(Level.SEVERE, validator.ToString(), e); } } return(null); }