Suppose you have a custom SearchComponent that wants to muck with the response built prior? You can replace values in a NamedList, but you can't remove them. Any reason we can't add this to NamedList?

 /**
  * Removes the name/value pair at the specified index.
  * @return the value at the index removed
  */
 public T remove(int idx) {
   int index = (idx<<1);
   nvPairs.remove(index);
return (T)nvPairs.remove(index); // same index, as things shifted in previous remove
 }

It brings up an interesting philosophical question - should a SearchComponent even be allowed to muck with the response at all, other than adding to it? But for now I'm fine with letting components do what they want with the response.

        Erik

Reply via email to