Announcement

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

    #16
    This is weird, I can't say you are wrong but this just doesn't work. There are many differences between the showcase example and this case:
    - I'm trying to use a DS derived from GwtRpcDataSource which uses:
    public GwtRpcDataSource () {
    setDataProtocol(DSProtocol.CLIENTCUSTOM);
    setDataFormat(DSDataFormat.CUSTOM);
    setClientOnly (false);
    }
    - btw, if I comment out setDataProtocol(DSProtocol.CLIENTCUSTOM) the exception doesn't show up but of course nothing is displayed in the TileGrid;
    - GwtRpcDataSource overrides transformRequest() and calls :
    response.setData(listGridRecords);
    processResponse(requestId, response);
    - must be a combination of the above conditions and the fact that i'm trying to feed a TileGrid using ListGridRecords;
    - again, exactly the same DS used with a ListGrid doesn't throw any error; this there's nothing about the TileGrid into the DS itself;
    - my TileGrid works fine with a client only xml based DS, so the tile grid seems ok too;
    - the same problem was reported by someone else on this thread
    At this point I'll have to find a different approach/workaround. I'll also post a report in to the GwtRpcDataSource thread maybe someone else has any idea.
    Thanks!

    Comment


      #17
      How to obtain seleted tile properties

      Can you please tell me how to obtain the selected tile index/id to use with removeTile()?

      Thanks

      Originally posted by Isomorphic
      clear() is totally unrelated to what you're doing (see the docs for that method).

      To remove tiles from a TileLayout, call removeTitle(). However, it seems that what you are basically doing is connecting a tiled view to a dataset, and for that, TileGrid is a better choice. TileGrid connects to a DataSource and automatically manages creation of tiles based on data.

      show()/hide() is all you need to show and hide.

      Comment


        #18
        It is possible

        This is possible, all you have to do is remove all references to ListGridRecord in the GWTRPCDataSource and replace it with Record, Also you will need to change the populateRecord implementation to return the Record (and abstract class).

        Next thing you have to do is in the populateRecord implementation ie: your data source class, you will need to cast your Record to what ever you want ie: ListGridRecord, TileRecord, TreeRecord, actually anything that implements the Record interface.

        ie:
        TileRecord r = TileRecord.getOrCreateRef(record.getJsObj());
        Hope this helps, anyone trying to do GWTRPCDataSource implementations.

        Please see attached the GWTRPCDataSource file for what to do with getting rid of references to ListGridRecord and changing it to Record.
        Attached Files

        Comment

        Working...
        X