How to set inner class list as aura attribute?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
2
down vote

favorite












I am in need of showing a list of records in a summarized format, say all records belonging to Type 1 are displayed first, followed by the records of Type 2, and so on.



Usually in visualforce page, the same is achieved using wrapper class. Now when I am doing the same in a lightning component, using the same approach of a wrapper class, I am finding it difficult to create an aura attribute of type wrapper class list. Can anyone please help?










share|improve this question



























    up vote
    2
    down vote

    favorite












    I am in need of showing a list of records in a summarized format, say all records belonging to Type 1 are displayed first, followed by the records of Type 2, and so on.



    Usually in visualforce page, the same is achieved using wrapper class. Now when I am doing the same in a lightning component, using the same approach of a wrapper class, I am finding it difficult to create an aura attribute of type wrapper class list. Can anyone please help?










    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I am in need of showing a list of records in a summarized format, say all records belonging to Type 1 are displayed first, followed by the records of Type 2, and so on.



      Usually in visualforce page, the same is achieved using wrapper class. Now when I am doing the same in a lightning component, using the same approach of a wrapper class, I am finding it difficult to create an aura attribute of type wrapper class list. Can anyone please help?










      share|improve this question













      I am in need of showing a list of records in a summarized format, say all records belonging to Type 1 are displayed first, followed by the records of Type 2, and so on.



      Usually in visualforce page, the same is achieved using wrapper class. Now when I am doing the same in a lightning component, using the same approach of a wrapper class, I am finding it difficult to create an aura attribute of type wrapper class list. Can anyone please help?







      lightning-components wrapper-class aura-attribute






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 5 hours ago









      Shobhit Saxena

      3862419




      3862419




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote













          If I read this right, you want to use an inner class on aura:attribute tag. You cannot use an inner class as an aura attribute, instead you need to handle it differently. If that's what you are looking for, refer to the below excerpt from documentation:




          Custom classes used for component attributes shouldn’t be inner classes or use inheritance. While these Apex language features might work in some situations, there are known issues, and their use is unsupported in all cases.







          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "459"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f233150%2fhow-to-set-inner-class-list-as-aura-attribute%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote













            If I read this right, you want to use an inner class on aura:attribute tag. You cannot use an inner class as an aura attribute, instead you need to handle it differently. If that's what you are looking for, refer to the below excerpt from documentation:




            Custom classes used for component attributes shouldn’t be inner classes or use inheritance. While these Apex language features might work in some situations, there are known issues, and their use is unsupported in all cases.







            share|improve this answer


























              up vote
              5
              down vote













              If I read this right, you want to use an inner class on aura:attribute tag. You cannot use an inner class as an aura attribute, instead you need to handle it differently. If that's what you are looking for, refer to the below excerpt from documentation:




              Custom classes used for component attributes shouldn’t be inner classes or use inheritance. While these Apex language features might work in some situations, there are known issues, and their use is unsupported in all cases.







              share|improve this answer
























                up vote
                5
                down vote










                up vote
                5
                down vote









                If I read this right, you want to use an inner class on aura:attribute tag. You cannot use an inner class as an aura attribute, instead you need to handle it differently. If that's what you are looking for, refer to the below excerpt from documentation:




                Custom classes used for component attributes shouldn’t be inner classes or use inheritance. While these Apex language features might work in some situations, there are known issues, and their use is unsupported in all cases.







                share|improve this answer














                If I read this right, you want to use an inner class on aura:attribute tag. You cannot use an inner class as an aura attribute, instead you need to handle it differently. If that's what you are looking for, refer to the below excerpt from documentation:




                Custom classes used for component attributes shouldn’t be inner classes or use inheritance. While these Apex language features might work in some situations, there are known issues, and their use is unsupported in all cases.








                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 hours ago

























                answered 4 hours ago









                Jayant Das

                6,5021320




                6,5021320



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f233150%2fhow-to-set-inner-class-list-as-aura-attribute%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                    Confectionery