@Override public void setValue(Object value) { m_value = value; String text = m_text; // Nothing to show or Record_ID if (value == null || super.getColumnName().equals("Record_ID")) {; } else if (super.getColumnName().equals("DocAction") && !MSysConfig.getBooleanValue( MSysConfig.DOCACTIONBUTTON_SHOWACTIONNAME, false, Env.getAD_Client_ID(Env.getCtx()))) { text = Msg.getElement(Env.getCtx(), "DocAction"); } else if (m_values != null) { text = (String) m_values.get(value); } else if (m_lookup != null) { NamePair pp = m_lookup.get(value); if (pp != null) text = pp.getName(); } getComponent().setLabel(text != null ? text : ""); }
/** * Comparator Interface (based on toString value) * * @param o1 Object 1 * @param o2 Object 2 * @return compareTo value */ public final int compare(NamePair o1, NamePair o2) { String s1 = o1 == null ? "" : o1.toString(); String s2 = o2 == null ? "" : o2.toString(); return s1.compareTo(s2); // sort order ?? } // compare