Example #1
0
 public void findZoningCodeAll() {
   List<ZoningCode> zoningCodes = particularFac.findZoningCodeAll();
   if (zoningCodes != null) {
     List<ComboBoxString> comboBoxStrings = new ArrayList<ComboBoxString>();
     ComboBoxString comboBox = null;
     for (ZoningCode zoningCode : zoningCodes) {
       comboBox = new ComboBoxString();
       comboBox.setId(zoningCode.getCode());
       comboBox.setText(zoningCode.getName());
       if (getProjectBasicId() != null) {
         Boolean isEntity =
             particularFac.findZoningCodeSelected(getProjectBasicId(), zoningCode.getCode());
         if (isEntity) comboBox.setSelected(true);
       }
       comboBoxStrings.add(comboBox);
     }
     Struts2Util.renderJson(JSONUtil.toJSON(comboBoxStrings.toArray(new ComboBoxString[0])));
   }
 }