Package com.extjs.gxt.ui.client.data

Examples of com.extjs.gxt.ui.client.data.ModelData


        {
          int total = data.models.size();
          int online = 0;
          for(int index = 0;index<total;index++)
          {
            ModelData model = data.models.get(index);
            int statusValue = model.get(STATUSVALUE);
            if(statusValue != 0)
              online++;
          }
          return data.group+"("+online+"/"+total+")";
        }
View Full Code Here


   */
  protected void onMouseDown(GridEvent<ModelData> ge) {
    El el = ge.getTargetEl();
    if (el != null && el.hasStyleName("x-grid3-cc-" + getId()) && !el.hasStyleName("x-grid3-check-col-disabled")) {
      ge.stopEvent();
      ModelData m = ge.getModel();
      Record r = grid.getView().ds.getRecord(m);
      Boolean b = (Boolean) m.get(getDataIndex());
      r.set(getDataIndex(), b == null ? true : !b);
    }
  }
View Full Code Here

   
    fldType.addSelectionChangedListener(new SelectionChangedListener() {

          @Override
          public void selectionChanged(SelectionChangedEvent se) {
            ModelData modelData = se.getSelectedItem();
            if (modelData!=null){
              String key = modelData.get("key");
              setVisiblePanel(key);
            }
          }

        });
View Full Code Here

   * @param key
   */
  @SuppressWarnings("unchecked")
  protected void setCombo(ComboBox comboBox, String key) {
    ListStore<ModelData> listStore = comboBox.getStore();
    ModelData modelData = null;
    Iterator it = listStore.getModels().iterator();
    while (it.hasNext()) {
      ModelData mdAux = (ModelData) it.next();
      //Context.getInstance().addDetailExecution("Comparando " + key + " con " + mdAux.get("key"));
      if (key.trim().equals(mdAux.get("key").toString().trim())){
        modelData = mdAux;
        break;
      }
    }
    comboBox.setValue(modelData);
View Full Code Here

   * @param key
   */
  @SuppressWarnings({ "unchecked", "rawtypes" })
  protected void setCombo(ComboBox comboBox, String key) {
    ListStore<ModelData> listStore = comboBox.getStore();
    ModelData modelData = null;
    if (listStore!=null){
      Iterator it = listStore.getModels().iterator();
      while (it.hasNext()) {
        ModelData mdAux = (ModelData) it.next();
        Context.getInstance().addDetailExecution("Comparando " + key + " con " + mdAux.get("key"));
        if (key.equals(mdAux.get("key"))){
          modelData = mdAux;
        }
      }
    }
    comboBox.setValue(modelData);
View Full Code Here

      Iterator<ModelData> users = usersView.iterator();
      while (users.hasNext()) {
        String id = "";
        Object actualUser = users.next();
        if (actualUser instanceof ModelData) {
          ModelData modelData = (ModelData) actualUser;
          id = modelData.get("id");
        } else {
          id = (String) actualUser;
        }
        toSend.add(id);
      }
View Full Code Here

   */
  @SuppressWarnings({ "unchecked", "rawtypes" })
  protected void setCombo(ComboBox comboBox, String key) {
    if (key != null) {
      ListStore<ModelData> listStore = comboBox.getStore();
      ModelData modelData = null;
      if (listStore != null) {
        Iterator it = listStore.getModels().iterator();
        while (it.hasNext()) {
          ModelData mdAux = (ModelData) it.next();
          Context.getInstance().addDetailExecution(
              "Comparando " + key + " con " + mdAux.get("key"));
          if (key.equals(mdAux.get("key"))) {
            modelData = mdAux;
          }
        }
      }
      comboBox.setValue(modelData);
View Full Code Here

      Iterator<ModelData> users = usersView.iterator();
      while (users.hasNext()) {
        String id = "";
        Object actualUser = users.next();
        if (actualUser instanceof ModelData) {
          ModelData modelData = (ModelData) actualUser;
          id = modelData.get("id");
        } else {
          id = (String) actualUser;
        }
        toSend.add(id);
      }
View Full Code Here

   * @return
   */
  public ModelData searchModel(String field, Object value) {
    Iterator it = getStore().getModels().iterator();
    while (it.hasNext()) {
      ModelData actual = (ModelData) it.next();
      if (actual.get(field).equals(value)) {
        return actual;
      }
    }
    return null;
  }
View Full Code Here

    if (window.getSelecteds().size()<=0){
      Context.getInstance().addDetailExecution("TG - No hay seleccionados" );
    }
    while (it.hasNext()) {
      Integer actual = getActual(it.next());
      ModelData data = (ModelData)grid.searchModel(ParamsConst.ID, actual);
      if (data!=null){
        Context.getInstance().addDetailExecution("TG - Agregando " + data.get(ParamsConst.NAME));
        selection.add(data);

      } else {
        Context.getInstance().addDetailExecution("TG - No se encontro" + actual );
      }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.data.ModelData

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.