Get MenuItem parent in flex

Hi is there a way to get a parent item of a submenu item in flex?
this is what i have set up. event.item doesn't have a parent property only in AIR
var myMenu:Menu = Menu.createMenu(null, getMenuStructure(), true);
myMenu.addEventListener(MenuEvent.ITEM_CLICK, selectOpr);
private function selectOpr(event:MenuEvent):void {
thx

Hi Greg,
What build of Flex are you using?
1) When using HTTPS the GET URL would also be encrypted, but once decrypted on the server the URL might be logged so it's suggested to not use GET for transmitting credentials.
In 3.x, the default contentType is application/x-www-form-urlencoded - but what happens to your data depends on the type of the params passed into HTTPService.send(). Are you constructing a JSON request as a String?
BTW, did you try to set a contentType? I looked at the 3.x SDK source in SVN and the HTTPService contentType property still has metadata which provides code insight in the IDE but it also restricts the values of . When toString() is called on this XML node the root node is unwrapped and the empty string content returned. To avoid this toXMLString() can be called on the XML node to get the entire XML representation.
3) Load your SWF via HTTPS and use also HTTPS to send your credentials to the server and establish a session. If you tried to use a Basic Auth challenge you'd have to rely on the browser authentication dialog as you can no longer preauthenticate using an "Authorization" header as it is on the list of headers not allowed by flash.net.URLLoader. See the docs for URLRequestHeader used to configure headers with URLLoader:
http://livedocs.adobe.com/flex/3/langref/flash/net/URLRequestHeader.html
As for how to send custom credentials... I think if you can solve your issue in 1) then the rest is up to what you want to do on the server. There should be lots of PHP login examples out there too. As a best practice try to delete / null out credentials variables when they're no longer in use on the client or server. Even though you're using HTTPS, consider additionally Base-64 encoding the credentials (for example, you could copy the format of the HTTPS Authorization header with a single "username:password" string) to obscure them in the event that a clear text version of the request is logged, or viewed in a debugger, etc.
Pete

