Second list of items from selected item in first list

Hi all,
I have 2 dropdown lists in my jsp page. i am retrieving data from database for my first list box. the second list box data should be displayed when user select an item from the first list. the selected item from first list is necessary to get another list of items in second list. i dont want to use any buttons or submits. i want to redirect the data to the same page to get another list when user click one option from first list. Thanks in advance for any suggestion.

use ajax or store the data in javascript array

Similar Messages

  • HT5429 How do I remove items from the "current location/to" list?

    In MAPS, how do I remove items from the "current location/to" list?

    Hit the book icon and you will see delete all option. I have not found a way to delete them one at a time.

  • How to create a report  based on selected item from Select list?

    Hi,
    I have created a tables_LOV based on:
    select table_name d, table_name r from user_tab_cols
    where column_name like '%_type%'
    Then I created a page item ListOfTables,  Display as select list and pointing to tables_LOV.
    I run the page, and i can select the table i want from the drop down list.
    How to create a report  based on the selected item? (ex: select * from selected_table)
    many thanks in advance
    Salah

    Hi Salah,
    Allright, have a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report
    I think that simulates what you're trying to accomplish. I've set up the simplest method I could think of.
    The report is based on an apex collection. If you are not familiar with that, you should study the documentation: APEX_COLLECTION
    To recreate my example you should:
    1) create an (interactive) report on your collection
    SELECT *
       FROM APEX_collections
    WHERE collection_name = 'MY_COLLECTION'
    2) create a page_item select list for the tables you want to display (in my case this is called "P38_TABLES" )
    3) create a dynamic action that triggers on change of your select list page_item. The dynamic action must be a PL/SQL procedure perfoming the following code:
    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
    end;
    Make sure you add your page_item to the "Page Items to Submit" section.
    4) Add an extra true action that does a refresh of the report region.
    Here are two pictures describing the da:
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA1.png
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA2.png
    Good luck and regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • Drop Down List - Setting the Default Selected Item

    I have a drop down list in my application that gets populated by a remote database.  When you select an item from the list, a screen full of thumbnails is populated based on the selection.  We have decided that when the user gets to this component in our air application, that it looks too empty and barren.  All that displays is a drop down list with an empty screen.  So we would like to set a default setting for the drop down list so that when the user gets to this component, a screen full of thumbnails is awaiting them and they can change it if they want.  My first instinct was just to set the selectedIndex property of the drop down list to the value that we want as the default, and that works, but it only changes the label in the dropdownlist, it doesn't actually populate the screen with the thumbnails.  That is because when an item is selected, it has to be commited to the drop down list by a CLOSE event that then sets off the close handler that populates the screen with thumbnails.  So after looking at the documentation, I found that there is a method called closeDropDown that states the following:
    closeDropDown
    method
    public function closeDropDown(commit:Boolean):void
    Close the drop-down list and dispatch a DropDownEvent.CLOSE event.
    Parameters
    commit:Boolean — If true, commit the selected data item.
    When I use this method, nothing happens.  In fact if I add a listener for the CLOSE event, the close event isn't getting fired.  So I am a little befuddled.  The only thing that I can figure is that I am setting the selectedIndex and not the selectedItem before I call the closeDropDown method, and if you look above, the documentation vaguely states that that "If true, commit the selected data item".  Do I need to set the selectedItem and not the selectedIndex?  If so, I am not exactly sure how to do this since I am using a service to populate my drop down list which kind of makes the dataprovider a little unclear to me in the code because it gets replaced by an AsyncListView.  Here is what I have.
    <fx:Script>
         <![CDATA[
            protected function dropDownList_creationCompleteHandler(event:FlexEvent):void{
              getAllAudio_descriptionsResult.token = audiodescriptionsService.getAllAudio_descriptions();
              getAllAudioResult.token = audioService.getAllAudio();
         private function audioDescriptionsCallResponderHandler(event:ResultEvent):void {
              audioDesc = event.result as ArrayCollection;
         private function audioCallResponderHandler(event:ResultEvent):void {
              audio = event.result as ArrayCollection;
              audioDescDropDown.selectedIndex = 2;
              audioDescDropDown.closeDropDown(true);
         ]]>
    </fx:Script>
    <fx:Declarations>
         <s:CallResponder id="getAllAudio_descriptionsResult" result="audioDescriptionsCallResponderHandler(event)"/>
         <audiodescriptionsservice:AudiodescriptionsService id="audiodescriptionsService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
         <s:CallResponder id="getAllAudioResult" result="audioCallResponderHandler(event)"/>
         <audioservice:AudioService id="audioService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
    </fx:Declarations>
    <s:DropDownList id="audioDescDropDown" x="43" y="65" width="185" height="34" fontFamily="MyriadProSemiBold"
                        fontSize="15" skinClass="skins.VideoSkins.Video.DropDownSkin"
                        color="0xE6E6E6" selectionColor="0x054F7C" rollOverColor="0x007CBA"
                        creationComplete="dropDownList_creationCompleteHandler(event)" labelField="audioCatName"
                        itemRenderer="renderers.DropDownList3" close="DDLAudioCloseHandler(event)">
         <s:AsyncListView list="{getAllAudio_descriptionsResult.lastResult}"/>
    </s:DropDownList>
    I would really appreciated hearing from anyone who has experience or insight into setting a default for a drop down list and actually forcing it to execute that default selection.  Any thoughts at all would be helpful.  Thanks!

    I don't see your close handler in the code you posted, so if you provided it and I missed seeing it, please forgive me.  I'm a bit unclear on why the open and close of your dropdown list is so critical to your functionality.  It seems to me that the page of data would be tied to the item selected in the drop down (which to my mind is the only purpose for the drop down to be there).  So why do you first need to open and close the drop down, rather than just taking the selected value and doing whatever you'd normally do with it to populate that page?
    What I'm getting at is that I'd expect that page to be a separate component that would just have a property for the selected "thing", and that you could populate it either manually, as I suggested, or through the close handler on your drop down--I wouldn't think that there should be a need to go through the close handler every time.  Even if you don't have it implemented the way I'm thinking, you may want to think about whether you need to go through the close handler every time, or whether you could break it out so that the close handler simply determines which item to select, then jumps to another function that actually does something with the selected value.  That way, you don't have to go through the overhead of opening and closing the drop down if you need to change its value programmatically.
    HTH;
    Amy

  • Flex 3 Prevent duplicate items from being dropped into a list with drag and drop

    If you do not want to specify "dragMoveEnabled='true'", what
    is the best way to prevent dragging a duplicate item onto the list?
    I found this post
    http://thanksmister.com/?p=21
    , but had some problems integrating it when using a list, and
    wondered if there is an easier way to ensure two of the same item
    cannot be dragged into the drop container?

    SQL> CREATE TABLE T AS SELECT * FROM
    (SELECT LEVEL MID FROM DUAL CONNECT BY LEVEL <= 3),
    (SELECT LEVEL RID FROM DUAL CONNECT BY LEVEL <= 3)
    table T created.
    SQL> SELECT * FROM T
    MID RID
      1   1
      1   2
      1   3
      2   1
      2   2
      2   3
      3   1
      3   2
      3   3
    9 rows selected
    SQL> CREATE UNIQUE INDEX IDX_T ON T(DECODE(RID,1,MID))
    unique index IDX_T created.
    SQL> INSERT INTO T VALUES(1,2)
    1 rows inserted.
    SQL> insert into t values(1,1)
    Error starting at line 9 in command:
    insert into t values(1,1)
    Error report:
    SQL Error: ORA-00001: unique constraint (STEW.IDX_T) violated
    00001. 00000 -  "unique constraint (%s.%s) violated"
    *Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
               For Trusted Oracle configured in DBMS MAC mode, you may see
               this message if a duplicate entry exists at a different level.
    *Action:   Either remove the unique restriction or do not insert the key.

  • Preventing user from selecting item in JTree

    Does anyone know how to prevent the user from being able to change the cell in the tree that is currently selected?
    I have a JTree that the user can select items from but I want them to be able to click on a button and no longer be able to select an item in the tree until another button is pressed.
    Any ideas?

    hi
    i hope the code below helps ur purpose
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    public class Frame1 extends JFrame {
    JPanel contentPane;
    BorderLayout borderLayout1 = new BorderLayout();
    JPanel jPanel1 = new JPanel();
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    MyTree jTree1 = new MyTree();
    boolean blnSelection = true;
    /**Construct the frame*/
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    /**Component initialization*/
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    contentPane.setLayout(borderLayout1);
    this.setSize(new Dimension(466, 319));
    this.setTitle("Frame Title");
    jButton1.setText("jButton1");
    jButton1.setBounds(new Rectangle(83, 254, 79, 27));
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton1_actionPerformed(e);
    jPanel1.setLayout(null);
    jButton2.setText("jButton2");
    jButton2.setBounds(new Rectangle(177, 256, 89, 23));
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton2_actionPerformed(e);
    jTree1.setBounds(new Rectangle(93, 30, 252, 195));
    contentPane.add(jPanel1, BorderLayout.CENTER);
    jPanel1.add(jButton1, null);
    jPanel1.add(jButton2, null);
    jPanel1.add(jTree1, null);
    /**Overridden so we can exit when window is closed*/
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton1_actionPerformed(ActionEvent e) {
    blnSelection = false;
         jTree1.setSelectionPath(null);
    void jButton2_actionPerformed(ActionEvent e) {
    blnSelection = true;
    class MyTree extends JTree implements TreeSelectionListener
         public MyTree()
              super();
              init();
         private void init()
    this.getSelectionModel().setSelectionModeTreeSelectionModel.SINGLE_TREE_SELECTION);
              this.addTreeSelectionListener(this);
              this.setEditable(false);
         DefaultMutableTreeNode selectedNode = null;
         public void valueChanged(TreeSelectionEvent evt)
    if(!blnSelection)
         this.setSelectionPath(null);
         else
         TreePath tpSelectedTreePath = evt.getNewLeadSelectionPath();
         this.setSelectionPath(tpSelectedTreePath);
    cheers

  • Populating 2nd drop down list based on the selection of the first using Access DB...

    I have a form that I would like to have the user select the first drop-down list as populated from a data source, but them have the subsequent selection choice dependent on the first. For instance, if they select "administration" for their division, the department numbers shown in the second box would only contain those with "Administration" listed as their division. I have all of this information in my Access table.
    I've seen this possible by storing all of the information in a script. i.e.- listing each division and department. The only problem is that we have over 300 departments and making any changes would be very tedious in an in-form script. Is there any way to have this automatically reference a table in Access?
    Thank you,
    Mike

    In the current version of the portal, it is not possible as you cannot do code-behind on postbacks. If you want more flexibility, you need to write your own front-end that uses the FIM Service webservices...
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

  • How to get value in Second Drop Down based on selection made in first dropd

    Hi All,
    I have a table with first two columns as dropdown.
    The values in first drop down are fixed. However the value in second dropdown should be populated based on selection made in first .
    e.g
    First Column had different departments say IT, SALES, HR.
    Based on department selected I have to populate employee of that department.
    For first dropdown I have taken Drop down by index.
    What should I select for second drop down and achieve desired functionality? Please guide.
    Regards,
    Madhvika

    Hi
    Use drop down by key for fixed values IT, SALES, HR. create on_select action for that drop down.
    in on_select method code like this..
      DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
      DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
      DATA ls_segment1 TYPE wd_this->Element_segment1.
      data lt_segment1 type wd_this->elements_segment1.
      DATA lv_segment TYPE wd_this->Element_segment1-segment.
      data lr_column type ref to cl_wd_table_column.
    navigate from <CONTEXT> to <SEGMENT1> via lead selection
      lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
    get element via lead selection
      lo_el_segment1 = lo_nd_segment1->get_element( ).
      lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
    get all declared attributes
      lo_el_segment1->get_static_attributes(
        IMPORTING
          static_attributes = ls_segment1 ).
    now ls_segment1 contains your first drop down selection value.
      DATA : lv_dropdown type string .
      lv_dropdown =  ls_segment1-segment.
      if lv_dropdown = 'IT'.
    // here fill your second drop down based on IT value.
    endif.
    Hope it solves.
    Cheers,
    Kris.

  • Removing items from the Open With Menu List!

    I'm not sure how this happened but when I select the Open With
    option I have multiple listing of the same applications. there must be a list that is displayed that may be edited.. Can someone help?

    Follow the instructions in this thread.
    (19138)

  • How to add up items from multiple sheets and popup lists

    Based on the "Personal Budget" template
    I want to use the Personal Budget template and modify it to my needs — I want a total and 12 sheets (for each month).  The template example has a total page and 1 data sheet by default.
    What would the formula be to get data for a category, across all of the 12 sheets?
    For example:
    A8 is "Travel"
    SUMIF Jan::Transactions::Category,A8,Jan::Transactions::$Amount)
    This gives me the amount of all "travel" expenses for the sheet "Jan" but how would I have the combined total for Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec?
    What would the formula look like?
    Sorry, not very well versed in spreadsheets.
    Thanks!
    — James

    Instead of splitting the data into twelve pieces that you then have to struggle to consolidate, how about entering it all in the existing data table on the Transactions and then adding the summary table on Budget sheet that pulls the data by month?
    Note the use of SUMIF in the SUMMARY BY CATEGORY table. You would use the same idea to "filter" by month as well. Because you more than one condition now (ie. you want to filter by month and category), you use SUMIFS instead of SUMIF.
    The easiest way may be to insert a Month column in column E of the data table with the formula =MONTH(A) . This will give the month number.
    Then create at new summary table that looks like this:
    The formula in B2, copied right and down:
       =SUMIFS(Transactions::$D,Transactions::$C,$A2,Transactions::$E,B$1)
    (For demo purposes I copied the existing entries in the template's data table and pasted them below themselves, giving two months of data.  In the new rows I changed the month from 11 to 12.  So that's why you see values here only for months 11 and 12, and exactly the same.)
    SG

  • Selecting item from selection control

    Hi,
      i have one issue in the va01 trasaction.
      There is screen called Choose an unloading Point.
      i am going to Seach and giving invalid and recording so.
      My reqirement is if given value found it should continue.
      if not it it suppress the error dialog and script should be exit by writing information to log.
      Can any one suggest me the solution.
      Thanks in Advance.
    Regards,
    sreedhar d

    HI Sree,
    You should do this before the recording(something like a preparation part).
    Use INLINE ABAP, to find out if you have the desired entry(as far as I see what you are asking for is a customizing entry, which should be stored in a table/view) in the database table/View.. If you find the value continue till recording else
    IF ( <VALUE NOT FOUND> ).
    E_ERROR = 'X'.
    LOGTEXT ( 1 , <Message> ).
    EXIT ( '' = '' ).
    ENDIF.
    PS: here in LOGTEXT, 1 is to show the log as error, you can use 0(ZERO) if you want to get the log with green result.
    Hope this helps.
    Best regards,
    Harsha

  • How do I update items on a 2nd list based on data changes on the first list

    Hi everyone, let me start by saying I am still learning about Sharepoint - what it can or can't do etc. I am also not a developer by nature. So it may take me little while to understand. Thanks for your patience and help.
    I am currently working on Sharepoint 2007.
    I have a Booking form and an Inventory form.
    With the booking from I have a column where the user can select the inventory item to book e.g. BookedItem
    With the inventory form I have a Availability column. (i.e. It's a text column populated with either Yes or No)
    I've also got a view on the front page of my Sharepoint page showing users what is currently available for booking. This is just a filtered view of Inventory form. Basically it displays items where Availability = Yes.
    What I would like to do is have a workflow that automatically updates the Availability in the Inventory list when an item is booked in the Booking Form.
    E.g Item A is booked via the Booking Form. Item A's availability in the Inventory List should now the 'No'.
    Users should now no longer be able to see Item A as an available item on my Sharepoint page.
    I am struggle with linking the two lists and making the corresponding updates. I'd appreciate it someone could help me out.
    Thanks.

    Hi Anil
    Thanks for the reply. I've attempted the steps in the link as shown but if the issue I am getting is because I am running Sharepoint 2007 instead. The example that you've linked is based on Sharepoint 2010.
    Just to be clear I am following
    "3. Now add one action : "Set Variable"
        Variable Name : CarId & Type : Integer
        Assign with CurrentItem's CarName (which one is lookup column for Car Name)"
    I am unable to assign the new variable to the ItemName. Nor do I get the option of a lookup for integer like shown in the example link.

  • Read credit memo item from worklist item

    Hi All,
    My requirement is In CIC approver open the approval workitems & select reject then execute decision. At the time i have to do two thing:
    1. Need to display reject reason popup window. ( This part i have doen now popup is display)
    2. From the popup he can select one reason then need to make that work item credit memo as rejected ( Menas make all the line item as rejected).
    Here how can we read that workitem credit memo number and how can we get all item entity.
    Pleae provide some guid on this.
    Thank you,
    Chabalan

    Thanks all, now i have header guid & object (Credit Memo) number, using these value how to get item entity.
    Whereas i am in another component not in item component.
    From this component i have to read the item entity. Can you please give some idea how to proceed this.
    Thank you,
    Cha

  • How to populate the value of SHUTTLE item from MULTISELECT item

    Hi,
    I am have following 2 items
    P1_TEXT1 - multiselect
    P1_TEXT2 - shuttle
    I have populated the value of P1_TEXT1(multiselect) and then want to assign the same value to P1_TEXT12 (shuttle)
    I am using following Javascript function to assign the value of P1_TEXT1 to P1_TEXT2 but it's not working??
    $x('P1_TEXT2').value = $x('P1_TEXT1').valuethanks,
    Deepak
    Edited by: Deepak_J on Dec 4, 2009 3:28 PM

    Hi Jari,
    I modified the earlier script as shown below. It's working perfectly fine as per my requirement.
    Pl let me know if these changes are fine OR is there is any modification we need.
    <script>
          var ob  = $x('P1_TEXT1');
          var ob2 = $x('P1_TEXT2_LEFT');
          var ob3 = $x('P1_TEXT2_RIGHT');
          // added this piece as per your suggestion..
          var g_myShuttle = null;
          if(!flowSelectArray){
            var flowSelectArray = [];
          flowSelectArray[flowSelectArray.length] = "P1_TEXT2_RIGHT";
          g_myShuttle = new dhtml_ShuttleObject 
          ("P132_HDWR_DEVCE_ID_LEFT","P1_TEXT2_RIGHT");
          // Remove all values
          g_myShuttle.remove_all();   
          // added this FOR LOOP, which will make every thing on the LEFT side unselected initially
          for (var j = 0; j < ob2.options.length; j++)
              ob2.options[j].selected = false;
          for (var i = 0; i < ob.options.length; i++)
                 for (var j = 0; j < ob2.options.length; j++)
                    if(ob2.options[j].value == ob.options.value)
    ob2.options[j].selected = true;
    var g_myShuttle = null;
    if(!flowSelectArray){
    var flowSelectArray = [];
    flowSelectArray[flowSelectArray.length] = "P1_TEXT2_RIGHT";
    g_myShuttle = new dhtml_ShuttleObject
    ("P1_TEXT2_LEFT","P1_TEXT2_RIGHT");
    g_myShuttle.move();
    </script>
    Thanks,
    Deepak                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Unable to remove item from login items

    how can I remove this wdquicklook the - sysmble is not grayed out any ideas?
    http://i83.photobucket.com/albums/j291/dqboy87/loginitems_zps45db739c.jpg

    Download and run Find Any File to search for a file named "WDQuickview".
    FAF can search areas that Spotlight can't like invisible folders, system folders and packages. If there's a WDQuickview file hiding somewhere on your hard drive FAF will find it. The symbol might be indicating that the file/item is missing. FAF will tell you if it is. 
    If you find the file with FAF you can drag it from the search window to the Trash bin in the Dock.  Reboot and check the System/Accounts preferences again.
    See this topic for some more info on removing it: How to remove WD Quick View icon from...: Apple Support Communities
    OT

Maybe you are looking for

  • Oracle 11g on Windows server 2003

    I've oracle 11g installed on Windows Server 2003. I have installed oracle 11g twice, so wasn't sure how to uninstall one version without effecting the other. There are a few databases set up, none of which are now working. Trying to connect using mys

  • How to mount an AP1142n above a suspended ceiling?

    Hello, Interested to find out what:   1) LWAP adapter   2) Mounting hardware/bracket(s) were used for any LWAP 1142n deployments above a suspended ceiling.  Our installation will not work with the included t-rail mounting hardware and are looking for

  • Language setting for ipod 160

    How do you set the Language on the ipod 160 my ipod was preset when I took it out of the box I need it set to US English I order it from apple.com

  • What is snapshot too old error.

    Hi, Could you please explain the snapshot too old error detail manner. And i how can i solve the problem. Thanks, MuthyaM

  • REST API List Column Names

    I have a column in a list named 'Position'. But I can't use that name in the REST query for some reason. I did some investigation and found it's named something else in the API. For example this doesn't work: http://dev.spdev.local/sites/test/_api/we