Custom component and custom event problem

hello , i have a strange problem since one week , is that i can't handle the events becoming from my custom component , here is my code :
Event Class :
package events
     import flash.events.Event;
     public class Ev extends Event
          public static const UPDATE:String="update";
          public var data:String;
          public function Ev(type:String,data:String)
               super(type);
               this.data=data;
          override public function clone():Event
               return new Ev(type,data);
MXML component :
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009"
           xmlns:s="library://ns.adobe.com/flex/spark"
           xmlns:mx="library://ns.adobe.com/flex/mx">
     <fx:Metadata>
          [Event(name="onMenuChange",type="events.Ev")]
     </fx:Metadata>
     <fx:Script>
          <![CDATA[
               import events.Ev;
               import mx.events.IndexChangedEvent;
               protected function accordion1_changeHandler(event:IndexChangedEvent):void
                    dispatchEvent(new Ev(Ev.UPDATE,event.newIndex.toString()));
          ]]>
     </fx:Script>
     <fx:Declarations>
          <!-- Placer ici les éléments non visuels (services et objets de valeur, par exemple). -->
     </fx:Declarations>
     <mx:Accordion width="200" height="200" change="accordion1_changeHandler(event)">
          <s:NavigatorContent label="Menu 1" width="100%" height="100%">
          </s:NavigatorContent>
          <s:NavigatorContent label="Menu 2" width="100%" height="100%">
          </s:NavigatorContent>
          <s:NavigatorContent label="Menu 3" width="100%" height="100%">
          </s:NavigatorContent>
     </mx:Accordion>
</mx:VBox>
the main container :
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                  xmlns:s="library://ns.adobe.com/flex/spark"
                  xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
     <fx:Script>
          <![CDATA[
               import events.Ev;
               import mx.controls.Alert;
               protected function comp1_onMenuChangeHandler(event:Ev):void
                    Alert.show(event.data,"notice");
          ]]>
     </fx:Script>
     <local:Comp onMenuChange="comp1_onMenuChangeHandler(event)"/>
</s:Application>
any help will be welcome !

hi,
Not sure why your custom event is not working, I tend not to worry about 'custom' events unless I need to transfer a lot of information.
Here is a way to 'simplify' event management.
I just declare a new event in the meta data and then send it to notify that a change has been made. Although the parent can find the index value easily enough I also use two-way bind the navigators index so that it is directly available for the application to manipulate/read .
http://gumbo.flashhub.net/events/  source included
David.

