Menubar load modules for each sub-menu

I am creating an application using the MENUBAR but cannot get a module to open when a sub-menu is clicked. I have stripped my app down to bare bones to eliminate other factors. The menubar has several main options, such as, Button1, Button2, Button3 and then each has a sub-menu dropdown. If Button1 has Button1Sub1 and Button1Sub2 dropdowns I want to have a different module launch when either of the sub-menus are clicked.
I have been successful in using ModuleManager to open a particular module referencing the creationComplete="moduleLoadHandler()" but not by selecting a menu item from the menubar. My application needs to be as user-friendly and Windows-like as possible. There are many different modules which need to be loaded and unloaded.
I have attached a screenshot image of my project tree and circled the ActionModule.swf file to show its location.
I have attached my code below:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="creationHandler();" >
    <mx:Script>
        <![CDATA[
            import mx.controls.menuClasses.IMenuBarItemRenderer;
            import mx.controls.MenuBar;
            import mx.controls.menuClasses.MenuBarItem;
            import mx.controls.Alert;
import mx.modules.Module;
import mx.events.ModuleEvent;
import mx.modules.ModuleManager;
import mx.modules.IModuleInfo;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.events.FlexEvent;
import mx.events.MenuEvent;
            import mx.collections.*;
            public var _moduleInfo:IModuleInfo;
            [Bindable]
            public var menuBarCollection:XMLListCollection;
            private var menubarXML:XMLList =
                <>
                    <menuitem label="Menu1" data="top">
                        <menuitem label="MenuItem 1-A" data="1A" itemClick="moduleLoadHandler()"/>
                        <menuitem label="MenuItem 1-B" data="1B"/>
                    </menuitem>
                    <menuitem label="Menu2" data="top">
                        <menuitem label="MenuItem 2-A" type="check"  data="2A"/>
                        <menuitem type="separator"/>
                        <menuitem label="MenuItem 2-B" >
                            <menuitem label="SubMenuItem 3-A" type="radio"
                                groupName="one" data="3A"/>
                            <menuitem label="SubMenuItem 3-B" type="radio"
                                groupName="one" data="3B"/>
                        </menuitem>
                    </menuitem>
                    <menuitem label="Menu3" data="top">
                        <menuitem label="MenuItem 3-A" data="3A"/>
                        <menuitem label="MenuItem 3-B" data="3B"/>
                    </menuitem>
                    <menuitem label="Menu4" data="top">
                        <menuitem label="MenuItem 4-A" data="4A"/>
                        <menuitem label="MenuItem 4-B" data="4B"/>
                    </menuitem>                                       
                </>;
            private function creationHandler():void{
menuBarCollection = new XMLListCollection(menubarXML);
private function moduleLoadHandler(event:ModuleEvent ):void{
canvas.addChild( _moduleInfo.factory.create() as Module );
_moduleInfo = ModuleManager.getModule('ActionModule.swf');
_moduleInfo.addEventListener(ModuleEvent.READY, moduleLoadHandler);
_moduleInfo.load();
            // Event handler for the MenuBar control's itemClick event.
            private function menuHandler(event:MenuEvent):void  {
                // Don't open the Alert for a menu bar item that
                // opens a popup submenu.
                //if (event.item.@data != "top") {
                //    Alert.show("Label: " + event.item.@label + "\n" +
                //        "Data: " + event.item.@data, "Clicked menu item");
            private function onTopSelection(event:MenuEvent):void{
                var mb:MenuBar=event.target as MenuBar;
                var selectedIndex:int=mb.selectedIndex;
                for (var i:int=0;i<mb.menuBarItems.length;i++){
                    if(i==selectedIndex){
                        (mb.menuBarItems[i] as MenuBarItem).setStyle("fontWeight","bold");                   
                    else{
                        (mb.menuBarItems[i] as MenuBarItem).setStyle("fontWeight","normal");                           
         ]]>
    </mx:Script>
    <mx:Canvas id="canvas" height="75%" width="75%"
        paddingTop="10" paddingLeft="10">
        <mx:MenuBar labelField="@label" itemClick="menuHandler(event);" dataProvider="{menuBarCollection}" change="onTopSelection(event)" />
    </mx:Canvas>
</mx:Application>

Hi,
   I am also doing the same way, but ended up with some issues.
I have a Main Application with a menu Bar on Top and Rest of the area occupied by a ModuleLoader.
First I set the URL to login module, on successful login I initialize my menu Bar based on User role and load a new module, it contains only a SuperTabNavigator.
On click of an item in my Application Menu, I add a Custom Componenet built on Canvas (Named MyCanMod , this contains a Module loader and a progress bar in it , I have attached the code) as a tab to the tab navigator.
On menu item click, I take the data of my menu item and set that as the URL of my Module Loader inside the Custom canvas. Then it is added as a tab to my tab navigator.
      private function openItem(event:MenuEvent):void
var myModule:MyCanMod = new MyCanMod();                tabNav.addChild(myModule);
                tabNav.selectedChild = myModule;
                myModule.label = event.item.@label;
                myModule.icon = document_icon;
                myModule.urlParam = event.item.@module;
urlParam is a bined to the module Loader url in my Custom componenet.
All works fine.  I am not unloading any modules and all the module loader are set to current domain.
When the user logs out and logs back with out refreshing the browser I get Type Error or some time null Object error and it is random. If I refresh the browser and login back, every thing is fine.
I do have reference for IDragManager,HistoryManager,PopUpManager,RemoteObject in main application.
I am not concerned about unloading modules now, but then on Tab close event I unloaded the module, and that did not solve the problem.
I get an error like
TypeError: Error #1034: Type Coercion failed: cannot convert flexlib.controls::PromptingTextInput@6152a851 to flexlib.controls.PromptingTextInput.
            at mx.core::UIComponent/createReferenceOnParentDocument()
            at mx.core::Container/createComponentFromDescriptor()
            at mx.core::Container/createComponentsFromDescriptors()
            at mx.core::Container/createChildren()
            at mx.core::UIComponent/initialize()
            at mx.core::Container/initialize()
            at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
            at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
            at mx.core::Container/addChildAt()
            at mx.core::Container/addChild()
Any help is appreciated; I am really struck with it, please help.

Similar Messages

  • Need separate duplicate JMS modules for each server?

    Using WebLogic 9.2.2 on AIX 5.3.
    I'm trying to set up a domain with 6 managed servers. I need to deploy several JMS queues and a foreign server to each JMSServer on each server. I looked at the JMSModule object, and I'm trying to determine whether it's possible to define a single JMSModule that I can deploy to all of my servers. So far, this doesn't appear to be possible. As a result, I have to do tons of painful cut/paste inside the console. Is this how it's supposed to work?

    David,
    Sorry, if I was not clear earlier.
    A Module can be targeted to a single Cluster, one or more comma separated list of WLS servers and the servers don't have to be part of a cluster (note that certain resources such as UDD or CF that can be targeted to an entire cluster, cannot be done so, if the module is not targeted to the cluster. And to achieve the same, the user has to manually add/remove the managed servers to the list of Module's/sub-deployment's targets whenever a server is added or removed to/from the cluster/domain).
    So, in your case, you can define all the JMS resources for that domain in a single Module descriptor and deploy it to a list of all the managed servers. Then you can use the sub-deployments to group and target them onto other related targets (for example, one or more queues can be grouped as a sub-deployment and targeted to a single JMSServer that is hosted by one of the WLS server instance, where the Module is currently targeted to, etc).
    I believe you are creating/using a "system resource" type module via Admin console, the JMSModules wizard shall walk you through the targeting page, where you can see all the available target servers/clusters.
    Here is an example of config.xml snippet for this kind of module targeting :
    <jms-system-resource>
    <name>SystemModule-0</name>
    <target>Server-0,Server-1</target>
    <sub-deployment>
    <name>ConnectionFactory-0</name>
    <target>Server-0,Server-1</target>
    </sub-deployment>
    <sub-deployment>
    <name>Queues</name>
    <target>JMSServer-0</target>
    </sub-deployment>
    <descriptor-file-name>jms/systemmodule-0-jms.xml</descriptor-file-name>
    </jms-system-resource>
    and the corresponding JMS module descriptor file snippet (can be found under DOMAIN_DIR/config/jms dir) as shown below:
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-jms xmlns="http://www.bea.com/ns/weblogic/weblogic-jms" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:wls
    ="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/
    /www.bea.com/ns/weblogic/weblogic-jms http://www.bea.com/ns/weblogic/weblogic-jms/1.0/weblogic-jms.xsd">
    <connection-factory name="ConnectionFactory-0">
    <sub-deployment-name>ConnectionFactory-0</sub-deployment-name>
    <jndi-name>ConnectionFactory-0</jndi-name>
    <security-params>
    <attach-jmsx-user-id>false</attach-jmsx-user-id>
    </security-params>
    </connection-factory>
    <queue name="Queue-0">
    <sub-deployment-name>Queues</sub-deployment-name>
    <jndi-name>Queue-0</jndi-name>
    </queue>
    </weblogic-jms>
    That being said, depending on, how many resources (factories, destinations etc) you are having and how you are going to group them, you may end of with too many sub-deployments within a single module, for which you need to carefully select targets/manage them.
    Both approaches (one module descriptor with many sub-deployments and many module descriptors with fewer sub deployments) have positives and negatives, when its comes to manageability. The recommended best practice is to have the JMS resource configuration split into more than one module with fewer number of sub-deployments within each, to have finer control over the resource configuration/management.
    Sounds like, you are trying to configure one queue on every managed server, that has duplicate(same) configuration properties. If that is the case, you can try using the UDD (Uniform Distributed Destination), that comes with automatic member (physical destination) management on all of its targets. That way, all you need is one UDD resource configuration/sub-deployment in the module and target the sub-deployment to the same targets as the module's targets (or accept the default targeting option, if available in the resource targeting page).
    More information on UDDs can be found here:
    http://edocs.bea.com/wls/docs100/jms/dds.html#wp1313025
    Hope this helps.
    Thanks
    Kats

  • Load Options for Edit Sub Step

    Hi Ppl,
    I have created a custom step type which has a edit sub step with LabVIEW adapter. When invoke the edit sub step for the first time, it takes a while to load the edit sub step and there is a noticebale delay for the first time. I want the edit sub step module to be loaded when TestStand is open or when the sequence file is open. I was not able to locate any location where we can specify the load and unload options of the edit sub step. Is there any way to do this ?
    Thanks,
    Sathish

    This is probably because of the launching of LabVIEW development system.
    Have you tried setting the Load option for the SequenceFile to 'Preload when opening sequence file'
    Regards
    Ray Farmer

  • Kernel won't load module for Epson Stylus CX4200

    Hi,
    I'm having an odd problem trying to set my printer up. I've blacklisted usblp but when I plug the printer in as suggested by the wiki, I get the following output from /var/log/messages.log:
    Oct 29 14:33:46 acer232 kernel: usb 1-5: new high speed USB device using ehci_hcd and address 10
    Oct 29 14:33:46 acer232 kernel: usb 1-5: configuration #1 chosen from 1 choice
    Oct 29 14:33:46 acer232 load-modules.sh: 'usb:v04B8p0820d0100dc00dsc00dp00icFFiscFFipFF' is not a valid module or alias name
    Oct 29 14:33:46 acer232 load-modules.sh: Not loading module 'usblp' for alias 'usb:v04B8p0820d0100dc00dsc00dp00ic07isc01ip02' because it is blacklisted
    I have cups 1.4.1-1, ghostscript 8.70-2, and gsfonts 8.11-5 installed. Cups starts as a daemon and I can get access to the web interface at http://localhost:631/ but the printer does not appear there.
    When I run lsusb the scanner component is displayed but not the printer:
    Bus 001 Device 010: ID 04b8:0820 Seiko Epson Corp. CX4200 MP scanner
    I tried putting in a custom udev rule to give lp ownership over the scanner but that isn't changing any of the output above and cups still won't recognize the printer.
    Does anyone have any ideas on how I can fix this? Thanks!

    It turns out if you delete the /etc/cups/printers.conf file, you can then use the cups web interface at localhost:631 to add the printer again and everything works with cups 1.4.

  • LDT FILE GENERATION FOR SPECIFIC SUB MENU OF MENU

    Hi,
    I am creating a ldt file for menu using below script.
    $FND_TOP/bin/FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct ICX_POR_SSP_HOME.ldt MENU MENU_NAME="ICX_POR_SSP_HOME"
    It's working fine. If 10 submenus are attached to the menu, it will generate ldt file for all submenus using above script.
    My requirement is, i want to generate LDT only for some specific subemenus for that menu.
    Is there any script or any other alternate solution for this.
    It's very urgent, kindly help me at the earliest.
    Thanks in advance.

    Hi,
    Could anybody please help. It's very urgent.
    Thanks.

  • Loading modules for old kernel during boot up

    Hello
    After a kernel update I noticed this message during boot
    Usage: modprobe [-v] [-V] [-C config-file] [-d <dirname> ] [-n] [-i] [-q] [-b] [-o <modname>] [ --dump-modversions ] <modname> [parameters...]
    modprobe -r [-n] [-i] [-v] <modulename> ...
    modprobe -l -t <dirname> [ -a <modulename> ...]
    And taking a look at everything.log this came out
    May 24 13:57:54 localhost kernel: Pid: 1772, comm: modprobe Tainted: G         C  2.6.37-ARCH #1
    May 24 14:31:25 localhost kernel: Pid: 1952, comm: modprobe Tainted: G         C  2.6.37-ARCH #1
    May 24 14:34:45 localhost kernel: Pid: 1872, comm: modprobe Tainted: G         C  2.6.37-ARCH #1
    May 24 14:54:53 localhost kernel: Pid: 1966, comm: modprobe Tainted: G         C  2.6.37-ARCH #1
    May 24 15:14:03 localhost modprobe: FATAL: Could not load /lib/modules/2.6.37-ARCH/modules.dep: No such file or directory
    Jun 13 13:34:20 localhost modprobe: FATAL: Could not load /lib/modules/2.6.38-ARCH/modules.dep: No such file or directory
    I am using 2.6.39 kernel.
    Could anybody help me solve this??

    slytux wrote:
    Samana, what does your error message say?  Do you have anything in /lib/modules/2.6.39-ARCH/misc/ ?
    You can also try rebuilding the initrd image as jni suggested.
    mkinitcpio -p kernel26
    I have no "misc" folder in 2.6.39-ARCH
    The error is like a resonse from bad syntax when running a modprobe command
    Usage: modprobe [-v] [-V] [-C config-file] [-d <dirname> ] [-n] [-i] [-q] [-b] [-o <modname>] [ --dump-modversions ] <modname> [parameters...]
    modprobe -r [-n] [-i] [-v] <modulename> ...
    modprobe -l -t <dirname> [ -a <modulename> ...]
    I rebuilt the image and got a few errors in autodetect that might be a clue.
    # mkinitcpio -p kernel26
    ==> Building image "default"
    ==> Running command: /sbin/mkinitcpio -k 2.6.39-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
    :: Begin build
    :: Parsing hook [base]
    :: Parsing hook [udev]
    :: Parsing hook [autodetect]
    WARNING: All config files need .conf: /etc/modprobe.d/oldusbload, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/oldusbload, it will be ignored in a future release.
    :: Parsing hook [pata]
    :: Parsing hook [scsi]
    :: Parsing hook [sata]
    :: Parsing hook [filesystems]
    :: Generating module dependencies
    :: Generating image '/boot/kernel26.img'
    :: Image generation successful
    ==> SUCCESS
    ==> Building image "fallback"
    ==> Running command: /sbin/mkinitcpio -k 2.6.39-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect
    :: Begin build
    :: Parsing hook [base]
    :: Parsing hook [udev]
    :: Parsing hook [pata]
    :: Parsing hook [scsi]
    :: Parsing hook [sata]
    :: Parsing hook [filesystems]
    :: Generating module dependencies
    :: Generating image '/boot/kernel26-fallback.img'
    :: Image generation successful
    ==> SUCCESS
    Note that the error does not show up when I boot in fallback mode. So it looks like the error has something to do with autodetect. But I have no idea what it is. I am going to try to get rid of the oldusbload and see what happens. [NOTE: Getting rid of oldusbload did n
    ot fix the error]
    Last edited by Samana (2011-07-09 17:46:02)

  • Next to the mozilla icon in the startmeny is an arrow for a sub menu how do I get rid of this annoying submenu with irrelevant things?

    It is so freakin annoying. I will never want this shortcut to do anything but start a new browser.

    Make sure that Firefox gets installed properly.<br />
    Open the DMG file and drag to Firefox program to the application folder on your hard drive.<br />
    You shouldn't double-click the Firefox application to run it from the disk image, but drag it out of the DMG folder instead.
    * [[Installing Firefox on Mac]]
    * http://kb.mozillazine.org/Installing_Firefox#Mac_OS_X

  • Cursor selection does not follow chapter order on sub-menu

    I used iMovieHD6 to add chapter markers to my large DVD project. They "shared" very nicely into iDVD8 and the Chapter Selection sub-menus were created nicely.
    The problem is that when I use the cursor arrows on the DVD remote (real or virtual, in or out of iDVD), the highlight jumps around the sub-menu items rather than moving in a logical order. For example, I have 4 sub-menus with 6 chapters in each. Let's use numbers for them starting with the upper left they are 1,2,3 and then at the lower left they begin 4,5,6. I am using the Reflection White theme. When I press the right remote cursor button it will move from 1 to 2 to 5 to 6 to 3 to 4 and back to 1. Note that this order is not the same for each sub-menu, but none of them go 1,2,3,4,5,6.
    I don't know what might be wrong or how to correct it, but I have a really big project that is otherwise perfect and I'd really like to get it out, please help!
    Thanks.

    I just wanted to add this before closing this topic.
    After poking around with the Reflection theme I better understood what Len was talking about. It appears that there are no modifiable parameters in the theme itself that control the order of cursor's motion through the buttons. That I assume is hard-coded into iDVD and follows a pre-programmed logic.
    The point of failure is the position and orientation of the buttons in the Reflection theme's sub-menus when added automatically. They are made to look to the viewer as though they are set on an angled surface and viewed at an angle from above. While our brains can process this effect nicely, iDVD's cursor logic doesn't fare as well.
    The work-around is fairly simple: Realizing that iDVD treats all chapter buttons as though they are two-dimensional objects on a flat surface, you must re-arrange them so that from top-left to bottom-right they follow a logical order, with the first buttons higher and farther left than the later-selected buttons. You don't have to move them very far to get the desired result and it doesn't have to affect the overall appearance of the menu in a noticeable way.
    A slight rearrangement in my case left the overall look of the chapter menu the same but yielded a zig-zag flow through the buttons as follows:
    [1] [3] [5]
    [2] [4] [6]
    Pressing the right cursor key jumps from top left to bottom left to top center then bottom center then top right and finally bottom right before going back to the start. Granted this is not quite "right" in that if iDVD could "see" the menu the way my brain does it would go left to right across the upper row of buttons rather than zig-zagging, but I figure that as long as the user can understand how to get to the button they want it'll be fine.
    If you really need your menu selection to move linearly left to right with those arrows and with the up/down arrow used to move it vertically, then you have to arrange the buttons on the menu in a rectangular pattern with the top of each row of buttons all in a nice horizontal line. Note that's not the same as the alignment line that Reflection provides for you, it's a true horizontal line in relation to the monitor screen.
    I'd much prefer that iDVD revisit the logic of the cursor control code, perhaps adding the choice of allowing the numerical sequence of the chapters to dictate the order of the cursor's motion rather than their relative position on the screen, but since they don't call me for advice, the above will likely have to do.

  • How to activate a different sub-report for each row in the data set as main report page breaks on each row of data in the main dataset

    I am going to try asking this same question a different way as I have yet to find a working solution to my problem.  I have a main report and then 8 sub reports.  My main report has one data set and returns one row of data per account number.  One
    of the fields in the main data set is called AccountProf.  My main report displays one page per Account number and then calls a different sub report based on that account's AccountProf value.  The sub reports take in the account number as a parameter
    and get multiple rows of data to display that accounts usage formatted differntly for each AccountProf (hence the 8 different sub report.  
    So far I can figure out how to do everything but setting the visibility property of each sub-reports when I have multiple accounts.  If I use the following expression for the visibility property on each sub report, it makes all the applicable sub report
    for all the accounts requested visible at once:
    =IIF(Fields!AccountProf.Value= "USE_PLUS_DMD",False,True)
    *The value in bold USE_PLUS_DMD  is different for each sub report.
    Here is a look at what the main report look like:
    Here is the main reports data set:

    Hi JasonDWilson77,
    According to your description, there is a main report and 8 sub reports in the report, you want to set visibility of sub reports, if no value is passed to the parameter of sub report, the sub report will not be displayed. If that is the case, please refer
    to the following steps:
      1. Create a new parameter named NewAccountNumber, set its data type the same as @AccountNumber, select Allow multiple values, set Visibility to be hidden, then set all available values to default values.
      2. Right-click the first sub report and open Subreport Properties dialog box, click Parameters in left pane, set name to AccountNumber, then click (fx) button, type the expression like below:
    =Parameters! NewAccountNumber(0)
      3. Click Visibility in left pane, select Show or hide based on an expression, then click (fx) button and type the expression like below:
    =IIF(InStr(Join(Parameters! AccountNumber.Value), Parameters!NewAccountNumber.Value(0))>0 , false,true)
      4. Modify parameter of other sub reports like step2.
      5. Set visibility of other sub reports like step3.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • RE: Have a Menu that needs sub menu for submenus...

    I do not know if this is the right forum for this.
    However here goes.
    I have a Flash Menu that I am working with using Action
    Script 2.0 inf Flash CS3. I have successfully created the Main menu
    and the sub menu, however I need a sub sub menu for the sub menu to
    operate the same way the sub menu does for the main menu.
    I do not even know where to begin doing this.
    I have attached the .fla CS3 file. maybe someone can help me
    do this or point me in the right direction possibly???
    thank you Adobe members and to anyone who can help with this.
    If this requires some kind of payment. it's not a problem I can do
    that via paypal acct or send a check or wire the money.
    I just really need to get this done for a client ASAP.
    note: I will send the file if anyone is interested via
    trillian, ftp or email or some other viable form of digital
    communicatiion.
    thanks again,
    Dan

    Hello,
    You need to use p_body_html then construct an html email to be sent to feed into that (you also need to provide the p_body for email clients that don't support html)
    To get give a link to the specfic item you want you need to use something like:
    'http://your.server/pls/apex/f?p=100:1:::NO::P1_ITEM_ID:'||ITEM_ID
    Where 100 is you app id, 1 is your page number, P1_ITEM_ID is the item that sets your primary key for the page and ITEM_ID is the primary key of the item you want to display.
    Hope this helps
    Luke
    Message was edited by:
    LWhitelock

  • Sub-menu creation for Chapters

    Hi,
    I have made a film and I have added chapters to the film using the software SimpleMovieX. When I tried to add the film to an iDVD project the chapters of the film do know show in iDVD. Nor does iDVD automatically create a sub-menu for the chapters. I have ensured that the box is checked for 'chapter sub-menu'.
    I was wondering if it something do with the fact I created the chapters with SimpleMovieX. I was wondering if I should re-save the movie through Quicktime or 'something'.
    Thanks,
    Martin

    Where did you create this film? If in iMovie, you add chapter markers there. Ifd you export out of iMovie as a QuickTime Full Quality, it will remove the chapter markers. You have to Send to iDVD to preserve them, or drag the iMovie project file into a new iDVD project.

  • Dynamically loading values for jump menu

    Hii all,
    I'm using struts for my web application.
    I have two jump menus in one of my jsp page. The collections need to fill two menus have been loaded to the page.
    I need to fill the second menu according to the id of selection of first menu. i was able to load values for the first menu.
    can anybody tell me how can I pass the selected value of first menu to second menu using javascript or struts?
    Thanks

    What you can do is generate javascript that looks likeif (selectedID == 1) {
        return ['option a', 'option b'];
    } else if (selectedID == 2) {
        return ['option 'c', 'option d'];
    }and use that from a different function (which gets invoked if your first level menu changes). The generation would be done with some loop construct (c:if or logic:iterate for example).

  • Help on loading modules

    Hello,
    I've problem with module loading. Currently in my application we load all the modules at the start of the application. so any part of the application if needs a modules it will call using the following method currently
    var oModule:IModule = mainApp.getModule('name');
    oModule.getSomething('param");
    so, the main app has the references to all the modules which are loaded at the start of the application.. but now, we are trying to make the module loading dynamic - load on demand.
    So, the mainApp has to load the module which is asked by the app and give the reference back to the oModule(above example) after loading the module. In mean time i would like to show loading page(with flash 'loading' displayed). How do i achieve this?
    Thanks

    Using a dependency injection framework like Parsley and the Cairngorm 3 module library will help you a lot. You will be able to inject into each module the dependencies (object instances) it needs without having the shell app referencing the module (hence the inversion of control).
    Here's what I have implemented to show a loading animation for each module (loaderprocessmc is a Flex component created from Flash CS3 that has animation frames ranging from 1 to 100; it has a nested movieclip called animation):
    In each module mxml:
    <mx:Module
        preloader="com.db.views.ProgressDisplay"
    ProgressDisplay.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <preloaders:DownloadProgressBar xmlns:preloaders="mx.preloaders.*"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:local="*">
        <mx:Script>
        <![CDATA[
            import flash.events.Event;
            import flash.events.ProgressEvent;
            import mx.events.*;
            import mx.preloaders.Preloader;
            import mx.preloaders.DownloadProgressBar;
            import mx.core.Application;
            private var loader:loaderprocessmc;    
            override public function set preloader( preloader:Sprite ):void
                preloader.addEventListener( ProgressEvent.PROGRESS , SWFDownloadProgress );
                preloader.addEventListener( Event.COMPLETE , SWFDownloadComplete );
                preloader.addEventListener( FlexEvent.INIT_PROGRESS , FlexInitProgress );
                preloader.addEventListener( FlexEvent.INIT_COMPLETE , FlexInitComplete );
                loader = new loaderprocessmc();
                loader.x = stageWidth  / 2 - (loader.width / 2);
                loader.y = stageHeight / 2 - (loader.height / 2);
                addChild(loader);
                loader.animation.stop();
            private function SWFDownloadProgress( event:ProgressEvent ):void
                var percent:uint = (event.bytesLoaded / event.bytesTotal) * 100;
                loader.animation.gotoAndStop(percent);
            private function SWFDownloadComplete( event:Event ):void {}
            private function FlexInitProgress( event:Event ):void {}
            private function FlexInitComplete( event:Event ):void
                dispatchEvent( new Event( Event.COMPLETE ) );
         ]]>
        </mx:Script>
    </preloaders:DownloadProgressBar>

  • Empty sub-menu bar style

    i'm using adf 10.1.3.41.57 and i've skinned my application using the mycompany skin. however, when i have a top level menu that doesn't have and sub-menus the bar that holds the sub-menu items disappears. i've tried setting the property:
    af|menuBar::empty
    width:100%;
    background-color:#D2DEED;
    background-image: url(/skins/mycompany/skin_images/PBMediumBkg.gif);
    to no avail. the only thing i get is the background color, but no image is displayed. does anyone no of a way to display an image for the sub-menu when the sub-menu is empty?
    thanks,
    paul

    actually, we're using jheadstart to generate the pages. the menu is generated in a region and here's the code below:
    <af:menuTabs>
    <af:commandMenuItem text="Plan Summary" onclick="return alertForChanges();" action="StartSummary" immediate="true"
    selected="#{attrs.selectedTab=='Summary'}"
    >
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.DoRollbackActionListener"/>
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.ResetBreadcrumbStackActionListener"/>
    <af:resetActionListener/>
    </af:commandMenuItem>
    <af:commandMenuItem text="Plan Details" onclick="return alertForChanges();" action="StartPlanDetails" immediate="true"
    selected="#{attrs.selectedTab=='PlanDetails'}"
    >
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.DoRollbackActionListener"/>
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.ResetBreadcrumbStackActionListener"/>
    <af:resetActionListener/>
    </af:commandMenuItem>
    <af:commandMenuItem text="Plan Rate" onclick="return alertForChanges();" action="StartPlanRates" immediate="true"
    selected="#{attrs.selectedTab=='PlanRates'}"
    >
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.DoRollbackActionListener"/>
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.ResetBreadcrumbStackActionListener"/>
    <af:resetActionListener/>
    </af:commandMenuItem>
    <af:commandMenuItem text="WSF" onclick="return alertForChanges();" action="StartWSF" immediate="true"
    selected="#{attrs.selectedTab=='WSF'}"
    >
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.DoRollbackActionListener"/>
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.ResetBreadcrumbStackActionListener"/>
    <af:resetActionListener/>
    </af:commandMenuItem>
    <af:commandMenuItem text="Non WSF" onclick="return alertForChanges();" action="StartNonWSF" immediate="true"
    selected="#{attrs.selectedTab=='NonWSF'}"
    >
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.DoRollbackActionListener"/>
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.ResetBreadcrumbStackActionListener"/>
    <af:resetActionListener/>
    </af:commandMenuItem>
    </af:menuTabs>
    paul

  • Forward/ back button for various sub-folders

    Hello all,
    Here's the scenario.....
    I have a forward and back button that load several images in a sub-folder that load to a UIloader....
    next_btn.addEventListener(MouseEvent.CLICK, nextImage);
    function nextImage2(evtObj:MouseEvent):void{
    imageNumber++;
    LargeImageLoader.source = "portfolio/UIloader/bike/00"+imageNumber+".jpg";
    checkNumber();
    back_btn.addEventListener(MouseEvent.CLICK, backImage);
    function backImage2(evtObj:MouseEvent):void{
    imageNumber--;
    LargeImageLoader.source = "portfolio/UIloader/bike/00"+imageNumber+".jpg";
    checkNumber();
    Since I have multiple sub-folders for my portfolio, I was wondering how to apply these same buttons to other sub-folder image paths without needing to create a pair of forward/back buttons for each sub-folder.
    Thanks!

    It's not entirely clear to me, but what I think you need to do for what I think you are saying you want to do would be to make the folder targeting (portfolio/UIloader/bike/, et al) a variable as well.  The only missing link is what you would use to redefine the folders.
    Your next/prev buttons can't be that smart unless you have some conditional logic that helps them realize a particular imageNumber range belongs to a particular folder.  If your images have the same file names (00#.jpg) across the different folders then that won't help.  I believe you would need them to be sequential such that no folder repeats the filenames/numbers of another

Maybe you are looking for

  • Need changes in standard data element

    Hi gurus, I want to change in one of SAP standard data element for adding search help into it. for this fields there is no user exit or any enhancement is present. I have taken access key from our basis guy after putting access key i am unable to cha

  • Using images in an HTML message

    Dear All, I want to embed 2 .gif files as part of the HTML message which is being sent from one client to another..My clients want me to give them the same effect as Outlook express utility: New Using->Select Stationery->Filename...so that the text c

  • Sequence Error: Unable to perform edit

    Hi, I'm trying to drag a clip from the bin to the timeline, but FCP is very unhappy about it. "The duration of the resulting sequence would exceed the maximum duration, which is 12 hours (or 6 hours for sequences with high audio rates)." So, I guess

  • Want help for nokia 7610 pdf reader

    can any one help me for software for my nokia 7610 handset & need it most urgently & immediately can any one help me........

  • Can an sd card reader be used on an iphone to transfer pictures?

    I was looking at the sd card readers for iPhone and I am not sure if they are going to work like I thought.  Can you use it to transfer pictures from the phone to thee card and then to either a computer or a photo kiosk?   If so, does anyone know of