Announcement

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

    Custom dataSource consumers

    I wonder whether it is possible to build customized datasource consumers, i.e. widgets that can use a smartclient datasource to populate themselves. The scenario is a Google map view which renders markers according to some data obtained from a server. So is this possible and how to do it/where to find examples/documentation?

    Thanks
    fatzopilot

    #2
    See the javadocs for the ResultSet class.

    Sanjiv

    Comment


      #3
      Let's say I want to somehow render the data that a fetch on the underlying ResultSet returns. What would be a reasonable approach?
      Adding a DataArrivedHandler or a DataChangedHandler and waiting for the callback to be invoked?
      How would I iterate the result set in this case? Calling ResultSet.duplicate() and then iterating the Record[] array?

      Thanks
      fatzopilot

      Comment


        #4
        Since I now purchased power, I am in the process of replacing my MVC based application logic with one that is based on datasources.
        What I clearly miss here is best practice information on how to create custom DataBoundComponents that work with datasources instead of a custom data model like with MVC, especially with regard to managing a synchronization of model (resultSet) and view (the component).
        As the DataBoundComponents that ship with SmartGWT do everything "natively" in JavaScript, it is opaque to me how this could be accomplished in the most efficient way.

        fatzopilot

        Comment


          #5
          You seem to already know - DataArrived, DataChanged on ResultSet. If you want help with a specific scenario or use case, lay out the scenario in detail.

          Comment


            #6
            Well, thanks, I just dislike to proceed in the wrong direction....

            Comment

            Working...
            X