Announcement

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

    Splitting Fields into Tabs from *.ds.xml file

    Hi,

    I have a datasource as *.ds.xml file. Its a lot of fields, about 70. In a detail window I would like to show only a part of it and split them into tabs, for example 5 tabs from a tabset. But how can I do that? I would like to decide which of the fields come into which tab.

    The example from the showcase shows how to use valuesmanager but how to bind this to datasource?? The examples shows just to assign a datasource to a form and thats it. But in my case and a datasource with a bunch of fields I would like to decide which fields is used and in which tab. Is it possible to bind a single field or is there any simple solution? Not all fields from a datasource will be shown up in the detailwindow.
    And I also need a save so I think i have to use one form which includes all tabs, right?

    Thx in advance.

    I am evaluating the smartgwt framework.

    #2
    Hi,

    use one DynamicForm with some fields in every tab, set the DS in all DynamicForms to the same DataSource.get(...). Set ValuesManager in every DynamicForm. Call myValuesManager.fetch() and myValuesManager.save().

    Create all tabs and their content-panes on load. Lazy load on display would be possible, but it should be simpler this way.

    Best regards,
    Blama

    Comment


      #3
      Splitting Fields into Tabs from *.ds.xml file

      Thx Blama for the advice. I can load the values in different tabs but the save is not working. When I save with the save-Button the old values are loaded again and the changes arent store to database.
      Do I have to save each form separately? I tried:
      Code:
      // statusForm.setSaveOperationType(DSOperationType.UPDATE);
      // statusForm.saveData();
      // pvForm.setSaveOperationType(DSOperationType.UPDATE);
      // pvForm.saveData();
      vm.setSaveOperationType(DSOperationType.UPDATE);
      vm.saveData();
      statusForm and pvForm are 2 Forms from 2 Tabs. I needed to set the operationtype otherwise I got new records in database with only the new values. So I think I am close.

      Thx for any advice.


      Originally posted by Blama View Post
      Hi,

      use one DynamicForm with some fields in every tab, set the DS in all DynamicForms to the same DataSource.get(...). Set ValuesManager in every DynamicForm. Call myValuesManager.fetch() and myValuesManager.save().

      Create all tabs and their content-panes on load. Lazy load on display would be possible, but it should be simpler this way.

      Best regards,
      Blama

      Comment

      Working...
      X