Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7437603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:25:32+00:00 2026-05-29T10:25:32+00:00

I have a rally.sdk.ui.basic.Dropdown menu in a Rally App that I would like to

  • 0

I have a rally.sdk.ui.basic.Dropdown menu in a Rally App that I would like to change based on user input. So I will call display() on the dropdown menu, and then later I want to change the contents of that menu.

Has anybody done this? When I try, it crashes. I’ve also tried calling destroy() on the dropdown menu and then calling display() on a new menu that I allocate, but that crashes as well with an obscure dojo error.

Any suggestions on how to change dropdown menus on the fly?

I’ve included a very stripped down example below of trying to destroy and then re-display the menu:

<html>
  <head>
    <title>Incoming Defects by Severity</title>
    <meta http-equiv="X-UA-Compatible" content="IE=7" >
    <meta name="Name"    content="Defects by Severity" />

    <script type="text/javascript" src="https://rally1.rallydev.com/apps/1.29/sdk.js"></script>

    <script type="text/javascript">
        function DefectChart() {
            this.display = function() {
                var defectVersionDropdown;
                var count = 1;

                function makeDefectChart(results){
                    initDefectVersionDropdown();
                };

                function renderPage() {
                    var queryConfig = [];
                    var startDate   = '2011-06-06';
                    var endDate     = '2012-02-02';
                    var queryArray  = ['CreatedDate >= "' + startDate + '"', 'CreatedDate <= "' + endDate + '"'];
                    var versionFilter       = defectVersionDropdown ? defectVersionDropdown.getDisplayedValue() : 'ALL';
                        if (versionFilter != 'ALL') {
                            queryArray.push('FoundInBuild contains "' + versionFilter + '"');
                        }   
// console.log(queryArray);
                    queryConfig.push({
                        type : 'Defects',
                        key  : 'defects',
                        query:  rally.sdk.util.Query.and(queryArray),
                        fetch: 'Severity,State,LastUpdateDate,CreationDate,OpenedDate,AcceptedDate,LastUpdateDate,ClosedDate,Environment,FoundInBuild'
                    });

                    rallyDataSource.findAll(queryConfig, makeDefectChart);
                }

                function defectVersionChange(sender, eventArgs) {
                    var version = eventArgs.value;

                    renderPage();
                }

                function initDefectVersionDropdown() {
                    if (defectVersionDropdown != null) {
                        defectVersionDropdown.destroy();
                        defectVersionDropdown = null;
                    }

                    if (defectVersionDropdown == null) {
                  console.log('initDefectVersionDropdown'); 
                        count++;
                        var menuItems   = [{label: "ALL", value: "ALL"}];
                            for (var i=0; i < count; i++) {
                                menuItems.push({label: count, value: count});
                            }
                        var config  = {
                                label:  "Found In Version:",
                                items:  menuItems
                             };

                        defectVersionDropdown   = new rally.sdk.ui.basic.Dropdown(config);

                        defectVersionDropdown.addEventListener("onChange", defectVersionChange);
                        defectVersionDropdown.display("defectVersionDiv");
                    }
                }

                var workspaceOid    = '__WORKSPACE_OID__';  if (workspaceOid.toString().match(/__/))    { workspaceOid  = XXX; }
                var projectOid      = '__PROJECT_OID__';    if (projectOid.toString().match(/__/))      { projectOid    = XXX; }

                rallyDataSource = new rally.sdk.data.RallyDataSource(   workspaceOid,
                                                                        projectOid,
                                                                        '__PROJECT_SCOPING_UP__',
                                                                        '__PROJECT_SCOPING_DOWN__');
                initDefectVersionDropdown();
                renderPage();
            }
        }

        function getDataAndShow() {
            var defectChart = new DefectChart();

            defectChart.display();
        }

        function loadRally() {
            rally.addOnLoad(getDataAndShow);
        }

        loadRally();
    </script>
  </head>
  <body>
    <div id="defectVersionDiv"></div>
  </body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:25:33+00:00Added an answer on May 29, 2026 at 10:25 am

    Destroying the old one creating and displaying a new one is the correct way to do this. This is a common pattern when developing apps using the App SDK. If you provide a code snipped along with the dojo error you are getting the community can probably be of better assistance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a client who would like the app we are building to show
I have really basic question. How can I get form id by input element
While I'm developing Android-Apps I like to have a look at internal SDK implementations.
(iPhone SDK 3.x:) I have a UIControl subclass that creates a different number of
I have written a game in Flash (AS3/Flex SDK/MXMLC) that streams music and sound
I have a simple app I coded for android that I want to go
I have a 3D TV and feel that I would be shirking my responsibilities
I have been playing around with my phonegap app in eclipse using android sdk
I have developed a CakePHP application that does basic CRUD on a series of
I have a project that uses the Google AdMob Ads SDK. I'm trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.