Package org.compiere.grid.ed

Examples of org.compiere.grid.ed.VEditor


      mField.setDisplayLength(FIELDLENGTH);
    else
      displayLength = 0;
   
    //  Editor
    VEditor editor = null;
    if (mField.isLookup())
    {
      VLookup vl = new VLookup(mField.getColumnName(), false, false, true,
        mField.getLookup());
      //setting mField to avoid NPE
      vl.setField(mField);

      vl.setName(mField.getColumnName());
      editor = vl;
    }
    else
    {
      editor = VEditorFactory.getEditor(mField, false);
      editor.setMandatory(false);
      editor.setReadWrite(true);
    }
    // Add action listener to custom text fields - teo_sarca [ 1709292 ]
    if (editor instanceof CTextField) {
      ((CTextField)editor).addActionListener(this);
    }
View Full Code Here


      m_query.addRestriction("UPPER(Description)", MQuery.LIKE, value, descriptionLabel.getText(), value);
    }
    //  Special Editors
    for (int i = 0; i < m_sEditors.size(); i++)
    {
      VEditor ved = (VEditor)m_sEditors.get(i);
      Object value = ved.getValue();
      if (value != null && value.toString().length() > 0)
      {
        String ColumnName = ((Component)ved).getName ();
        log.fine(ColumnName + "=" + value);
       
        // globalqss - Carlos Ruiz - 20060711
        // fix a bug with virtualColumn + isSelectionColumn not yielding results
        GridField field = getTargetMField(ColumnName);
        boolean isProductCategoryField = isProductCategoryField(field.getAD_Column_ID());
        String ColumnSQL = field.getColumnSQL(false);
        if (value.toString().indexOf('%') != -1)
          m_query.addRestriction(ColumnSQL, MQuery.LIKE, value, ColumnName, ved.getDisplay());
        else if (isProductCategoryField && value instanceof Integer)
          m_query.addRestriction(getSubCategoryWhereClause(((Integer) value).intValue()));
        else
          m_query.addRestriction(ColumnSQL, MQuery.EQUAL, value, ColumnName, ved.getDisplay());
        /*
        if (value.toString().indexOf('%') != -1)
          m_query.addRestriction(ColumnName, MQuery.LIKE, value, ColumnName, ved.getDisplay());
        else
          m_query.addRestriction(ColumnName, MQuery.EQUAL, value, ColumnName, ved.getDisplay());
View Full Code Here

TOP

Related Classes of org.compiere.grid.ed.VEditor

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.