Announcement

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

    Displaying nested form item

    I have an expanding row ListGrid with nested items that are DynamicForms, as shown in the SmartClient showcase.

    The main difference with the showcase is that I explicitly construct the form instead of letting the nested DS generate its layout for me. Ex.:

    Code:
            final DynamicForm docRepoForm = new TransactionBasicForm();
            docRepoForm.setGroupTitle("Document Repository");
    
            TextItem repoUuid = new TextItem("repouuid");
            repoUuid.setTitle("Repository Unique ID");
            repoUuid.setWidth(400);
    When I need to override the getExpansionComponent() function of the ListGrid in order to set the nested forms, I do not know which function I should use to display the nested form that matches the current record.

    Code:
           @Override
                protected Canvas getExpansionComponent(final ListGridRecord record) {
    
                    // create the nested widget (this is a layout of forms)
                    final SiteWidget siteWidget = new SiteWidget();
    
                    //HERE: how to fetch data related to the current record?
    
                    return siteWidget;
                }

    In other words, I am looking for the equivalent for a form of the fetchRelatedData() for a ListGrid. What should I use?


    Thank you.

    Using SmartGWT LGPL 5.0 in IE.

    #2
    Hi darkane,

    did you see that the signature of the overridden method is:
    Originally posted by darkane View Post
    Code:
           @Override
                protected Canvas getExpansionComponent([U][B]final ListGridRecord record[/B][/U])
    So you have the current ListGridRecord available.

    Best regards,
    Blama

    Comment


      #3
      Thanks for the suggestion. We're passing it on to the design team for comment.????



      ______________________________

      Try out our free learning spanish and latest comptia spanishprograms - help me learn spanish training courses to get high flying success in final and studyspanish exams
      Last edited by Abnahi3; 30 Mar 2015, 21:36.

      Comment


        #4
        Thank you for taking the time to answer.

        What I understand from the two previous answers is that there is no equivalent to the function ListGrid.fetchRelatedData() for a form, and that I should use the current Record to compare and find the related form data.

        Comment


          #5
          You will have to wait for Isomorphic to answer this. But please note that "Abnahi3" is most likely a spam bot.

          Comment


            #6
            I have since then implemented a function that uses the current ListGridRecord to find the related data in the form.

            I would still like to know what the best practice is on this and whether I was overlooking an existing function. If the SmartClient team can advise at some point, that would be great.

            Comment

            Working...
            X