Similar Messages

  • How to get the parent of a component in fx?

    Here is an example:
    Index.fx:
    Stage {
        title: "Online book library";
        width: 1024
        height: 768
        scene:Scene {
        fill: Color.WHITE
        content: [
           banner ,
           login = Login{translateX:715 translateY:135}
    };Login.fx:
    var logOn : Button = Button {
            translateX:25 translateY: 170
            text: "Log On"
            font: Font {size:11 name: "Verdana Bold"}
            action: function() {
                showHello();
    function showHello(){
       // add a label in index.fx whose text is "welcome!";
        }I want to show something on the index.fx but I don't know how to get the parent from the child component?
    In Flex, we use parent or parentApplication, Is there a similar function in JavaFX?

    Reusing the same Tile example, I had no problems, I suppose I was doing wrong the first time:
    def IMAGES_WIDTH = 100;
    def IMAGES_HEIGHT = 100;
    var COLUMN_NB = 3;
    var ROW_NB = 3;
    var scene: Scene;
    var previews: Container;
    Stage
      title: "Test of Tile layout"
      scene: scene = Scene
        width: 500
        height: 500
        fill: Color.LAVENDER
        content:
          previews = Tile
            hgap: 10
            vgap: 10
            layoutX: bind (scene.width - previews.width) / 2
            layoutY: bind (scene.height - previews.height) / 2
            columns: COLUMN_NB
            content: for (i in [ 1 .. COLUMN_NB * ROW_NB ])
              ImageView
                id: "IV{i}"
                image: Image
                  url: "{__DIR__}clock.gif"
                  width: IMAGES_WIDTH
                  preserveRatio: true
                onMousePressed: Hide
    function Hide(evt: MouseEvent): Void
      println("{evt.node} ({evt.node.id}) - {evt.node.parent}");
      var nm: Node = evt.node.parent.lookup("IV5"); // Middle node
      nm.visible = false;
      var ntl: Node = evt.node.parent.lookup("IV1"); //Top left node
      (ntl as ImageView).viewport = Rectangle2D { height: IMAGES_WIDTH/2, width: IMAGES_WIDTH/2 };
      (evt.node.parent as Tile).hgap = 20; // Strange effect, but works
    }

  • How to get a Parent Message Id in Mapping?

    Hi,
    I have a scenario to post the idoc to file to mulitple receivers. I have to get both Message ID and Parent Message ID in mapping. I am able to get Message ID but not Parent Message ID. I tried to get it from Table sxmspmast but it does not contain the entry during runtime.
    Any suggestions to get the Parent ID while in Mapping.
    Thanks,
    Manikandan R

    you can create a UDF,say getMSGID,  to get current message ID:
    String headerField;
    java.util.Map map;
    // get runtime constant map
    AbstractTrace trace=container.getTrace();
    map = container.getTransformationParameters();
    String key = "MessageId";
    // get value of header field by using variable key
    headerField = (String) map.get(key);
    return headerField;
    pass this output to an RFC  lookup UDF which calls this FM in XI ABAP stack:
    FUNCTION ZGET_PARENT_MSG_ID.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_CURRMSGID) TYPE  CHAR40
    *"  EXPORTING
    *"     VALUE(E_PARENTMSGID) TYPE  CHAR40
    DATA: lv_currmsgid type SXMSPMAST-MSGGUID,
          lv_parentmsgid LIKE SXMSPMAST-PARENTMSG,
    lv_currmsgid = i_currmsgid.
    select single PARENTMSG from SXMSPMAST into lv_parentmsgid where MSGGUID = lv_currmsgid.
    e_premsgid = lv_parentmsgid.
    ENDFUNCTION.

  • How to get the parent window in sub-child controller class in javafx?

    how to get the parent window in sub-child controller class in javafx?

    You can get the window in which a node is contained with
    Window window = node.getScene().getWindow();Depending when this is invoked, you might want to check the Scene is not null before calling getWindow().
    If the window is a stage that is owned by another window, you can get the "parent" or "owner" window with
    Window owner = null ;
    if (window instanceof Stage) {
      Stage stage = (Stage) window ;
      owner = stage.getOwner();
    }

  • How to get assettype of a flex asset based on asset id

    How to get assettype of a flex asset based on asset id

    See http://docs.oracle.com/cd/E29495_01/doc.1111/webcenter_sites_11gr1_bp1_developer_guide.pdf page 84:
    ASSETSET.GETASSETLIST retrieves an ordered list of assets, given optional sort criteria.
    The resulting list has two columns, assetid and assettype, that are sorted by the criteria that you specify.

  • API for parent-child flex value norm hierarchy

    Hi,
    We are looking for an API to create or delete parent - child flex value hierarchy.
    Could someone please advice?
    Thanks

    Yes, I did check here but did not find any information.
    http://irep11i10.oracle.com/OA_HTML/OA.jsp?page=%2Foracle%2Fapps%2Ffnd%2Frep%2Fwebui%2FInterfacesBrowsePG&_ti=2085868704&oapc=3&oas=ioOnKXcQLw-VgcHrVUTNXQ..

  • How to get the parent node of the current node?

    Hi all,
    i want to get the parent node of the current node and the not the parent of the parent node.
    thank you very much

    Hi,
    the parent node of <subnode1-2>29.99</subnode1-2> is (node1), how can do to get <node1> throw <subnode1-2>29.99</subnode1-2> the sub node of <node1>.
    As per my understanding the parent node of <subnode1-2>29.99</subnode1-2> is book not the node1.
    If you want node 1 as a parent of subnode1-2 than your xml will look like this.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book>
    <fathernode>Harry Potter</fathernode>
    <node1>
           <subnode1>29.99</subnode1>
           <subnode2>29.99</subnode2>
    </node1>
    <node2>
           <subnode1>19.99</subnode1>
           <subnode2>19.99</subnode2>
    </node2>
    </book>
    </bookstore>
    and also if you want tom retrive float data than refer following XPATH.
    "//book[[price='1000']]/price/text()"
    Regards,
    Manoj Bilthare

  • How to get the parent Frame of a component ?

    Hi,
    I'm wondering how to get the parent JFrame (or JDialog) of a component.
    Thanks for tips

    I'm using this code:
    public Component getFrame(Component comp)
        Component frame = comp;
        while ((frame != null) && !(frame instanceof Frame))
            frame = frame.getParent();
        if (frame == null)
            frame = comp;  // no parent found
        return frame;
    }

  • FM for getting the Parent materials for the component material

    Hi All,
             I need to to get a list of parent materials for a given component material and that too upto 10 levels.
    i.e.
    Ist Iteration
    The material M1 is a component in 3 other materials.
    2nd iteration
    The above 3 materials will be a components of 3 other materials each i.e. now a total of 9 materials are there.
    3rd iteration
    The above 9 materials will be a component of 3  other materials each i.e. now a total of 27 materials are there.
    upto 10 iterations.
    Is there any FM which can provide me the list of parent and superparents for a given component material..upto 10 levels (or something closer if these levels exists).
    Regards
    Abhishek

    Hi,
    Check this link..Getting the Parent Material (BOM)

  • Getting the Parent JFrame or JDialog

    I am trying to get the parent JFrame or JDialog so I can change the cursor. Right now I am doing it in a stupid way by doing this:
    private void changeCursorQuestion(){
              JFrame frame=(JFrame) getParent().getParent().getParent().getParent().getParent().getParent().getParent();
              Cursor cursor=new Cursor(Cursor.HAND_CURSOR);
              frame.setCursor(cursor);
         }//end changeCursorQuestionBut is there an easier and of course better way of getting the frame or jdialog that a panel is in?

    I am trying to get the parent JFrame or JDialog so I can change the cursor. You can change the cursor of the JPanel ( in fact any Container) so why use that getParent() thing....
    Also, if you want to have quick refrence to JFrame object from JPanel, extend JPanel to make a new class and have a refrence to that JFrame/JDialog in that class, that way you can access it quickly.
    Thanks!

  • [CS2 JS] Get the parent paragraph of a table

    Hi,
    Anybody here who knows how to get the parent paragraph of a selected table?
    var myTable = app.selection[0];
    var myStory = myTable.parent.paragraphs;
    The script above gives me all the paragraphs of the parent text frame. I want to know the index of the paragraph where my selected table is.
    Appreciate the help you can give. Thanks!

    from VB6 ObjectBrowser (PC):
    Property StoryOffset As InsertionPoint
    read-only
    Member of InDesign.Table
    The location of the Table in the parent story.
    so (VB6):
    myTable.StoryOffset.Paragraphs.Item(1)
    should give you paragraph
    robin
    www.adobescripts.com

  • Getting a parent folder WITHOUT IfsFileSystem

    Hi,
    We discovered that using the IfsFileSystem class drastically increases access times to iFS public objects. As a result we are considering phasing out use of this class in favour of other API calls, which appear to be faster.
    Unfortunately we cannot find an easy way to get the parent folder of a document or folder. Please help, we definitely cannot use IfsFileSystem and need another way around.
    It would be interesting to hear if anybody else has discovered problems with the IfsFileSystem class. Even just creating one instance seems to increase access times?!?
    Thanks in advance,
    Max

    One way to do this is to use either of the following two methods on PublicObject:
    public java.lang.String[] getAllFolderPaths()
    public java.lang.String getAnyFolderPath()
    The first will return every path to the PublicObject in question. (Remember that a PublicObject can have multiple parent folders, or none.) The second will return one of them.
    Given a folder path, you can find a PublicObject. Here's some pseudocode (if you decide to use this, make sure to check for IfsExceptions and null values):
    // get your folder and its path
    LibrarySession sess = openLibrarySession();
    Folder myFolder = getMyFolder();
    String path = myFolder.getAnyFolderPath();
    // get its parent folder
    FolderPathResolver fpr =
    new FolderPathResolver(sess);
    PublicObject parent = fpr.findPublicObject(
    path +
    sess.getFolderPathDelimiter() +
    FolderPathResolver.UP_DIRECTORY_TOKEN );
    Another way to do this would be to search for all FolderPathRelationship objects whose RIGHTOBJECT attribute is your folder, and then get the LEFTOBJECT attribute from one of the FolderPathRelationship objects you find. The LEFTOBJECT would be the folder's parent.
    Read the javadoc for more details.

  • Get workitem parent by transaction

    Hi,
    Is there a way to retrieve the field swwwihead-top_wi_id from a transaction?
    I've a lot of workitem from SWI1 and i'd like to get the parent(top-wi_id) for each of them(without developing a report).
    Thanks in advance

    Hello Tony,
    I believe the column titled "Workflow ID" in SWI1 is what you're looking for.
    Cheers,
    Mike

  • Is it possible to get post or Get variables into a flex applicaition without messing with the flashvars?

    Is it possible to get post or Get variables into a flex
    applicaition without messing with the flashvars?

    Probably externalInterface, and maybe BrowserManager.
    But both of those are much harder and messier than flashvars.
    Why are you trying to avoid the easy way?

  • How can I get motherboard ID with flex?

    How can I get motherboard ID with flex? I tried many. But I cannot find some way..

    select distinct group_id
      from tab_tmp t
    where t.group_id not in (select distinct t2.group_id
                                from tab_tmp t2
                               where t2.colour = 'BLACK');
            GROUP_ID
    1     2220052-----
    Edited by: stefan nebesnak on Feb 24, 2013 9:02 AM
    In the TEST table there are the 'BLUE' and 'GREEN' values together in all cases, which confused me. ツ
    <tt>
    GROUP_ID     COLOUR     KEY
    <font color="#FF0000">--1--</font>
    8311226          <font style="background-color: #E7FA6B">GREEN</font>     12428183
    8311226          <font style="background-color: #D7CEFF">BLUE</font>     12428183
    8311226          <font style="background-color: #E7FA6B">GREEN</font>     35428017
    8311226          BLACK     5415875
    <font color="#FF0000">--2--</font>
    2220052          <font style="background-color: #E7FA6B">GREEN</font>     12253085
    2220052          WHITE     12253085
    2220052          <font style="background-color: #D7CEFF">BLUE</font>     84553085
    <font color="#FF0000">--3--</font>
    3029178          BLACK     54587856
    3029178          <font style="background-color: #D7CEFF">BLUE</font>     54587856
    3029178          <font style="background-color: #E7FA6B">GREEN</font>     67080752
    </tt>

Maybe you are looking for

  • Remember Login using cookies and javascript

    Hello all, This is an urgent request. Pls reply asap. I have two jsps one in English and other in french. I need to implement a functionality to remember the username in both these jsps. I have a function written in javascript to check if the "rememb

  • Change in Chart of Account Code

    Dear All, I want to change Chart of Account Code with Discription is this possible for example : Currently my Chart of Account code is ABCD with discription : Chart of Account - C COMPANY I have to change ABCD code with WXYZ. Is this possible please

  • Using extended display

    I'd like to have Photoshop start up on an external monitor with other applications running on the MacBook display. Is there a way to do that? All I've been able to do so far is drag individual photoshop windows to the external display which leaves th

  • Signal express record from 3rd party VI driver

    Hi, Highlight - Can I record data from a 3rd party VI driver in signal express? Detail - I am tasked with developing a 'easy to use' data logging system for both voltage and temperature. Voltage will be logged via a NI cDAQ module, no problem here, t

  • Want to delete Shopping cart

    Hi Experts, There is a Shopping Cart in our system SRM 5.0 which we are not able to view/approve/delete from portal because of some problem. Now user wants to get that shopping cart deleted from backend so that he can order same items using another S