Announcement

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

    Data binding of a datasource with a TreeGrid and form items

    Hi,

    I've a form that is bound to data source and it works ok. The problem is that I've also TreeGrid (loads on demand) and its data source needs to send to the server several fields of the form every time a node is expanded (so that the server knows a bit of the context to send the information back to the user).

    So you get:
    - a DynamicForm A with a DataSource A
    - a TreeGrid B with a DataSource B but that also needs to send some fields of the DynamicForm A each time a node is expanded.

    In the Javadocs there is a method (setDefaultParams) that does just this for normal params. I'd need to bind components.

    Do you know if this is possible in a clean way

    Thanks in advance. Another way would be to use events to get the component values and send them somehow in the datasource, but I think this is my lack of knowledge of SmartGWT. There must be a cleaner way.

    Best regards,
    Juan

    #2
    One way to do this would be to pick up the properties in transformRequest.

    Comment


      #3
      Not only it was what I needed but it's a nice and clean solution.

      I had been dodging to touch the transformRequest / transformResponses methods due to the lack of documentation but once you see how they work it's really simple and clean.

      Thanks !

      Comment


        #4
        juan.medin,

        Like you say, I am trying to figure out how the transformRequest / transformResponses work. I am still a little confused due to the lack of documentation.
        Since you have done it, can you explain a little on how they work. or maybe post a little code snippet?

        Thanks,
        pggsb

        Comment

        Working...
        X