MultiSelection in JPopupMenu

Hi
I was in need of allowing multiple selection in JPopupmenu.... I had 50 checkBocMenuitems in JPopupmenu.... Default behaviour of JPopupmenu is if an action that means a selection is done then the popupmenu will gets disappear.. But i want to select multiple items and then want the popupmenu to disappear.. can anyone help me...
ThankQ
Chalu

Hi
This is new one.... Am using JTable in which i have 20 columns for example.. I want the user to click a column header and after that a popupmenu will get opened and it must have two menuItems.. one is fix column and another one is unfix..... it means if the user select a column to fix it, then that column should be added in fixed column list and those columns should be viewed in a seperate view port in a JScrollpane and likewise the unfix columns too.. two tables will be viewed in different viewport in a same Scrollpane..... can any one answer my question please.....
Regards
Chalu

Similar Messages

  • Problem in getting selected values from multiselect list

    Hi,
    I have two multiselect listboxes in my page. In List1 the data will be retrieved from DB and listed.I will have buttons to move the values from List1 to List2 and viceversa.
    After selecting the needed values,I can rearrange them in List2 using some buttons. I have coded this moving and reordering using javascript.
    What happens is while submitting the page I want the values from list2 which are rearranged. But im getting the order in which I moved from list1 to list2.
    I am using html:selectfor both lists
    List1
    <html:select name="CustForm" property="custName" multiple="true" size="10">
           <html optionsCollection property="CustomerNames" value="custName" label="id"/>
    </html:select>I am having a customer form which has a arraylist CustomerNames. This arraylist has customer bean which has proeprties custName and id. The custForm also has a String custName.
    List2
    <html:select name="CustForm" property="selectedCustName" multiple="true" size="10">
           <html  option value=""/>
    </html:select> The custForm also has a String[] selectedCustNames from where I get the selected values in list2
    Please let me know what am I doing wrong here.

    use a treeSelectionListener, that will give you all the selection changes you need.
    thomas

  • How to get the selected values from multiselected list

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

  • Retrieving table values from tableview multiselect

    Hi everyone,
    I have a BSP with a tableView set on multiselect. When the user clicks on a button I want to rertieve the selected rows in my ABAP code and send them to a function module (in the form of a table). But I haven't been able to find code examples on how to do this, ie how to retrieve the selected rows. Can someone provide me with an example or a link to where I can find one? I can catch the button onClick event, but after that I need to get the rows that were selected by the user.
    Thanks!
    best regards,
    Dionisios

    HI Dionisios,
    In your input processing,
    do something like
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
    DATA: event TYPE REF TO CL_HTMLB_EVENT.
    event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    if  event->id = 'but1' and event->event_type = 'click'.
      DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW.
      tv ?= CL_HTMLB_MANAGER=>GET_DATA(
                      request      = runtime->server->request
                      name         = 'tableView'
                      id           = 'tab1' ).
    IF tv IS NOT INITIAL.
    DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
      tv_data = tv->data.
    refresh itab2.
    refresh itab3.
    <b>call method tv_data->GET_ROWS_SELECTED
          receiving selected_rows = itab2.</b>
    endif.
    data : ind type SELECTEDROW,
           row_s type row.
    if itab2 is not initial.
        data :rw LIKE LINE OF itab.
        loop at itab2 into ind.
          READ TABLE itab INDEX ind-index into
          rw.
           if rw is not initial.
           row_s = rw.
          append row_s to itab3.
          clear row_s.
          endif.
        endloop.
    endif.
    Endif.
    Where
    TYPES
    types : tab type table of <table_name>.
    types : row type <table_name>.
    PAGE ATTRIBUTEs :
    Irow type row
    Itab type tab.
    Itab3 type tab.
    Itab2 type selectedrows.
    Rowselected type string.
    And in layout
    <htmlb:tableView id="tab1"
                      table="<%= itab %>"
    ="true" >
                     visibleRowCount="8"
                      design="ALTERNATING"
                      footerVisible="TRUE"
                     selectionMode="multiSelect"
                     keepSelectedRow
         </htmlb:tableView>
    <htmlb:button  id = "but1"
                   onClick="test"/>
    HOpe this helps,
    Regards,
    Siddhartha

  • Retrieving multiselect values from database

    Hi,
    I have a multiselect list of companies names for a user.
    An application user can belong to one or more company. The application user gets to see data in the application based on the company/companies that he belongs to.
    When a user belongs to more than one company the company is saved in the database as example :013:113 for a user.
    I have written a function which retrieves the company code of a user. This function is then called in my codes in apex to restrict the data the user can see.
    create or replace
    function get_company_code (p_usr_name in fus_users.usersname%type)
    return t_com_table
    is
      -- Cursor to get the company for a user
      cursor c_usr2 (b_usr_name in fus_users.username%type) is
        select usr.mdr_com_code
        from   fus_users  usr
        where  upper(usr.username) in upper(b_usr_name)
      cursor c_usr1 (b_usr_name in fus_users.username%type) is
        select distinct mdr.com_code
        from   fus_medewerkers  mdr
       cursor c_usr (b_usr_name in fus_users.username%type) is
        select usr.super_admin
        from   fus_users  usr
        where  upper(usr.username) in upper(b_usr_name)
      l_retval t_com_table;
      l_super_admin t_sup_admin_table;
      begin
        for r_usr in c_usr(b_usr_name => p_usr_name)
        loop
        if r_usr.super_admin is not null then
         open  c_usr1(b_usr_name => p_usr_name);
         fetch c_usr1 bulk collect into l_retval;
         close c_usr1;
        else
         open  c_usr2(b_usr_name => p_usr_name);
         fetch c_usr2 bulk collect into l_retval;
         close c_usr2;
        end if;
        end loop;
        return l_retval;
      end get_company_code; The code works fine when a user belongs to one company.
    How do i get the companies code in my type as rows when a user belongs to more than one company?
    Regards,
    Diana

    Hi Varad and Kofi,
    I finally got my code working :)
    create or replace
    function get_company_code (p_usr_name in fus_users.username%type)
    return t_com_table pipelined
    is
      l_com_code varchar2(50);
      l_tab wwv_flow_global.vc_arr2;
      type type_coll_com_code is table of varchar2(5);
      t_com_code type_coll_com_code;
      -- Cursor to get the company for a not super_admin user
      cursor c_usr2 (b_usr_name in fus_users.username%type) is
        select usr.mdr_com_code
        from   fus_users  usr
        where  upper(usr.username) in upper(b_usr_name)
    -- Cursor to get the company for a super_admin user
      cursor c_usr1 (b_usr_name in fus_users.username%type) is
        select  distinct mdr.com_code
        from   fus_medewerkers  mdr
      -- Cursor to get super_admin
       cursor c_usr (b_usr_name in fus_users.username%type) is
        select usr.super_admin
        from   fus_users  usr
        where  upper(usr.username) in upper(b_usr_name)
      begin
        for r_usr in c_usr(b_usr_name => p_usr_name)
        loop
        if r_usr.super_admin is not null then
         open  c_usr1(b_usr_name => p_usr_name);
         fetch c_usr1  bulk collect
         into t_com_code ;
         close c_usr1;
         for i in 1..t_com_code.count loop
         pipe row (t_com_code(i));
         end loop;
        else
         open  c_usr2(b_usr_name => p_usr_name);
         fetch c_usr2  into l_com_code;
         l_tab:= apex_util.string_to_table(l_com_code); 
         close c_usr2;
         for i in l_tab.first..l_tab.last loop
         pipe row (trim(l_tab(i)));
         end loop;
        end if;
        end loop;
        return ;
      end get_company_code; Thanks for the help.
    Diana
    Edited by: dianap on Sep 21, 2009 9:42 AM

  • Problem with JPopupMenu and JTree

    Hi,
    Is there any way to have different JPopupMenu for every node.
    When I right click on the treenode there is popup menu have a "*JCheckBoxMenuItem*". By default the value of that checkbox is false. Now when i try to right click on a particular node and select the checkbox the selected value gets applied to rest of all nodes also.
    How can i just set the value of the checkbox to one perticular node.
    my code is
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    public class TreePopupMenuTest {
      public JComponent makeUI() {
        JTree tree = new JTree();
        tree.setComponentPopupMenu(new TreePopupMenu());
        JPanel p = new JPanel(new BorderLayout());
        p.add(new JScrollPane(tree));
        p.setPreferredSize(new Dimension(320, 240));
        return p;
      class TreePopupMenu extends JPopupMenu {
        private TreePath path;
        private JCheckBoxMenuItem compress=new JCheckBoxMenuItem("Compress");
        public TreePopupMenu() {
          super();
          add(compress);
          compress.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ie) {
                            if(compress.getState()){
                                 compress.setState(true);
                                    System.out.println("compress clicked");
                            else{
                                 compress.setState(false);
                                    System.out.println("uncompress");
        public void show(Component c, int x, int y) {
          JTree tree = (JTree)c;
          path = tree.getPathForLocation(x, y);
          if(path!=null && path==tree.getAnchorSelectionPath()) {
            super.show(c, x, y);
      public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
          public void run() { createAndShowGUI(); }
      public static void createAndShowGUI() {
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        f.getContentPane().add(new TreePopupMenuTest().makeUI());
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
    }Please help me as soon as possible.
    Thanks.
    Edited by: Kavita_S on Apr 23, 2009 11:49 PM

    Hi,
    Do you know this link?
    [How to Use Trees|http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html]
    Please help me as soon as possible.Sorry that I'm not good at English, I don't understand what you mean.
    Anyway, here's a quick example:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    public class TreePopupMenuTest3 {
      public JComponent makeUI() {
        JTree tree = new JTree();
        tree.setComponentPopupMenu(new TreePopupMenu());
        JPanel p = new JPanel(new BorderLayout());
        p.add(new JScrollPane(tree));
        p.setPreferredSize(new Dimension(320, 240));
        return p;
      class TreePopupMenu extends JPopupMenu {
        private TreePath path;
        private JCheckBoxMenuItem compress = new JCheckBoxMenuItem("Compress");
        public TreePopupMenu() {
          super();
          add(compress);
          compress.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ie) {
              if (compress.getState()) {
                System.out.println("compress clicked");
                setSelectedPath(path, true);
              } else {
                System.out.println("uncompress");
                setSelectedPath(path, false);
        public void show(Component c, int x, int y) {
          JTree tree = (JTree)c;
          path = tree.getPathForLocation(x, y);
          if (path!=null && path==tree.getAnchorSelectionPath()) {
            compress.setState(isSelectedPath(path));
            super.show(c, x, y);
      class MyData {
        public boolean flag;
        public String name;
        public MyData(String name, boolean flag) {
          this.name = name;
          this.flag = flag;
        @Override public String toString() {
          return name;
      //private Set<TreePath> selectedPath = new HashSet<TreePath>();
      private void setSelectedPath(TreePath p, boolean flag) {
        //if (flag) selectedPath.add(p);
        //else    selectedPath.remove(p);
        DefaultMutableTreeNode node =
              (DefaultMutableTreeNode)p.getLastPathComponent();
        Object o = node.getUserObject();
        if (o instanceof MyData) {
          ((MyData)o).flag = flag;
        } else {
          node.setUserObject(new MyData(o.toString(), flag));
      private boolean isSelectedPath(TreePath p) {
        //return selectedPath.contains(p);
        Object o =
              ((DefaultMutableTreeNode)p.getLastPathComponent()).getUserObject();
        return (o instanceof MyData)?((MyData)o).flag:false;
      public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
          public void run() {
            createAndShowGUI();
      public static void createAndShowGUI() {
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        f.getContentPane().add(new TreePopupMenuTest3().makeUI());
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
    }

  • Problem with  JTree and JPopupMenu

    Hi,
    I'm using a JPopupMenu with a JPanel in it. In the panel
    I want to have a JTree. I can build the tree without
    problems but when I try to "go down" in the tree it
    vanishes. This happens only the first time that I
    access a node. When I initialize the menu a second
    time the node I just pressed works fine.
    What is the problem????
    Here is a sample of my code.
    popUpMenu = new JPopupMenu();
    thePanel = new JPanel();
    thePanel .setLayout(new GridBagLayout());
    popUpMenu .add(thePanel );
    DefaultMutableTreeNode top = new DefaultMutableTreeNode("The top");
    DefaultMutableTreeNode secondNode = null;
    DefaultMutableTreeNode firstNode = null;
    firstNode = new DefaultMutableTreeNode("One node");
    top.add(firstNode);
    secondNode= new DefaultMutableTreeNode("One node");
    firstNode.add(secondNode);
    buildConstraints(gbc, 1, 0, 1, 5, 5, 5, 5, 2, 1); //My contraintsmethod
    JTree tree = new JTree(top);
    thePanel .add(tree, gbc);

    Mate, why are you putting a JPanel in a JPopupMenu? I'd be interested to look at a screenshot of this.
    Mitch

  • Problem with InputVerifier and JPopupMenu

    Hello, I have a problem related to the usage of InputVerifier and JPopupMenu.
    Consider the following scenario:
    - A frame composed of two components: a JTextField and a JComboBox
    - An InputVerifier that was set in the JComboBox (and in its associated JTextComponent)
    - A JPopupMenu which is enabled by a right mouse click over the components of the frame.
    The verify() method of the InputVerifier class is executed every time the focus is on the JComboBox and is requested by other component.
    Suppose that the focus is on the JComboBox, and a right mouse click is executed over this components. In summary, we have:
    1) The method verify() of the InputVerifier associated to the JComboBox is executed
    2) The focus changes from the JTextComponent (associated to the JComboBox) to the JRootPane (associated to the JTextComponent (that is associated to the JPopupMenu)).
    Now suppose that, the user clicks in the JTextField component (note that the JPopupMenu is visible and has the focus). What happens is that the focus goes from the JRootPane -> JTextComponent (associated to the JComboBox) -> JTextField.
    Despite the focus flow through the JTextComponent, the Swing plattaform, when executing the runInputVerifier() in the JComponent context, get the JRootPane component as the focusOwner instead of the JTextComponent.
    In this way, the Swing platform tries to invoke the InputVerify of the JRootPane (that is set with "null"), and the JComboBox InputVerifier is not executed as expected.
    It works as if the focus is flowing from the JRootPane directly to the JTextField.
    However, if the user clicks on the JComboBox before clicking in the JTextField, the Swing platform executes the correct InputVerifier, i.e., the one associated to the JComboBox (actually, the one associated to the JTextComponent).
    Any thoughts to solve this problem?
    Thanks

    A plus information, I am using jdk1.5.0_22.

  • Focus problem when JPopupMenu is shown

    I have compiled and ran the following 'JPopupTest.java' in JDK 1.4.1 on Windows. Kindly conduct the two tests as given below
    First Test :
    ============
    The class shows an editable JComboBox and a JButton when visible. Now click the down-arrow button of the JComboBox and make the drop-down popup visible. Then click on the "OK" button while the popup is visible. The popup gets hidden and a dialog is displayed as it should be.
    Second Test :
    =============
    Run the appilcation again. This time type something in the editable textfield of the JComboBox. A custom JPopupMenu with the text "Hello World" would be visible. Then click on the "OK" button while the popup is visible. The expected dialog is not shown. The custom JPopupMenu gets hidden. Now click on "OK" button again. The dialog is visible now.
    My Desire :
    ===========
    When I click on the "OK" button in the "Second Test" the JPopupMenu should get hidden and the dialog gets displayed (as it happens for the "First Test") in one click.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import javax.swing.plaf.basic.*;
    import java.util.*;
    public class JPopupTest extends JPanel implements DocumentListener, ActionListener
         JButton button;
         Vector vec;
         JComboBox jcombobox;
         JPopupMenu jpopupmenu;
         BasicComboBoxEditor _bcbe;
         JTextField jtextfield;
         public JPopupTest()
            vec = new Vector();
               vec.addElement("One");
            vec.addElement("Two");
            vec.addElement("Three");
            vec.addElement("Four");
            vec.addElement("Five");
            vec.addElement("Six");
            vec.addElement("Seven");
            vec.addElement("Eight");
            vec.addElement("Nine");
            vec.addElement("Ten");
            jcombobox = new JComboBox(vec);
            jcombobox.setEditable(true);
            _bcbe = ((BasicComboBoxEditor) jcombobox.getEditor());
            jtextfield = ((JTextField) _bcbe.getEditorComponent());
            jtextfield.getDocument().addDocumentListener(this);
            add(jcombobox);
            button = new JButton("OK");
            button.addActionListener(this);
            add(button);
            jpopupmenu = new JPopupMenu();
            jpopupmenu.add("Hello World");
         public void insertUpdate(DocumentEvent e)  {changedUpdate(e);}
         public void removeUpdate(DocumentEvent e)  {changedUpdate(e);}
            public void changedUpdate(DocumentEvent e)
            if(!jpopupmenu.isVisible())
            jpopupmenu.show(jcombobox, 0, jcombobox.getHeight());
            jtextfield.requestFocus();
         public void actionPerformed(ActionEvent e)
            JOptionPane.showMessageDialog(this, "OK button was pressed");
         public static void main(String[] args)
            JPopupTest test = new JPopupTest();
            JFrame jframe = new JFrame();
            jframe.getContentPane().add(test);
            jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            jframe.setSize(200,100);
            jframe.setVisible(true);

    See the code below with auto complete of text. When button is pressed, still TF gets focus after JOptionPane dialog is closed.
    -Pratap
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.plaf.basic.*;
    public class JPopupTest extends JPanel implements ActionListener {
         JButton button;
         Vector vec;
         JComboBox jcombobox;
         BasicComboBoxEditor _bcbe;
         JTextField jtextfield;
         MyComboUI comboUi = new MyComboUI();
         public JPopupTest() {
              vec = new Vector();
              vec.addElement("One");
              vec.addElement("Two");
              vec.addElement("Three");
              vec.addElement("Four");
              vec.addElement("Five");
              vec.addElement("Six");
              vec.addElement("Seven");
              vec.addElement("Eight");
              vec.addElement("Nine");
              vec.addElement("Ten");
              jcombobox = new JComboBox(vec);
              jcombobox.setEditable(true);
              jcombobox.setUI(comboUi);
              add(jcombobox);
              button = new JButton("OK");
              button.addActionListener(this);
              add(button);
              _bcbe = ((BasicComboBoxEditor) jcombobox.getEditor());
              jtextfield = ((JTextField) _bcbe.getEditorComponent());
              jtextfield.addCaretListener(new CaretListener() {
                        public void caretUpdate(CaretEvent e) {
                             if (!jcombobox.isPopupVisible() && jtextfield.isShowing() &&
                                       jtextfield.hasFocus()) {
                                  jcombobox.showPopup();
                             String text = jtextfield.getText().toLowerCase();
                             int index = -1;
                             for (int i = 0; i < jcombobox.getItemCount(); i++) {
                                  String item = ((String) jcombobox.getItemAt(i)).toLowerCase();
                                  if (item.startsWith(text)) {
                                       index = i;
                                       break;
                             if (index != -1) {
                                  comboUi.getList().setSelectedIndex(index);
                             } else {
                                  comboUi.getList().clearSelection();
                   jtextfield.addKeyListener(new KeyAdapter() {
                        public void keyPressed(KeyEvent e) {
                             if (e.getKeyCode() == e.VK_ENTER) {
                                  Object value = comboUi.getList().getSelectedValue();
                                  jcombobox.setSelectedItem(value);
                                  jcombobox.hidePopup();
         public void actionPerformed(ActionEvent e) {
              JOptionPane.showMessageDialog(this,"OK button was pressed");
              jtextfield.requestFocus();
         public static void main(String[] args) {
              JPopupTest test = new JPopupTest();
              JFrame jframe = new JFrame();
              jframe.getContentPane().add(test);
              jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              jframe.setSize(200,100);
              jframe.setVisible(true);
         public class MyComboUI extends BasicComboBoxUI {
              public JList getList() {
                   return listBox;

  • Multiselect item in a SQL/Report received No data found msg

    I am having a problem with retrieving rows from a table with a multiselect item.
    I am using the INSTR function in my SELECT but it only works for one value not two values.
    I am use an anonymous PL/SQL block in a report region:
    Begin
    V_Q:= 'select "ID","FIRMID","FIRM_NAME","ADDRESS1","ADDRESS2","CITY","COUNTY","STATE","ZIP",
    decode("PHONE",null,null,''('' || SUBSTR("PHONE",1,3)|| '') '' || SUBSTR("PHONE",4,3)||''-''|| SUBSTR("PHONE",7,4)) as "PHONE",
    decode("FAX",null,null,''('' || SUBSTR("FAX",1,3)|| '') '' || SUBSTR("FAX",4,3)||''-''|| SUBSTR("FAX",7,4) )as "FAX","EMAIL","ETHNICITY","GENDER"
    from "FIRMS" "F"
    where 1=1 ';
    /********************* this is the code in which I am having a problem ***********/
    If V('P1_COUNTY') is not null then
    v_Q := v_Q || ' AND ' ||'INSTR('':''||v(''P1_COUNTY'')||'':'', '':''||"COUNTY"||'':'') > 0';
    end if;
    APEX_COLLECTION.DELETE_COLLECTION (
    p_collection_name => v_collection_name );
    :P1_Q := v_q;
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
    v_collection_name,
    v_q );
    End;
    I am using APEX 2.2 with Oracle 9.2
    I ran the same query in SQL*Plus and it worked. I received data for multiple selections (2).
    Why did it work in SQL*plus and not in APEX?
    Was this a reported bug in APEX 2.2? Was this corrected in APEX 3.0(.1)?
    Can someone please help, I am completely perplexed!
    Robert

    Oops...
    I found the error. INSTR works perfectly. The problem was that I used where clause referencing the COLLECTION which did not have the INSTR builtin function.
    Sorry about that.
    This is now closed.

  • Multiselect list in APEX 3.2.1.00.12

    Hello,
    I'm having troubles with a multiselect list that could potentially return a very large result set. I have a function called 'GET_LIST' that basically calls the apex_util.STRING_TO_TABLE(p_string,p_delimiter); function since the multiselect list returns a colon delimited string. If I try to select all of the values on the list I get the following message:
    Bad Request
    The request could not be understood by server due to malformed syntax.Are there any known workarounds to this issue?
    Thanks in advance!
    ~Jake

    Do any pros out there have a suggestion for this? My multiselect list has over 35,000 entries in it for certain owners. It is doubtful that anyone would ever select them all but if they should happen to they would receive an error.
    The list of values (P10_ACCTS) is simply
    select a.account_name d, a.account_id v
               from accounts a
             where a.owner = :P10_OWNERI then display a report that uses the results of the select list in the where clause:
    and (account.id in (select column_value from table (GET_LIST(nvl(:P10_ACCTS,'::'))))GET_LIST is defined as:
    CREATE OR REPLACE FUNCTION GET_LIST (
       p_string      IN   VARCHAR2,
       p_delimiter   IN   VARCHAR2 DEFAULT ':'
       RETURN vc_array_1 PIPELINED
    IS
        l_string     varchar2(32000);
        l_array     wwv_flow_global.vc_arr2;
    BEGIN
       l_array := apex_util.STRING_TO_TABLE(p_string,p_delimiter);
       for i in l_array.first..l_array.last loop
          pipe row (trim(l_array(i)));
       end loop;
       return;
    end;I believe that my limitation is the 'l_string varchar2(32000);' I need (in some cases) to be able to pass over 100,000 characters. I've tried converting GET_LIST to use a clob instead of varchar2 but have yet to be successful in implementing that approach.
    THanks in advance!
    Edited by: jhammer on Oct 15, 2010 3:13 PM

  • How can I distinguish a JMenuItem , JPopupMenu and TopLevelMenu?

    I used the following methods to get the component who (a menu)gains the focus:
    JComponent com = JFrmame.getFocusOwner();
    or
    MenuSelectionManager menuMgr = MenuSelectionManager.defaultManager();
    MenuElement[] menuPath = menuMgr.getSelectedPath();
    if(menuPath != 0) {
    JComponent comp = Array.get(menuPath, menuPath.length-1); // this is the item with the focus
    then I need to use getAction() to get the menuItem's action. But how can I filter JMenuItem and JPopUpMenu from TopLevelMenu (JMenuBar item) ?
    Thanks!

    The instanceof may provide the simplest solution, since JPopupMenu, JMenuBar and JMenuItem don't have any kind of ancestor relationship with each other.if (comp instanceof JPopupMenu) {
        // Popup
    } else if (comp instanceof JMenuItem) {
        // Item
    } else if (comp instanceof JMenuBar) {
        // Bar
    } else ...?Hope this helps,
    -Troy

  • Can we have a multiselect box in OIM forms?

    Hi guys,
    How can we have a multiselect in the object form.As I can see default form doest support this.
    Is there any way we can include one.
    phil

    There isn't direct way to doing this, but you can use child forms for multi-select option. Having child-forms in request forms isn't that user friendly - so alternative to that would be modify the default Lookup field behavior to have check boxes instead of Radio - buttons. This behavior can also be controlled per field basis.
    You may want to look at tjspForm.jsp and tjspLookupFormTiles.jsp.
    - Aman

  • Change the color of seperator in JPopupMenu

    hi all,
    i want to change the color of the seperator in JPopupMenu?
    how to do this?
    pls help...
    -Soni

    try this :
    UIManager.put("Separator.foreground",Color.red);
    SwingUtilities.updateComponentTreeUI(this);

  • Problem with Drag & Drop and multiselection in tables

    Hi,
    we have a problem concerning drag and drop and multiselection in tables. It is not possible to drag a multiselection of table rows, as the selection event is recognized or handled before the drag event. So before the drag starts, the selection will be changed and only a single row is selected at the position where you started the drag with a mouse click.
    There was also a java bug with the id 4521075 regarding this problem a couple of years ago. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4521075.
    This bug has been resolved but in our application we have not enabled drag by setting setDragEnabled(true) on the table as we have an own implementation of a DragSource (which is the table component), and a DragGestureRecognizer to control mimetype and data to be dragged.
    So my question is: Is there any solution for this case without calling setDragEnabled(true) on the table? Or is it possible to enable drag on the table and override some method where the drag recognition happens and the transferable object is created?
    Thanks,

    Thanks for reply,
    Steps to reproduce the problem:
    1) user clicks the ascending sorting icon in the table(the button get disabled after sorting the table).
    2) After sorting user drag and drop some row over another row.
    3) Now the table is no longer sorted.
    4) If user again wants to sort the table now, he cannot do it because the sorting button is still disabled.
    So I want the user to sort the table again, without refreshing the page
    Thanks and Regards,
    Tarun

Maybe you are looking for