How to add the listener showPopup trigger for a commandlink type context menu

Hi all

I use jdev 11.1.1.7

I have a commandlink with actionlistener, which will display a popup and his works fine

But when the right click on the link same context menu should be display

That's why I added a trigger type contextmenu for this commandlink showPopupListener but its does not work

I even added oracle.adf.view.rich.ACTION_LINK_BROWSER_CONTEXT_SUPPRESSION to no. as suggested in https://docs.oracle.com/cd/E24382_01/web.1112/e16181/af_navigate.htm#ADFUI11777 still does not


<af:commandLink id="dc_cl2" text="#{page.concatMemberNameDisplayed}" actionListener="#{pageFlowScope.MyBean.openMS}"
                                          inlineStyle="font-size:smaller;" rendered="#{page.axisType==3}">
                            <f:attribute name="selectedPageMem" value="#{page}"/>
                            <af:showPopupBehavior popupId="contextMenu" triggerType="contextMenu" align="afterEnd"/>
                            <af:popup id="contextMenu" launcherVar="var" eventContext="launcher">
                              <af:menu text="ContextMenu" id="m1">
                                <af:forEach items="#{pageFlowScope.MyBean.mapKeys}" var="it">
                                  <af:forEach items="#{pageFlowScope.MyBean.menuItems[it]}" var="menuItem">
                                    <af:commandMenuItem text="#{menuItem.label}" id="cmi1" actionListener="#{pageFlowScope.MyBean.contextMenuClicked}" action="onContextMenu"
                                                        rendered="#{it eq 'Global'}">
                                      <f:attribute name="selectedMenu" value="#{menuItem}"/>
                                      <f:attribute name="selectedPageMem" value="#{page}"/>
                                    </af:commandMenuItem>
                                  </af:forEach>
                                </af:forEach>
                              </af:menu>
                            </af:popup>
                          </af:commandLink>

Please let me know how to achieve this. Thanks, Asha

If the component on the page sometimes is visible and sometimes will not depending on the condition or user action, you must use the visible property. Whether or not the component is visible only once (for example according to the privilege of the user or user type), you must use return ownership.

Tags: Java

