Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Ideas on how to ignore validation on ListGrid records marked for removal

    Hi guys,

    I don't want to call saveAllEdits until after I've confirmed that the records that aren't marked for removal are all valid. However, the hasErrors method checks both normal and 'marked for removal' records. Any creative ideas on how to ignore those marked for removal? I'm having a hard time finding in the APIs a way to tell if a ListGridRecord is marked for removal, otherwise I would try overriding the hasErrors method and after calling super loop through the list and remove errors for those marked as removal.

    Thanks!
    -B

    #2
    Ok this is basically what I did, for anyone else who may need to do this.

    Code:
    @Override
    public Boolean hasErrors()
    {
        for (int i = 0; i < getRecords().length ; i++)
        {
            if (recordMarkedAsRemoved(i))  //ignore errors for rows that are to be deleted
            {
                clearRowErrors(i);
            }
        }
        
        return super.hasErrors();
    }

    Comment

    Working...
    X