I've implemented my own SerializableResponse class (practically a copy
of the one in TableModel)

Please, notice that I've added another List<R> list in this class
called rowObjects (the Response object has one called rowValues and
that's the one that is not being serialized, God knows why).



<pre>
public class GWTSerializableResponse<R extends Serializable> extends
Response<R> implements IsSerializable {
    /**
     * The 2D [EMAIL PROTECTED] Collection} of serializable cell data.
     */
    private Collection<Collection<Serializable>> rows;
    /*
    * I'm going to include this List here, identically to Response
Object... shoulnd be necessary,
    * If Response have one why should I implement my own?
    */
    private List<R> rowObjects;


    **
     * Default constructor.
     */
    public GWTSerializableResponse() {
      this(null);
    }

    /**
     * Constructor.
     *
     * @param rows the row data
     */
    public
GWTSerializableResponse(Collection<Collection<Serializable>> rows) {
      this(rows, null);
    }

    /**
     * Constructor.
     *
     * @param rows the row data
     * @param rowValues the values to associate with each row
     */
    public
GWTSerializableResponse(Collection<Collection<Serializable>> rows,
List<R> rowValues) {
      super(rowValues);
      this.rows = rows;
    }

    @Override
    public Iterator<Iterator<Object>> getIterator() {
      if (rows == null) {
        return null;
      }
      return new SerializableResponseIterator<Serializable>(rows);
    }

    public Long getTotalNumberOfElements() {
                return totalNumberOfElements;
        }

        public void setTotalNumberOfElements(Long totalNumberOfElements) {
                this.totalNumberOfElements = totalNumberOfElements;
        }

        public Integer getElementsPerPage() {
                return elementsPerPage;
        }

        public void setElementsPerPage(Integer elementsPerPage) {
                this.elementsPerPage = elementsPerPage;
        }




    public List<R> getRowObjects() {
                return rowObjects;
    }

    public void setRowObjects(List<R> rowObjects) {
                this.rowObjects = rowObjects;
    }
</pre>


The SerializableResponseIterator object is identical to the one in
TableModel.

Now, If from server i set rowValues (in the constructor) and
rowObjects (with the setter) with exactly the same list, Only
rowObjects is != null in the client.... this is very disturbing.
Obviously I'm doing something nasty but I can't see what!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to