Similar Questions

  • How to add the listener to use mouse to one single line

    I have a requirement. In a JTable when I double click on a particular line the cells in the row put the width which I have provided.

    The problem with my code is when I click on the fourth row of the table, the first line adjusts.

    How I need help is so

    that if I click on the first row, the first cell size line should be adjusted not when I click on the fourth line.

    If I give a few cells of the width and the height of the cells in the fourth row, then when I double click on the fourth line, the fourth should only get adjusted and not the other lines.

    Hope I explained it clearly.

    How is it possible?


    Below is my code. Everything is hardcoded. Thus, it may seem messy. Please excuse.

    Imports
    import impossible;
    import java.awt.Color;
    java.awt.Component import;
    to import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;

    to import javax.swing.JFrame;
    to import javax.swing.JPanel;
    javax.swing.JScrollPane import;
    javax.swing.JTable import;
    Import javax.swing.JTextArea;
    Import javax.swing.table.DefaultTableModel;
    javax.swing.table.TableCellRenderer import;
    Import javax.swing.table.TableColumn;

    class SimpleTableExample extends JFrame {}
    Instance attributes used in this example
    private JPanel Top;
    JTable table private;
    private get scrollPane;
    String data1 = "";
    String data2 = "123456789ABCDEFGHIJKLMNOPQRSTUVQWXYZabcdefghijklmnopqrstuvwxyzaquickbrownfoxjumpedoverthelazydog";
    int size = data2.length ();

    Main chassis constructor
    public SimpleTableExample() {}
    Define the characteristics of frame
    setTitle ("Simple Application of Table");
    setSize (400, 200);
    setBackground (Color.gray);

    Create a Panel to contain all other components
    Top = new JPanel();
    topPanel.setLayout (new BorderLayout());
    getContentPane () .add (topPanel);

    Create column names
    ColumnNames String() is {'SALT', "DESIGN DATA", "REFERENCE"};.

    Create data

    String [] [] dataValues = {{data1, data2, "67", "77"},
    {"", "43", "853"}, {"", "89.2", "109"},
    {{' ', "9033", "3092"}} ;
    Model DefaultTableModel = new DefaultTableModel (dataValues, columnNames);
    model.addColumn ("SECTION TITLE");
    model.addColumn ("SPECIAL INSTRUCTIONS").
    table = new JTable (model) {}
    ' public boolean isCellEditable (int rowIndex, int colIndex) {}
    Returns false;
    }
    };
    adjust the height of specific line
    table.setAutoResizeMode (JTable.AUTO_RESIZE_OFF);
    colInd int = 0;
    TableColumn col = table.getColumnModel () .getColumn (colInd);
    int width = 50;
    col.setPreferredWidth (width);
    int colInd2 = 1;
    TableColumn col2 = table.getColumnModel () .getColumn (colInd2);
    int width2 = 100;
    col2.setPreferredWidth (WIDTH2);
    int colInd3 = 2;
    TableColumn col3 = table.getColumnModel () .getColumn (colInd3);
    int width3 = 10;
    Col3.setPreferredWidth (width3);
    int colInd4 = 3;
    TableColumn col4 = table.getColumnModel () .getColumn (colInd4);
    width4 int = 10;
    Col4.setPreferredWidth (width4);
    int colInd5 = 4;
    TableColumn col5 = table.getColumnModel () .getColumn (colInd5);
    width5 int = 10;
    col5.setPreferredWidth (width5);

    table.addMouseListener (new MouseAdapter() {}
    {} public void mouseClicked (MouseEvent e)
    If (e.getClickCount () == 2) {}
    JTable target = e.getSource () (JTable);
    int row = target.getSelectedRow ();
    int target.getSelectedColumn () = column;

    TableColumn col1 = table.getColumnModel () .getColumn (0);
    col1.setPreferredWidth (50);
    TableColumn col2 = table.getColumnModel () .getColumn (1);
    col2.setPreferredWidth (400);
    (.setCellRenderer) table.getColumnModel () .getColumn (1)
    (new TableCellLongTextRenderer());
    table.setRowHeight (50);
    TableColumn col5 = table.getColumnModel (.getColumn) (4);
    col5.setPreferredWidth (200);
    }
    }
    });

    Create a new instance of table

    table = new JTable (dataValues, columnNames);

    Add the table to a scroll pane
    scrollPane = new get (table);
    topPanel.add (scrollPane, BorderLayout.CENTER);
    }

    Main entry point for this example
    Public Shared Sub main (String [] args) {}
    Create an instance of the test application
    MainFrame SimpleTableExample = new SimpleTableExample();
    mainFrame.setVisible (true);
    }
    }

    class TableCellLongTextRenderer extends JTextArea implements {TableCellRenderer

    public getTableCellRendererComponent (JTable, Object value, table Component
    Boolean isSelected, boolean hasFocus, int line, int column) {}
    this.setText ((String) value);
    this.setWrapStyleWord (true);
    this.setLineWrap (true);
    the width of the column in the table to the JTextArea
    setSize (table.getColumnModel () .getColumn (column) .getWidth (),
    getPreferredSize () .height);
    If (table.getRowHeight (row)! = getPreferredSize () .height) {}
    set the height of the row in the table to the calculated height of the
    JTextArea
    table.setRowHeight (rank, getPreferredSize () .height);
    }
    Back to this;
    }

    }

    Published by: 915175 on August 3, 2012 04:24

    Hello

    Try code below. Hope this will help

    import impossible;
    import java.awt.Color;
    java.awt.Component import;
    to import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;

    to import javax.swing.JFrame;
    to import javax.swing.JPanel;
    javax.swing.JScrollPane import;
    javax.swing.JTable import;
    Import javax.swing.JTextArea;
    Import javax.swing.table.DefaultTableModel;
    javax.swing.table.TableCellRenderer import;
    Import javax.swing.table.TableColumn;

    SerializableAttribute public class SimpleTableExample extends JFrame {}

    private JPanel Top;
    JTable table private;
    private get scrollPane;
    String data1 = "";
    String data2 = "123456789ABCDEFGHIJKLMNOPQRSTUVQWXYZabcdefghijklmnopqrstuvwxyzaquickbrownfoxjumpedoverthelazydog";
    int size = data2.length ();

    Main chassis constructor
    public SimpleTableExample() {}
    Define the characteristics of frame
    setTitle ("Simple Application of Table");
    setSize (400, 200);
    setBackground (Color.gray);

    Create a Panel to contain all other components
    Top = new JPanel();
    topPanel.setLayout (new BorderLayout());
    getContentPane () .add (topPanel);

    Create column names
    ColumnNames String() is {'SALT', "DESIGN DATA", "REFERENCE"};.

    Create data

    String [] [] dataValues = {{data1, data2, "67", "77"},
    {"", "43", "853"}, {"", "89.2", "109"},
    {{' ', "9033", "3092"}} ;
    Model DefaultTableModel = new DefaultTableModel (dataValues, columnNames);
    model.addColumn ("SECTION TITLE");
    model.addColumn ("SPECIAL INSTRUCTIONS").
    table = new JTable (model) {}
    ' public boolean isCellEditable (int rowIndex, int colIndex) {}
    Returns false;
    }
    };
    adjust the height of specific line
    table.setAutoResizeMode (JTable.AUTO_RESIZE_OFF);
    colInd int = 0;
    TableColumn col = table.getColumnModel () .getColumn (colInd);
    int width = 50;
    col.setPreferredWidth (width);
    int colInd2 = 1;
    TableColumn col2 = table.getColumnModel () .getColumn (colInd2);
    int width2 = 100;
    col2.setPreferredWidth (WIDTH2);
    int colInd3 = 2;
    TableColumn col3 = table.getColumnModel () .getColumn (colInd3);
    int width3 = 10;
    Col3.setPreferredWidth (width3);
    int colInd4 = 3;
    TableColumn col4 = table.getColumnModel () .getColumn (colInd4);
    width4 int = 10;
    Col4.setPreferredWidth (width4);
    int colInd5 = 4;
    TableColumn col5 = table.getColumnModel () .getColumn (colInd5);
    width5 int = 10;
    col5.setPreferredWidth (width5);

    Rendering of the cell must be applied on each column - add by Mohamed
    for (int i = 0; i)< table.getcolumnmodel().getcolumncount();="">
    table.getColumnModel () .getColumn (i) .setCellRenderer (new TableCellLongTextRenderer());
    }

    table.addMouseListener (new MouseAdapter() {}
    {} public void mouseClicked (MouseEvent e)
    If (e.getClickCount () == 2) {}
    JTable target = e.getSource () (JTable);
    int row = target.getSelectedRow ();
    int target.getSelectedColumn () = column;
    setTableCellHeight (table, row, column); Added by Mohamed
    TableColumn col1 = table.getColumnModel () .getColumn (0);
    col1.setPreferredWidth (50);
    TableColumn col2 = table.getColumnModel () .getColumn (1);
    col2.setPreferredWidth (400);
    TableColumn col5 = table.getColumnModel (.getColumn) (4);
    col5.setPreferredWidth (200);
    }
    }
    });

    Create a new instance of table

    table = new JTable (dataValues, columnNames);

    Add the table to a scroll pane
    scrollPane = new get (table);
    topPanel.add (scrollPane, BorderLayout.CENTER);
    }

    /**
    * Created by Mohamed
    *
    * This will set the cell height and width of column
    *
    @param table
    @param line
    @param column
    */
    ' Public Sub setTableCellHeight (table JTable, int line, int column) {}

    the width of the column in the table to the JTextArea
    setSize (table.getColumnModel () .getColumn (column) .getWidth (),
    getPreferredSize () .height);
    If (table.getRowHeight (row)! = getPreferredSize () .height) {}
    set the height of the row in the table to the calculated height of the
    JTextArea
    table.setRowHeight (rank, getPreferredSize () .height);
    }
    }

    Main entry point for this example
    Public Shared Sub main (String [] args) {}
    Create an instance of the test application
    MainFrame SimpleTableExample = new SimpleTableExample();
    mainFrame.setVisible (true);
    }

    }

    class TableCellLongTextRenderer extends JTextArea implements {TableCellRenderer

    public getTableCellRendererComponent (JTable, Object value, table Component
    Boolean isSelected, boolean hasFocus, int line, int column) {}
    this.setText ((String) value);
    this.setWrapStyleWord (true);
    this.setLineWrap (true);
    Back to this;
    }

    }

  • How to add the listener password password file?

    Oracle 10g. I put a password for current listener. Is there such a thing that I would add a password for the listener to the password file? Please notify.

    Thank you

    S.

    ski123 wrote:
    Oracle 10g. I put a password for current listener. Is there such a thing that I would add a password for the listener to the password file? Please notify.

    Thank you

    S.

    Documentation on setting up a listening port password is clear enough and does not address file a/the password. You define the listener password by issuing the appropriate lsnrctl command. The password is encrypted and stored in the listener.ora file. That's all.

    And at least from 10 g, if your OS account is member of the dba group, the Auditor considers you authenticated OS (just like "/ as sysdba" to sqlplus) and will not require a password. The password protects against accounts that are NOT members of the dba group.

  • How to add the drop-down filter list in a dashboard button/menu

    Hi all

    I created a custom dashboard related activities, but I don't know how to put the drop down filter the list (for example, exercise & fiscal month) on top of the dashboard as Pipeline analysis (report SOD predefined) as well as the button 'Go '.
    Clues?

    Thanks in advance

    Hello!

    In the page analysis of the design, you must create a new dashboard guest.
    Go to Design Analisys, select a report type (doesn't matter which) e.g. addresses of account (1).
    Then on the top left of the page, you will see 3 icons, and the third is new dashboard fast....

    Once you have created your command prompt, you can save it as the other reports, and you can add it to your dashboard.

    I hope this will help, do not hesitate to ask for more!

    Max

  • How to add the directory to classpath for WL 10.3-managed server?

    Hello

    For our .war, we have a handful of .properties files that are not in the war. The idea was to be able to edit a properties file, as needed and redeploy the application to pick up a few ownership changes. We do this in WebLogic by modifying the startWebLogic.sh startup script and tacking on the file system path to the classpath assignment. This works very well when we deploy the .war on the Server Admin, but we found that target on some servers managed (on the same physical host) does not pick up the properties.

    Is there a similar process required for managed servers, i.e. to change the classpath?

    We are new to WebLogic, so perhaps I missed something basic, but I have not been able to google anything. I'd be happy to hear any opinions on the best ways to do so, as well...

    Thank you
    Sanfo

    If you use the NodeManager to start managed servers, you can specify the path to the server startup in the 'Classpath' field in the 'Start Server' field. Note that everything you put into this value, you will need end tod the value with '$CLASSPATH', which will contain the classpath implicit WebLogic itself needs.

    Note also that you could engineer even not require redeployment when you change your properties of your application files. For example, the Log4J properties (or descriptor XML) file is loaded automatically whenever it is changed, even after the deployment. the Log4J infrastructure puts an "Observer" on it to recharge when changed.

  • How to add the collapsible functionality to the Spry Menu?

    Dear Adobe community,

    How to add the functionality of collapsible for the Spry Menu like the one on the White House | whitehouse.gov ?

    Load the White House Web site and minimize your browser window as observe you what happends to the menu bar when you pass a certain limit.

    This is the feature that I want to put in place and I would be happy if one of you could direct me to or share relevant information.

    Concerning

    Andreas

    This isn't a menu Spry Spry do not appear on mobile devices.

    Use any sensitive menu you like for example:

    CSS & jQuery Mobile Navigation Menu Demo

    The tutorial is here:

    CSS and jQuery Menu of Navigation Mobile reactive

  • How to add the chapter name and page not for reference

    Hello

    How to add the chapter name and page not for reference in indesign CS6.

    Thank you

    Please try variable notion of text

  • How to add the symbol for the brand to use?

    I saw how to add copyright and brand symbols, but anyone know how to add the symbol of the brand to use (SM)?

    Thank you.

    Mac OS > FInder > edit > special characters > type of service in the lower-right search

    Problem is many fonts do not have this, then you might want to set an exhibitor SM.

  • How to add the listenter in a folder

    Hello friends,

    Please help me out by telling how can I add a file listener in any folder in flex.

    whenever a file is added to this file, I can get any event, which tells me that on the file,

    Exactly, I want to add the listener to record image in playbook to get information if it adds a new file.

    Thank you

    The suggestion of John (I think that is correct: no way integrated for this), the as3corelib library has a FileMonitor already, class that does what it describes.  You can extend to do something similar with a polling call to getDirectoryListing (or, preferably, the asynchronous version of that) to keep track of the directory.

  • How to add a 2nd hard drive for HP Pavilion DV7!

    How to add a 2nd hard drive for HP Pavilion DV7-3165DX, product # WA794UA or WA794UAR.

    (1) classification of the HDD, hard drive, hardware kit. Disc kit HARD material includes mounting rails, static shield, screws, insulators in rubber and SATA cable from the motherboard. Check your model & product # to ensure compatibility.

    Material of parts HP HDD Kit 517639-001 for DV7-3165DX product # WA794UA and WA794UAR.

    (2) training of consult - Windows 7 PDF, table of contents, 7 replacing a drive in secondary hard drive Bay. This will show you how to install a 2nd HARD drive in an HP DV7.

    Readers - Windows 7 PDF

    (3) to select a Windows 7 computer, select the installed HDD, Format (if not already formatted).

    (4) if the drive HARD does not appear in Windows 7 under computer, go to the Start Menu, find programs and files, enter "Computer management", select storage, disk (Local) management, look for the 2 HARD drive Bay (should appear as disk 1, Bay 1 HARD drive should show as disk 0), Format of the 2nd HARD drive (the one that you just installed).

    Update: I have the 2nd HDD (WD 1 TB) installed, Windows recognize now after completing the steps I mentioned in step 4, Format with default allocation NTFS 931,51 GB free, 118 MB USED to put in shape. Format exFAT to allocation by default 931,51 GB free, 1 MB used to put in shape. I chose NTFS format to reduce the fragmentation of the file.

    My solution.

  • How to add the name of the title of graph in Excel

    Dear friends

    I'm using LabVIEW 8.0.I need how to add the name of the title of graph in Excel.

    You have the report generation tool? If so, the VI of graph Easy Excel has an entry for this.

    If you don't have the Toolbox, then you need to use ActiveX. Please do a search on the use of the ActiveX (there are examples provided with LabVIEW) to control Excel. Also, there are many examples in the thread Excel. NOTE: DON'T POST QUESTIONS IN THIS THREAD.

    In the end, you will need to search for information contained in MSDN.

  • How to add the profile of lenses?

    How to add the profile of lenses?

    At the bottom of the link, you will find a link for the lens profile downloader. With this tool, you can download the profiles shared by other users.

    Work with lenses profiles in Adobe Photoshop, Lightroom and Camera Raw

  • How to add the new column in existing table to our desired location?

    How to add the new column in existing table to our desired location?

    For example, I have to add the new column 'course' before the salary column in the emp table.

    I think the best way is to add the column at the end of the table and create a new view with the order of the columns...

    Another option...

    places the data into a temporary table and recreate the table with the correct order of the columns, and then insert data to the table from the temporary table

    Refer

    Add column (from table) in the desired position

    Example:

    CREATE TABLE temp_my_user LIKE)

    SELECT * FROM password);

    DROP TABLE password;

    (Password) CREATE TABLE

    userID NUMBER

    , first name VARCAHR2 (25)

    , middleInitial VARCHAR2 (1)

    (, name VARCHAR2 (25));

    INSERT INTO password (userID, firstName, lastName)

    (SELECT username

    first name

    lastName

    OF temp_my_user);

    DROP TABLE temp_user;

  • How to add the bar at the bottom of the page [Dreamweaver]

    Hello!

    How to add the bar at the bottom of the page that helps me to make changes in my creation page?

    Not sure I understand.  Looking for the properties panel?  Press Ctrl + F3 or go to window > properties.

    Nancy O.

  • Please tell me how to add the English language in photoshop?

    Hello! Please tell me How to add the English language in photoshop? I'm from Russia and acquired, respectively, also in Russia()

    Cloud of swap language http://helpx.adobe.com/creative-cloud/kb/change-installed-language.html

    or

    A product of Adobe for another language or version of trading platform for CS6

Maybe you are looking for

  • update my current get the new OS 3 Apple Watch

    update my current get the new OS 3 Apple Watch

  • Can I change the order in which my various email accounts are displayed in TB?

    I use TB to access emails from 5 different accounts. They are displayed in the order in which I added the but I would like to change this order. Is it possible, please?

  • Problems with updates

    I was freezing issues with my computer, so I did a restore.  It does not solve the problem, so I did a reinstall of Windows 8.  Now when I try to download the updates, it freezes.  Sometimes I am at 43%, sometimes 95%, but it never ends. I have downl

  • Publish to MP4?

    In Adobe Captivate 8 exporting a CPVC and CPTX to MP4 video format?Thank you

  • LIGHTROOM 5 SER # REQUIRED

    LIGHTROOM 5 BOUGHT THE YEAR LAST WITH CD TO DOWN LOAD, NEW IMAC DOESN'T HAVE A CD PLAYER. I HAVE A PRODUCT CODE AND CODE REDEMPTION BUT NO SERIAL NUMBER, OLD CHECKED EMAIL AND I HVE LOST THE EMAIL IF I HAD ONE WITH SER #. I TRIED SUPPORT AND REDEMPTI