Select to view content in your preferred language

TitleWindow popup from top menu

813
5
08-10-2010 12:21 AM
ManuelFrias
Regular Contributor
Hi,

I thought this would be fairly easy. From the main icons in the SFV banner the user can see the sub menus when rolling the mouse over them. Once the user clicks in one of the sub menus the widget opens.

What if I want instead to open a popup window? I tried with a TitleWindow but it doesn't work. I am afraid that it's the way is configured since the config.xml refers always to a widget.

Am I right?

Manolo
Tags (2)
0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Manolo,

   Yes you are right there is no support currently for anything besides Widgets, Links, Basemaps and NavTools.

   I think you could easily use link

<link label="Help" icon="com/esri/solutions/flexviewer/assets/images/icons/i_help.png" menu="menuHelp">openMyTitleWindow</link>

Then in the controlerMenuItem.mxml
case "link":
     
     {
      if(itemValue == "openMyTitleWindow"){
       //todo add code
      } else {
              navigateToURL(new URLRequest(itemValue));
                                                }
      break;
     }
0 Kudos
ManuelFrias
Regular Contributor
Thanks for the hint Robert,

your points as soon as they are available 🙂

Manolo
0 Kudos
ManuelFrias
Regular Contributor
Hi again,

Why do I get "1180: Call to a possibly undefined method AboutPouup." when I try this code in ControllerMenuItem.mxml?

case "link":
     {
      if (itemValue == "openTitleWindow")
      {
       var aboutPopup:AboutPopup = new AboutPouup
       PopUpManager.addPopUp(AboutPopup,this.parentApplication as DisplayObject,true);
       PopUpManager.centerPopUp(AboutPopup);
       
      }else{
      navigateToURL(new URLRequest(itemValue));
      }
      break;
     }


I created a TitleWindow with name AboutPopup so I don't understand why it doesn't find it. I have some of those popoups in my app and it's the first time I come across this problem.

Regards,
Manolo
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Manolo,

   if the AboutPouup is not part of the classicController folder than you have to import it using something like

import com.esri.viewer.AboutPopup;
0 Kudos
ManuelFrias
Regular Contributor
Thanks for your answer Robert,

AboutPopup was actually imported. The problem was a misspelling which I was so blind to spot yesterday.

Sometimes I think it's better to take a break before asking 🙂

Regards,
Manolo
0 Kudos