Package org.jeecgframework.core.common.model.json

Examples of org.jeecgframework.core.common.model.json.ComboBox


    }
    return EVAL_PAGE;
  }
  public StringBuffer end() {
    StringBuffer sb = new StringBuffer();
    ComboBox comboBox=new ComboBox();
    comboBox.setText(text);
    comboBox.setId(id);
    sb.append("<script type=\"text/javascript\">"
        +"$(function() {"
        +"$(\'#"+name+"\').combobox({"
        +"url:\'"+url+"&id="+id+"&text="+text+"\',"
        +"editable:\'false\',"
View Full Code Here


  public static List<ComboBox> getComboBox(List all, List in, ComboBox comboBox) {
    List<ComboBox> comboxBoxs = new ArrayList<ComboBox>();
    String[] fields = new String[] { comboBox.getId(), comboBox.getText() };
    Object[] values = new Object[fields.length];
    for (Object node : all) {
      ComboBox box = new ComboBox();
      ReflectHelper reflectHelper=new ReflectHelper(node);
      for (int i = 0; i < fields.length; i++) {
        String fieldName = fields[i].toString();
        values[i] = reflectHelper.getMethodValue(fieldName);
      }
      box.setId(values[0].toString());
      box.setText(values[1].toString());
      if (in != null) {
        for (Object node1 : in) {
          ReflectHelper reflectHelper2=new ReflectHelper(node);
          if (node1 != null) {
            String fieldName = fields[0].toString();
            String  test = reflectHelper2.getMethodValue(fieldName).toString();
            if (values[0].toString().equals(test)) {
              box.setSelected(true);
            }
          }
        }
      }
      comboxBoxs.add(box);
View Full Code Here

  public static List<ComboBox> getComboBox(List<TSRole> list, List<TSRole> roles) {
    StringBuffer buffer = new StringBuffer();
    List<ComboBox> comboxBoxs = new ArrayList<ComboBox>();
    buffer.append("[");
    for (TSRole node : list) {
      ComboBox box = new ComboBox();
      box.setId(node.getId().toString());
      box.setText(node.getRoleName());
      if (roles.size() > 0) {
        for (TSRole node1 : roles) {
          if (node.getId() == node1.getId()) {
            box.setSelected(true);
          }
        }
      }
      comboxBoxs.add(box);
    }
View Full Code Here

TOP

Related Classes of org.jeecgframework.core.common.model.json.ComboBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.