void setCurResource(RtRes rr) { inUpdate = true; if (rr == null) { curResource = null; KeyedModel kmodel = new KeyedModel(); // for dropdown rmods.rkMod.clear(); srckeys.setKeyedModel(kmodel); version1.setKeyedModel(kmodel); } else { curResource = rr.res; rmods.rkMod.setData(rr); // Set up dropdown KeyedModel kmodel = new KeyedModel(); // for dropdown for (RtResKey rk : rr.relevant) { kmodel.addItem(rk, rk.uversionName); } srckeys.setKeyedModel(kmodel); // Set up the other dropdown for the total versions kmodel = new KeyedModel(); for (Integer v : rr.res.getAllPossibleVersions()) { if (v.intValue() > 0) kmodel.addItem(v, v); } version1.setKeyedModel(kmodel); version1.setValue(rr.res.getRequiredVersion(app.sysVersion())); tResKeys.setValue(rr.relevant.get(0)); } // setCurResKey(keys.get(0)); // should be the <Base> uversionid inUpdate = false; }
static { ccTypeModel = new KeyedModel(); ccTypeModel.addItem(null, "<None>"); ccTypeModel.addItem("m", "Master Card"); ccTypeModel.addItem("v", "Visa"); }