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

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


  public void setAnimateOnShow(boolean animateOnShow) {
    if (animateOnShow) {
      remove("on-show");
    } else {
      BaseModel bm = new BaseModel();
      bm.set("type", "");
      set("on-show", bm);
    }
  }
View Full Code Here


    Collection ids = new ArrayList();
    List seleccionados = grid.getSelectionModel()
        .getSelectedItems();
    Iterator it = seleccionados.iterator();
    while (it.hasNext()) {
      BaseModel model = (BaseModel) it.next();
      ids.add(model.get(ParamsConst.ID));
    }
    Map params = new HashMap<String, String>();
    params.put(ParamsConst.IDS, ids);
    params.put(ServiceNameConst.SERVICIO, ServiceNameConst.DELETE_EVENT);
    DispatcherUtil.getDispatcher().execute(params,
View Full Code Here

   * @param key
   * @param value
   * @return
   */
  protected BaseModel getModelData(String key, String value) {
    BaseModel baseModel = new BaseModel();
    baseModel.set("key", key);
    baseModel.set("text", value);
    return baseModel;
  }
View Full Code Here

   * @param key
   * @param value
   * @return
   */
  protected BaseModel getModelData(String key, String value) {
    BaseModel baseModel = new BaseModel();
    baseModel.set("key", key);
    baseModel.set("text", value);
    return baseModel;
  }
View Full Code Here

   * @param key
   * @param valu
   * @return
   */
  protected BaseModel getModelData(String key, String value) {
    BaseModel baseModel = new BaseModel();
    baseModel.set("key", key);
    baseModel.set("text", value);
    return baseModel;
  }
View Full Code Here

      btnAddComment.setIcon(Resources.ICONS.addComment());
      btnAddComment.addSelectionListener(new SelectionListener<ButtonEvent>() {
        public void componentSelected(ButtonEvent be) {
          List seleccionados = grid.getSelectionModel().getSelectedItems();   
          if (seleccionados.size()==1){
            BaseModel baseModel = (BaseModel) seleccionados.iterator().next();
            Map actual = grid.search(ParamsConst.ID, baseModel.get(ParamsConst.ID));
           
            if ((Context.getInstance().getUsuario().get(ParamsConst.ID).equals(actual.get(ParamsConst.ID_USUARIO))) ||
                (!(Context.getInstance().getUsuario().get(ParamsConst.ID).equals(actual.get(ParamsConst.ID_USUARIO)))
                    && Context.getInstance().isAvaiable(PermissionsConst.COMENTARIOS_NO_ASIGNADOS))){
              //Context.getInstance().windowShow(new CommentWindows((Integer)actual.get(ParamsConst.ID), (String)actual.get(ParamsConst.NOMBRE_TAREA)));
View Full Code Here

    Collection ids = new ArrayList();
    List seleccionados = grid.getSelectionModel().getSelectedItems();
    Boolean validNoAsignada = Boolean.TRUE;
    Iterator it = seleccionados.iterator();
    while (it.hasNext()) {
      BaseModel model = (BaseModel) it.next();
      ids.add(model.get(ParamsConst.ID));
      if (validNoAsignada){
        validNoAsignada = ((Context.getInstance().getUsuario().get(ParamsConst.ID).equals(model.get(ParamsConst.ID_USUARIO))) ||
            (!(Context.getInstance().getUsuario().get(ParamsConst.ID).equals(model.get(ParamsConst.ID_USUARIO)))
                && Context.getInstance().isAvaiable(PermissionsConst.TAREAS_NO_ASIGNADAS)));
      } else {
        break;
      }
    }
View Full Code Here

    List seleccionados = grid.getSelectionModel().getSelectedItems();
    Map<Object,Object> actual = null;
    if (seleccionados.size() == 1) {
      Iterator it = seleccionados.iterator();
      if (it.hasNext()) {
        BaseModel model = (BaseModel) it.next();
        actual = grid.search(ParamsConst.ID, model.get(ParamsConst.ID));
      }
    }
    if ((Context.getInstance().getUsuario().get(ParamsConst.ID).equals(actual.get(ParamsConst.ID_USUARIO))) ||
      (!(Context.getInstance().getUsuario().get(ParamsConst.ID).equals(actual.get(ParamsConst.ID_USUARIO)))
          && Context.getInstance().isAvaiable(PermissionsConst.TAREAS_NO_ASIGNADAS))){
View Full Code Here

    ArrayList list = new ArrayList();
    Iterator itList = ((ListLoadResult) data).getData().iterator();
    while (itList.hasNext()) {
      Map actual = (Map) itList.next();
      ColumnModel model = ((Proxy)((Loader)this.getLoader()).getProxy()).getCallback().getGrid().getColumnModel();
      BaseModel baseModel = new BaseModel();
      List columns = model.getColumns();
      Iterator it = columns.iterator();
      while (it.hasNext()) {
        ColumnConfig columnConfig = (ColumnConfig) it.next();
        baseModel.set(columnConfig.getId(), actual.get(columnConfig.getId()));
      }
      list.add(baseModel);
    }
    return list;
  }
View Full Code Here

    grid.getSelectionModel().setSelection(selection);
  }

  public Integer getActual(Object object){
    if (object instanceof BaseModel) {
      BaseModel model = (BaseModel) object;
      return model.get(ParamsConst.ID);
    }
    return (Integer) object;
  }
View Full Code Here

TOP

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

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.