Similar Messages

  • Is  Creating a Custom Component and Custom UIComponent are same in Flex ??

    Hi ,
    I am getting confusion in the terminology of words  with respect to Custom  Components .
    Please let me know whether  Creating a Custom Component and Custom UIComponent are same in Flex ??
    Because i have created some  Custom Components based on Form Container based on my business screens .
    Does they both Custom Component and Custom UIComponent mean the same ??
    Please tell me .
    Thanks in advance

    There seems to be a little confusion here. Think of it this way:
    A basic UIComponent by itself is not visible; you can add something you can see to it to make a visual custom component. For example, a ComboBox component is a UIComponent with a ComboBox added to it.
    The UIComponent is the lightest weight component available from which you can create other components. I use it as the base for custom components that the user cannot see, like a data manager.
    HTH,
    Carlos

  • Custom classpath and custom jar entry in R12

    Hi all,
    I have created the custom classpath and custom jar file for isrore process. I had put custom jar and custom class entry in orien_application.xml file. But it was working on R12 at doveloper mode. It will creates the classes for custom jsp file using custom import class or custom jar. But once i revert back the devloper mode means it won't work.
    Could you please help..

    Oracle apps R12 - Compiling JSP with custom classpath
    We all know that to compile JSP manually on the Oracle Application R12 instance, we need to run the file $FND_TOP/patch/115/bin/ojspCompile.pl.
    Its help is as follows:
    syntax: ./ojspCompile.pl COMMAND {ARGS}
    COMMAND --compile               update dependency, compile delta
    --create                rebuild entire dependency file
    -delta.out update dependency, list delta to file
    -dep.out update dependency, output heirarchy to file
    ARGS -s matching condition for JSPs filenames
    -p number of parallel compilations
    -log to override logfile from ojspCompile.conf
    You are
    recommended to set the log file location
    outside of any network file system shared (NFS) area/drive.
    -conf to override ojspCompile.conf
    --retry         retry previously failed compilation attempts
    --flush         forces recompilation of all parent JSPs
    --quiet         do not provide an actively running progress meter
    --fast          instantly fail jsps that are possibly invalid
    example1: ojspCompile.pl compile -s 'jtf%' -p 20 retry
    example2: ojspCompile.pl compile -s 'jtflogin.jsp,jtfavald.jsp' flush
    example3: ojspCompile.pl compile fast --quiet
    If your JSP uses custom classes, then compiling jsp manually can fail if proper classpath is not set. Yes, even though if you have setup the classpath correctly in orion-application.xml, it will fail because this jsp compile utility does not read orion-application.xml classpath.
    So, the problem is to identify where to set the classpath so that above utility can pick it up. After several search and looking into code, I found following:
    By default, the jsp compiler script uses following configuration file
    $INST_TOP/appl/admin/ojspCompile.conf
    This conf file has a classpath field in it which is usually pointed to file
    $INST_TOP/appl/admin/ojspCompile.properties
    This property file lists the classpath used for JSP compilation.
    So if your classes are not listed in this file, your jsps will not compile by ojspCompile.
    Ofcourse, you can always set the "main_mode" to "recompile" in orion-web.xml, but that for production you do not want to change it and compile the JSP on file deployment.
    References:
    458338.1 How to Enable Automatic Compilation of JSP pages in R12 Environment
    433386.1 JSP Pages Hanging in R12 After Removing Cached Class Files in _pages
    783094.1 Compile jsp files at Application R12 at Windows

  • Currency rate vs custom 3 and custom 4

    Hi all
    I have used all currencies in custom 1 and required currency in custom 2 for entering currency rates. Now for custom 3 and custom 4, Do these have to be [None] only( and that too as base members? ??
    A wild example i came up with
    Assume I have two times in custom 3..one is 11:00 AM and other is 11:00 PM and custom 4 are the dates..i.e 1st 2nd 3rd and so on till 31st.
    I need currency rates at these two times daily and I have these in custom 3 and 4 dimensions say. So how do i go about entering currency rates?
    Question 2)
    If I need to enter data at custom dimension level, does the member necessarily have to be under [None] ? If not then how do i go about? Since when I take the member out of [None] and keep it at a sibling level of [None] , I cannot enter data at that member but If I keep the same as a child of [None], It will allow me to enter data. So how do i go about this?
    Question 3)
    This is basically a combination of Q1 and Q2..If I have a member under [None] in custom 3 dimension, I cannot use custom 3 as [None] while entering Currency rates since [None] becomes a parent. If I keep the member as a sibling of [None] in custom 3 dimension, then I cannot enter data at that member, but I can enter currency rate at [None].
    Please help me resolve these 3 problems.
    Thanks!

    i think you are trying to do things not supported by HFM.
    you are correct, when entering currency rate data in HFM, both custom3 and custom4 must be set to [None] member.
    these are the types of custom rate that are used by the "Translation" feature in HFM and Sub Translate()
    i do not know how you could have different currency rates in the same rate accounts for different times of day. I do not think HFM is normally used in this way. You would probably need to use Multiple different rate accounts for the different times of day, and then write complicated rules in the Sub Translate() to use the different rate accounts depending on the target cell POV.
    I suggest you reach out to someone who has experience in designing HFM applications to see if there is any way to achieve your goals using HFM.

  • While running FBL5N (Business area wise) customer code and customer names a

    Hi Gurus,
    While running FBL5N (Business area wise) customer code and customer names are not appearing.

    Hi Raju,
    Please click on the change layout screen button on the screen of FBLN5N report. then select the fields customer code and customer name from the right hand side table and drag it to left hand side table.
    After that run the report again. it will appear. please assign points.
    Rgds
    Manish

  • Reg:Table for Custom Messages and custom Messaege Classes

    Hi ,
    My requirement is to find out all custom messages . so can any one tell in which tables all custom messages and custom message classes are stored .
    Thanks & Regards,
    Lakshmi.

    hi,
    You can checkthese tables listed below,
      T100                             Messages
      T100A                            Message IDs for T100
      T100C                            Message Control by User
      T100O                            Assignment of message to object
      T100S                            Configurable system messages
      T100SA                           Application Areas for Configurable Messages
      T100T                            Table T100A text
      T100U                            Last person to change messages
      T100V                            Assignment of messages to tables/views
      T100W                            Assign Messages to Workflow
      T100X                            Error Messages: Supplements
      T100ARBGB                    Application Area
    But The main table for storing all the message classes and their numbers are stored in table
    T100

  • Custom.pll and custom.plx location changed

    Hi Friends,
    I am having Oracle Apps 11.5.9 and i had the custom.pll and custom.plx on $AU_TOP/resource and make the changes there and it's working fine.
    Now suddenly the changes made on the file is not refelecting so i searchd the server and i could see another copy of custom.pll and custom.plx on the $COMMON_TOP/admin/scripts and the changes being made on this files is getting reflected(not the one from $AU_TOP)
    I don't know how this change happened.
    So Please let me know how to change the location of custom.pll and custom.plx from $COMMON_TOP/admin/scripts to $AU_TOP/resource?
    Regards,
    Arun

    Arun,
    How did you verify that the one which is used is the one under $COMMON_TOP/admin/scripts?
    So Please let me know how to change the location of custom.pll and custom.plx from $COMMON_TOP/admin/scripts to $AU_TOP/resource?Copy the CUSTOM.pll file back to $AU_TOP/resource, and compile the file again. Make sure both files (CUSTOM.pll and CUSTOM.plx exist under this directory), and bounce the application services then.
    Also, delete all CUSTOM* files under $COMMON_TOP/admin/scripts (take a backup of the files first).
    Regards,
    Hussein

  • Customer Groups and Customer Credit Groups

    Hello
      I was going through the documentation for Credit Management, but I was confused on what the difference was between customer groups and customer CREDIT Groups.. both of them sort of have the same definition, then what is the difference ?
    Please help me out.
    Regards,

    Hi Raj,
    For your info :
    The <b>credit group</b> groups together different business transactions which should be dealt with in the same manner with regard to the credit check.
    You enter the credit groups when you configure the sales document types for credit management and define the automatic credit check.
    Default settings
    The following credit groups are contained in the standard SAP R/3 System:
    01 = credit group for sales order
    02 = credit group for delivery
    03 = credit group for goods issue
    Actions
    1. Check whether you can use the credit groups in the standard system.
    2. If you need to create new credit groups, enter an alphanumeric key with two characters and a descripion for the credit group.
    A <b>customer group</b> tells to which a customer can belongs to.
    You specify the customer group for sales data in the customer master record for each sales area.
    The SAP System copies this specification automatically into the sales documents at header and item level. Here, you will find the customer group on the detail screen for general business data.
    Actions
    1. Specify an alphanumeric key which can have up to 2 characters and a description for the customer groups.
    2. Make sure that the customer groups are entered in the customer master records.
    Hope it helps. Pl reward if useful.
    Thanks & Regards
    Sadhu Kishore

  • Customer balance and customer sales

    I am running the transactions S_ALR_87012171 and S_ALR_87012169 to view the customer sales and customer account balances, respectively. What database tables are these figures from?
    Thanks.

    S_ALR_87012171 :
    TABLES: RFRRD10, COIX, COIX_DATA40, RKB1X, RKB1F, RKB1D.
    S_ALR_87012169 :
    TABLES: RFRRD10, COIX, COIX_DATA40, RKB1X, RKB1F, RKB1D.
    The COIX_DATA* relates to client number!

  • Standard form :'Customer  invoice' and 'customer Invoice : Property Damage'

    Hi
    Can someone tell me what is the standard form for 'Customer  invoice' and 'customer Invoice : Property Damage'.? Is there any config involved.
    I'll reward points for any helpful answer.
    -Nash

    LB_BIL_INVOICE is the Standard SMARTFORM for Invoice  Document
    you need to do Output Type/Control configuration(TCode NACE)

  • How to search Products based on content of Custom 1 and Custom 2 fields

    I have a client who has only 6 products but each product has 30 colour and 6 size variations (for each colour of each prdouct) thus creating 1080 separate prdoucts which all need to be sold be individual product codes and with managing inventory levels.
    What we want to do is to give users a search facility that once they select the main product they can choose the colour and the size (as would be set in the custom 1 and custom 2 fields to present the desired product for purchase.
    Anyone got any idea whether this is possible in BC and if so how to achieve this?
    Whilst not for the clothing idnustry this requirement is common for any busienss in that industry so a solution would be very appealing tomany people I am sure.
    Thanks in anticipation...

    Hi Greg,
    I don't know how you'd implement that. There's no facility that will provide you with a search capability for a particular product, so if you're looking at the detail view of a product you can narrow it down somehow to a particular colour. By the way, how do you imagine this to work? Would it be a keyword search for colour?
    Out of the box you can only group those products, since your require inventory(otherwise you'd probably use attributes), and that would render the dropdown that contains all of the other products in that group and the customer would select the colour they want from the dropdown.
    Cheers,
    mario

  • Customs documents and customs declaration.

    Hi Experts,
    Can any one please briefly explain what is the difference between customs document and customs declaration. Is there any special process required to convert customs document as customs declaration?
    I will explain by taking one scenario.
    If we transfer any documents from ecc to gts those documents will called as customs documents. Please tell me am I Right or wrong if right,
    another scenario,
    when we send proforma invoice to gts those invoice will be converted as customs declaration. Is it right or wrong if it is right how it converts to customs declaration why cann't it convert as customs document.
    for converting customs document to as customs declaration is there require any process or configuration settings if yes please let me explain i am little bit confuse.
    Thanks in advance for help ful answer.

    Hi Hari,
    You are exactly bang on in explaining about what is a Customs document and What is a Customs declaration.
    Firstly, please take a look at the below thread where this had been discussed earlier also.
    Difference between customs document and customs declaration document
    But to further differentiate in real sense,
    A Custom document is something that is record in the SAP GTS system of the trade transactions occurring in the SAP logistics system and some time may a supporting document as well. An example of such a case is when we create a sales order , then a customs document is being generated in the GTS system. Here, SAP GTS Custom Documents are just a replica of the SAP feeder system's documents like Sales order etc. with Trade specific data like licenses embedded into them to further assist for future declarations and tracking.
    A Custom Declaration is something that contains data to be declared to the appropriate authorities in the specified format.  During this process ,data from the company's SAP business documents is copied into a declaration to further pass on to the authorities for approval for trade and related processes.
    I hope that now the things will be clear to you. If not, please open a discussion thread for an open discussion to get the required stuff.
    Regards,
    Aman

  • How to get an event both in custom component and into its instance

    I have a custom component that extends a Jtree
    I want to know when a node is clicked both , into my component and after into the component sited into Jpanel
    now, I can only detect it into the component, but I dont know how to detect it at the component I have in my Jpanel
    I have 'addTreeSelectionListener' in both places ...
    xxxxx.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
    public void valueChanged(javax.swing.event.TreeSelectionEvent e) { .....
    Any help ?
    Thanks

    tonnot wrote:
    Thank you.
    I think that a good answer can be ' Revise your code, because there must be a problem' Well, that's the life of a programmer. If you want to post an SSCCE, I'm sure somebody can help if you get stuck.
    And ...
    Why are you extending JTree? I'd bet you shouldn't be.Why not ? ....
    Why SUN develop the 'extends' functionality ? You should use extends if you're changing the behavior of an existing class. An example of this is extending JPanel and overriding the paintComponent() method to do some custom painting.
    You should not use extends if you just need an instance of an existing class. An example of this is extending JFrame instead of simply creating a JFrame instance.
    Without seeing your code, I can't be sure you're misusing extends. But many people do.
    Here's an example.
    Bad:
    public class MyProgram extends JFrame{
       public MyProgram(){
          setSize(200, 200);
          setVisible(true);
       public static void main(String [] args){
          new MyProgram();
    }Better:
    public class MyProgram{
       public MyProgram(){
          JFrame frame = new JFrame();
          frame.setSize(200, 200);
          frame.setVisible(true);
       public static void main(String [] args){
          new MyProgram();
    }

  • Custom component and non-primitive types of attributes

    Dear programmers
    I try to develope a custom UI component that one of its attribute is an ArrayList. For example:
    <productFile:Matrix images="#{MyBean.imagesArray}"/>Unfortuanetly I get the following exception:
    [Unable to convert string &#39;#{MyBean.imagesArray}&#39; to class java.util.ArrayList for attribute images: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager]: org.apache.jasper.JasperException: Unable to convert string '#{MyBean.imagesArray}' to class java.util.ArrayList for attribute images: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
    The attribute images is an ArrayList in the custom component.
    I have also specifieded it as an ArrayList in the tld file:
    <tag>
           <name>Matrix</name>
           <tag-class>org.sii.productfilejsf.tags.MatrixTag</tag-class>
           <body-content>JSP</body-content>
           <attribute>
                <name>images</name>
                <required>false</required>
                <rtexprvalue>false</rtexprvalue>
                <type>java.util.ArrayList</type>
           </attribute>
      </tag>Does anyone has an idea what can be the problem?
    How can I convert the expression?

    so how will I be able to convert it?Only your converter knows it.
    By the way, is your Matrix component fully completed including its children components?
    If yes, you should know how to implement a converter, or its equivalent code for them.
    For example, in the <h:dataTable> component, if its value attribute points an array of object,
    then it is automatically converted to an appropriate DataModel used by its column children.
    We may need to see your MyBean bean and related code set, if we have enough time.

  • Custom Chrome and Custom Cursor problems

    Howdy, I've got a small problem with chrome and cursors.
    I've created my main application window with the chrome set to Custom-Opaque
    I've got my custom frame, window controls etc. all wired up and working nicely.
    I've got my cursor manager swithing the cursor to resize-arrows when you get close to the window edges.
    Here's where I run into a couple problems:
    The cursor is only visible within the bounds of the window--unlike the system chrome which gives the resize cursors outside the window bounds. Any way to use the system cursors? or another idea?
    When I resize the window, the custom cursor stays right where the MOUSE_DOWN event occured, and doesn't move with the mouse anymore. The window does resize though... Any suggestions?
    Thanks in advance!
    -Ted

    I have the same problem but I extend the WindowsLookAndFeel. I know of a way to fix this but it seems unbelievable that this is the only way. Here is how I did it: In your custom look and feel class add this method. Call the super version and then add the icons that are missing to the UIDefaults table. Of course your code would have MetalLookAndFeel where my example has WindowsLookAndFeel. Hopefully someone will come up with a better solution. I plan on raising a bug in the bug parade for this.
    protected void initComponentDefaults(UIDefaults table)
              super.initComponentDefaults(table);
              table.put("DesktopIcon.icon", LookAndFeel.makeIcon(WindowsLookAndFeel.class,"icons/DesktopIcon.gif"));
              table.put("Tree.openIcon",LookAndFeel.makeIcon(WindowsLookAndFeel.class,"icons/TreeOpen.gif"));
              table.put("Tree.closedIcon",LookAndFeel.makeIcon(WindowsLookAndFeel.class, "icons/TreeClosed.gif"));
              table.put("OptionPane.errorIcon", LookAndFeel.makeIcon(WindowsLookAndFeel.class,"icons/Error.gif"));
              table.put("OptionPane.informationIcon", LookAndFeel.makeIcon(WindowsLookAndFeel.class,"icons/Inform.gif"));
              table.put("OptionPane.warningIcon", LookAndFeel.makeIcon(WindowsLookAndFeel.class,"icons/Warn.gif"));
              table.put("OptionPane.questionIcon", LookAndFeel.makeIcon(WindowsLookAndFeel.class,"icons/Question.gif"));
              table.put("Tree.leafIcon", LookAndFeel.makeIcon(WindowsLookAndFeel.class,"icons/TreeLeaf.gif"));
    Hope this helps.

Maybe you are looking for