Problem with Checkbox and Listbox

Hi,
I have a jsp page named auth_Roles.jsp which has an empty Listbox and a hyperlink,on clicking the hyperlink a popup window opens up,which is a jsp page named roleSelect.jsp.In that jsp page there is a textBox and two buttons named "Search" and "Cancel".By typing something in the checkbox when you press Search button Some checkboxes get generated dynamically matching with the Search criteria in the Textbox.These textboxes are generated in a nother JSP named findRoles.jsp.this findRoles.jsp also contains two buttons of type="submit"
Which are Save and Cancel buttons.
Now what i need to do is when i check some of the checkboxes that are generated in findRoles.jsp and click on Save.After that the values that are checked should be there in the listbox of the first JSP page that is auth_Roles.jsp.
Thing is that the whole thing is working but after selecting and saving some checkBox values in the first attempt(i.e when the checked values are reflecting in the ListBox of auth_Roles.jsp) if you try to select something again using the hyperlink in auth_Roles.jsp(Using the sequence of actions i have allready mentioned) the newly checked values are occupying the ListBox in auth_Roles.jsp excluding the values i have allready selected in the first attempt(i.e values selected in the latest attempts are only getting reflected and the previous values are lost from the ListBox).
I want to retain the previously selected values,can anyone provide any code or any suggestion,am very new in java.

Sorry,in the roleselect.jsp page i have to type a string as a search criteria in the textBox not a CheckBox.
Apologise for the error in information.

Similar Messages

  • Problem with checkbox and drop down menu

    I am using DW8 with PHP/MySQL.
    I made a insertion form and a couple of the fields are
    checkboxes and another is a drop down menu. Everything works fine,
    however, when I create an update form and the recordset calls the
    data it doesn't retain its values on those items.
    For example, if I checked a box when inserting the record and
    then call the data up for the update form, the box is not checked,
    making the user believe it was never checked in the first place.
    The same thing goes for the drop down menu. If I have 3
    options in the menu and someone selects the third one, when the
    update form is used it defaults to the first option automatically
    instead of actually calling up the original value selected.

    The fact that two scripts do not work together does not mean
    there is a bug in the RH script. It is simply that they were not
    designed by their respective developers to work together. This
    happens with multiple scripts in any html file.
    Try creating a new project and then importing just this topic
    into it. Does it still have the problem?

  • Problem with checkbox and Event.stop(event)

    Hello,
    I cannot change the checkbox in a row, if the Event.stop(event) is fired on checkbox. My aim is, that the event OnRowClick is stoped, if I change the checkbox in the row.
    <rich:extendedDataTable id="requestTable" value="#{requestListHandler.normalisedRawRequestList}" var="req"
                             rows="#{requestListHandler.limitRows}" selectionMode="single">
                             <a4j:support event="onRowClick" action="#{requestListHandler.viewRequest}">
                                  <f:setPropertyActionListener value="#{req}"
                                       target="#{requestHandler.selectedRequest}" />
                                  </a4j:support>
                            <rich:column>
                                       <h:outputText value="#{req.offerListSize}">
                                            <f:convertNumber type="number" />
                                       </h:outputText>
                         </rich:column>
                             <rich:column id="checkBoxColumns">
                                       <h:selectBooleanCheckbox onclick="Event.stop(event);"
                                            value="#{req.firstInterpreterTimeChecked}"/>
                         </rich:column>
    </rich:extendedDataTable>I know I am using richfaces, but I have problem with sun-ri component <h:selectBooleanCheckbox..../>.
    Have you any idea?
    Manu
    Edited by: Argonist on Jun 16, 2009 8:27 AM
    Edited by: Argonist on Jun 16, 2009 12:25 PM

    I had the same problem. I read you post and was so disappointed that no one had answered you. But I have a good news for you :) My team leader managed to solve this awkward problem.Add to h:selectBooleanCheckbox style="z-index: 20;" so that it is "above" the table row that fires its own onclick event.

  • Problem with checkbox and datatable

    Hi,
    I have a checkbox in one column of the data table. The checkbox is to be disabled if the status (which is another column in the table) is set to Completed. For all other rows, the checkbox is to be enabled. What happens is that, the checkbox is either enabled for all the rows or disabled for all the rows...
    This is how i have implemented it.
    public void setCheck(){
    int rows = dataTable1.getRowCount();
    OrderRunStatusBean osb = new OrderRunStatusBean();
    for (int i =0;i<rows;i++){
    dataTable1.setRowIndex(i);
    osb = (OrderRunStatusBean)dataTable1.getRowData();
    if (osb.getStatusName().equalsIgnoreCase("Completed")){
    dataTable1.setRowIndex(i);
    chkSelect.setDisabled(true);
    else
    chkSelect.setDisabled(false);
    Thanks!!!!
    -Tabitha
    PS
    I'm facing the same trouble with selecting and deselecting a checkbox as well.

    Hallo Tabitha,
    create a method called isDisabled() in your <Page>.java class containing the logic by which you want to disable the checkbox, for example:
         * Getter for property disabled.
         * @return Value of property disabled.
        public boolean isDisabled() {
            TableRowDataProvider trdp = (TableRowDataProvider)getBean("currentRow");
            String category = (String) trdp.getValue("MUSICCATEGORIES.MUSICCATEGORY");
            return category.equals("Rock");
        }This example is connected to a TableRow and returns true when the value of the database field is "Rock".
    Then bind the disabled property of the checkbox to the 'disabled' property:
    Click on the right of the disabled property in the Properties window, select the option 'Use Binding', select the 'Bind to an object' tab, select the Page1.disabled property and click on OK.
    Deploy and run the project.
    Hope this helps.
    Ciao,
    Fabio

  • Problem with checkbox and process

    Hallo,
    I have a checkbox on my page and now I want to create a process that runs when the checkbox is checked.
    What I want to do is: to ckeck wheather the checkbox is check and if this is then to set values.
    I don't know if it is right how I check the status of the checkbox. What I also don't really know how I can decide
    that all field I go through in the loop get the same value from the XYZ-collection. The value should be the last from
    the XYZ-collection.
    Thanks, Jade
    declare
    check integer:=0;
    change integer:=0;
    begin
    check:=:Px_Check;
    if (check <> 0) then change:=1; end if;
    if change = 1 then
    for i in 1..htmldb_application.g_f04.count
    loop
    htmldb_collection.update_member_attribute(p_collection_name=>'XYZ',
    p_seq=>i,
    p_attr_number=>5,
    p_attr_value=>???);
    end loop;
    end if;
    end;

    Hi,
    Taking the two issues separately....
    1 - When dealing with checkboxes, you have to bear in mind that the submit process will only return the values of those checkboxes that have been ticked into the f04 collection (assuming f04 is the column containing your checkboxes). In order to determine which ones they are, you need to get the value (which should be a row number if you've created the checkboxes by using the Row Selector option) and then use that to get to the values on the actual rows. Something like:
    DECLARE
    vITEM NUMBER;
    BEGIN
    FOR i IN 1..HTMLDB_APPLICATION.G_F04.COUNT
    LOOP
      vITEM := HTMLDB_APPLICATION.G_F04(i);
    END LOOP;
    END;Then, within the loop, you can use vITEM as the row number. So, if the user ticked items 1, 4 and 6. G_F04(1) would contain 1, G_F04(2) would contain 4 and G_F04(3) would contain 6. Therefore, for you update statement, you can use vITEM for the sequence number of the item to update.
    2 - When dealing with collections, if you want to get to the last item in the collection, you can get the member count and use that to get to the member:
    DECLARE
    vCOUNT NUMBER;
    vDATA NUMBER;
    BEGIN
    vCOUNT := HTMLDB_COLLECTION.COLLECTION_MEMBER_COUNT ('XYZ');
    SELECT c005 INTO vDATA FROM HTMLDB_COLLECTIONS WHERE COLLECTION_NAME = 'XYZ';
    END;That should get the c005 value for the last item and store it in vDATA. You can then update the ticked items with this value.
    Andy

  • Problem with checkbox and run the get button event continuously

    Hi all,
    I have a checkbox list of 3 sensors. I have used the X-Control (for checkbox) found in the following link for my application https://decibel.ni.com/content/docs/DOC-30558. I have problems to achieve the following.
    Suppose i check Vibration and Strain, I should be able to display both Vibration and Strain data. (I should compare each element of 1d array with the string constant and run the case structure).
    I have to run the GET event continuously to display the data. 
    I have attached the code to the post.
    Please can anyone suggest how to go about this.
    thanks in advance
    Regards,
    KM
    Attachments:
    Main page Enhancements for Create and Load.vi ‏69 KB

    Hi Bob_Schor,
    I tried using the approach you mentioned. I cant run continuously. I am not able to figure out where i am going wrong. I have attached the updated vi. 
    Hi Hooovahh,
    The link you have posted seem to work with LV2013. I am currently using LV 2011. Can you please update it to 2011. Is OpenG necessary for this?
    Regards,
    KM
    Attachments:
    Main page Enhancements for Create and Load.vi ‏77 KB

  • Problem with checkbox and "if" & "else if" statement

    Hi, i have got something like this:
    if (this.rawValue=="0" ){
      app.alert("0");
      this.resolveNode("Circle1").presence = "hidden";
      this.resolveNode("cross").presence = "visible";
    else if (this.rawValue=="1"){
      app.alert("1");
      this.resolveNode("Circle1").presence = "visible";
      this.resolveNode("cross").presence = "hidden";
    else{
      app.alert("2");
       this.resolveNode("Circle1").presence = "hidden";
      this.resolveNode("cross").presence = "hidden";
    I set default position on neutral state. Values are default: on=1, off=0, neutral=2.
    When i am clicking on my check box button there works only "on" (1) and "neutral" (2) state. "off" state is not working and i don`t know why.
    Please help me with that.

    Hi,
    Here is the form back to you: https://acrobat.com/#d=qiBnkcpRnPWxA5hokFXvQw.
    I have tightened the script, but that was not the main problem. The issue was that the checkbox was on the Master Page and had a default value of neutral. Some objects on the Master Page, like checkboxes with default values and buttons, can misbehave when the form is relaid out (layout:ready event).
    If you have a look at the form you will see that the objects on the Design Page behave as expected. However similar objects on the Master Page will revert to default everytime the layout:ready event fires. This has already been logged with Adobe.
    I would recommend moving the objects to a Design Page or maybe use a dropdown instead of the checkbox.
    Niall

  • Problem with Checkbox and Button components....(Simple one)

    Hi all,
              As I am new to flash and ActionScript 3.0,I have the following issue regarding Flash.
              I have 2 swf files whose contents are as follows: First.swf file contains a check-box (instance name:my_checkbox).    Second.swf file contains a button component(say,label name of Submit and with instance name: submit_btn).      
             Now, my requirement is: Whenever I click the submit_btn button, then the check_box must be get selected/visible. If I click it once again, then it must get deselected/invisible. The process must be continued till I stop the click-event on button component.
       Reply me as soon as possible..  Thanks in advance...
    Srihari.Ch

    Hi Ross Ritchey,
                    I am attaching the two .fla files(with ActionScript 3.0 code in respective layers) that are resultant to your reply. (viz., CheckDemo.fla &&ButonDemo.fla respectively). Please check them once..
                       The functionality (i.e., When ButtonDemo.swf file is executed and the Submit button("myBtn") is clicked, the Checkbox component(s) present in "CheckDemo.swf" file is getting appeared in "ButtonDemo.swf" and is ready to access. Also, the selection/enability/visibility also works properly).
                       Also, check the added code.I had added all the required code to fulfil the requirement.
                       When I click the "Submit_btn", the checkbox components placed in "CheckboxDemo.swf" file are appearing in "ButtonDemo.swf". Instead, I don't need to get them.
                    So, here my requirement is: " When i click "submitButton" in ButtonDemo.swf file, then the action must be performed to the checkbox component(s) present in CheckDemo.swf file.
    Thanks a lot for your help. I am so happy with your reply, because(As you know, I am new to Flash/AS3), after a long time my is getting forward. And I hope the same form of reply to this mail or issue.
    AS3 code in ButtonDemo.fla:
              var url:String="CheckDemo.swf";
    var urlRequest:URLRequest=new URLRequest(url);
    var myLoader:Loader = new Loader();
    myLoader.load(urlRequest);
    addChild(myLoader);
    myBtn.addEventListener(MouseEvent.CLICK,doChangeCheckbox);
    function doChangeCheckbox(e:MouseEvent):void {
    (myLoader.content as MovieClip).myCheckbox.selected = !(myLoader.content as MovieClip).myCheckbox.selected;
    (myLoader.content as MovieClip).myCheckbox2.enabled = !(myLoader.content as MovieClip).myCheckbox2.enabled;
    (myLoader.content as MovieClip).myCheckbox3.visible = !(myLoader.content as MovieClip).myCheckbox3.visible;
    Srihari.Ch

  • Problem with CheckBox and MovieClipLoader

    I am using the MovieClipLoader and it was working great,
    until I load one of my sections which has a CheckBox in it. Once I
    load that section, the MovieClipLoader is not working correctly
    anymore. Anyone have experience with this? What can I do?

    wow, that fixed my issue! I can't believe that is all I
    needed.
    Thank you so much KGlad! I don't know what I would do without
    your help!

  • Problem with checkbox group in row popin of table.

    In table row popin I have kept Check Box Group.I have mapped  the texts property of checkbox group to the attribute which is under the subnode of the table.the subnode properties singleton=false,selectioncardinality=0-n,and cardinality=0-n.
    if there are 'n' number of records in the table.each record will have its own row popin and in the row popin there is check box group.
    the check box group in the row popin  belongs to that perticular row.
    but the checkboxegroup values in row popins of all the  rows are getting changed to the row which is lead selected.
    The same scenario  (table in the row popin is showing the values corresponding to its perticular row and all the table values in popin are not getting changed to the one lead selected in the main table)is working fine with the table in place of  checkbox group in row popin with datasource property of table  binded to the subnode
    I cant trace out the problem with checkbox group in place of table.
    Please help me in this regard.I have to place check box group in place of table in row popin.
    Thanks and Regards
        Kiran Kumar K

    I have done the same thing successfully with normal check box ui element. Try using check box in your tabel cell editor instead of check box group.

  • Problem with checkbox column in matrix

    Hello.
    I have a little problem with checkbox column in matrix.
    Column is binded to the UserData.
    It has ValOn="Y", ValOff="N".
    I use C++. It is wird problem. In matrix I have 10 columns - scrollbar role and if You want see checkbox column, You must role to the right. If this column is on the screen, and I use:
    checkcell->PutChecked(VARIANT_TRUE);
    then the checkbox is cheched, and if the checkbox isn`t on the screen and I use this comment - it nothing happening.
    I tried to use ValOn="Y", PutChecked...
    The problem i solved if the column is on the screen - if the column is first in matrix or second, but if it`s last I have a big problem.
    My column with checkbox is not editable, but I tried to make it editable, check it, and then make it uneditable - the same efect.
    How can I solve it ?
    Sorry for my english.
    Kamil Wydra

    Hello Kamil,
    I am not sure about your problem, but here is an example of how to use checkbox in UI API.
    First, create the matrix with checkbox column in Screen painter, and the output is an xml file, like this. Type as 121 indicates that it is a check box.
    - <column AffectsFormMode="0" backcolor="-1" description="" disp_desc="0" editable="0" right_just="0" title="Rented" type="121" uid="Rented" val_off="N" val_on="Y" visible="1" width="41">
      <databind alias="U_RENTED" databound="1" table="@VIDS" />
      <ExtendedObject />
    Second, bind the column to table from DB. This is a bug of 2004 Screen Painter, so if you are using 2005 Screen Painter, there is no problem.
    Third, when you open the form, you can check and uncheck the cell.
    BTW, please set the editable of the column to true.
    Hope this helps,
    Nick

  • Problem with checkbox on table component

    Hello i am having a problem with checkbox in table component
    i am developing something like a shopping cart app and i have a checkbox in my table component , i want users to select items from the checkbox to add to thier cart, They can select the items from cartegory combobox , my problem is when they select the items from the checkbox if they select another category the alread selected once do not display in my collection opbject please how can i maintain the state of the already selected items in my collection object

    Hi,
    Please go through the tutorial "Understanding scope and managed beans". This is available at:
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/scopes.html
    The details of the selected items need to be stored in an object that is in session scope.
    Hope this helps
    Cheers
    Girish

  • Problem with JFrame and busy/wait Cursor

    Hi -- I'm trying to set a JFrame's cursor to be the busy cursor,
    for the duration of some operation (usually just a few seconds).
    I can get it to work in some situations, but not others.
    Timing does seem to be an issue.
    There are thousands of posts on the BugParade, but
    in general Sun indicates this is not a bug. I just need
    a work-around.
    I've written a test program below to demonstrate the problem.
    I have the problem on Solaris, running with both J2SE 1.3 and 1.4.
    I have not tested on Windows yet.
    When you run the following code, three JFrames will be opened,
    each with the same 5 buttons. The first "F1" listens to its own
    buttons, and works fine. The other two (F2 and F3) listen
    to each other's buttons.
    The "BUSY" button simply sets the cursor on its listener
    to the busy cursor. The "DONE" button sets it to the
    default cursor. These work fine.
    The "SLEEP" button sets the cursor, sleeps for 3 seconds,
    and sets it back. This does not work.
    The "INVOKE LATER" button does the same thing,
    except is uses invokeLater to sleep and set the
    cursor back. This also does not work.
    The "DELAY" button sleeps for 3 seconds (giving you
    time to move the mouse into the other (listerner's)
    window, and then it behaves just like the "SLEEP"
    button. This works.
    Any ideas would be appreciated, thanks.
    -J
    import java.awt.BorderLayout;
    import java.awt.Cursor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class BusyFrameTest implements ActionListener
    private static Cursor busy = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR);
    private static Cursor done = Cursor.getDefaultCursor();
    JFrame frame;
    JButton[] buttons;
    public BusyFrameTest (String title)
    frame = new JFrame (title);
    buttons = new JButton[5];
    buttons[0] = new JButton ("BUSY");
    buttons[1] = new JButton ("DONE");
    buttons[2] = new JButton ("SLEEP");
    buttons[3] = new JButton ("INVOKE LATER");
    buttons[4] = new JButton ("DELAY");
    JPanel buttonPanel = new JPanel();
    for (int i = 0; i < buttons.length; i++)
    buttonPanel.add (buttons);
    frame.getContentPane().add (buttonPanel);
    frame.pack();
    frame.setVisible (true);
    public void addListeners (ActionListener listener)
    for (int i = 0; i < buttons.length; i++)
    buttons[i].addActionListener (listener);
    public void actionPerformed (ActionEvent e)
    System.out.print (frame.getTitle() + ": " + e.getActionCommand());
    if (e.getActionCommand().equals ("BUSY"))
    frame.setCursor (busy);
    else if (e.getActionCommand().equals ("DONE"))
    frame.setCursor (done);
    else if (e.getActionCommand().equals ("SLEEP"))
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    else if (e.getActionCommand().equals ("INVOKE LATER"))
    frame.setCursor (busy);
    SwingUtilities.invokeLater (thread);
    else if (e.getActionCommand().equals ("DELAY"))
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    System.out.println();
    Runnable thread = new Runnable()
    public void run()
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.println (" finished");
    public static void main (String[] args)
    BusyFrameTest f1 = new BusyFrameTest ("F1");
    f1.addListeners (f1);
    BusyFrameTest f2 = new BusyFrameTest ("F2");
    BusyFrameTest f3 = new BusyFrameTest ("F3");
    f2.addListeners (f3); // 2 listens to 3
    f3.addListeners (f2); // 3 listens to 2

    I've had the same problems with cursors and repaints in a swing application, and I was thinking of if I could use invokeLater, but I never got that far with it.
    I still believe you would need a thread for the time consuming task, and that invokeLater is something you only need to use in a thread different from the event thread.

  • Problem with installing and running some applications or drivers

    When installing and installing some items, towards the end of the installation I get this message:
    /System/Library/Extensions/comcy_driver_USBDevice.kext
    *was installed improperly and cannot be used. Please try reinstalling it or contact product's vendor for update*
    The end result is that some things do not seem to work properly, such as my HP printer. Would anybody have any ideas on how to fix this problem?

    Thank you for your response. Originally, I had a problem with Airport and ended up reinstalling Snow Leopard. Since then, when downloading upgrades etc, such as HP printer drivers, iTunes etc., towards the end of the download when its running the script, I get this message: /System/Library/Extensions/comcy_driver_USBDevice.kext
    +was installed improperly and cannot be used. Please try reinstalling it or contact product's vendor for update+
    Sometimes, the download hangs and is unable to complete. The main problem I've encountered so far with an application is when I use the printer to scan an image via Preview, it's blank: there's nothing there.

  • Problems with outlook and address book contacts: my outlook contacts had around 3,000 entries. Outlook duplicated by itself and now outlook and address book have each over 340,000. What should I do?

    Problems with outlook and address book contacts: my outlook contacts had around 3,000 entries. Outlook duplicated entries and have now 340,000. I reinstalled microsoft office and, thus, outlook, and reinstalled mac OS X system and applications. While I managed to delete outlook contacts so that I can re-sync with my blackberry, the contacts at Mac Address Book were not deleted and still have over 340,000 entries. I do not mind deleting all contacts since I have back up, but I have not been able to delete them. Also, when I go at Address Book and try to delete or merge duplicated entries, the system takes forever and never ends because of such large amount of entries. Worse, when I do so I run out of RAM memory.
    My Macbook pro is just 2 months old.
    What should I do? Is there a way to delete my Mac Address Book without having the problem above?
    Many thanks
    Regis

    zlatan24 wrote:
    For solving out troubles connected with corrupted or lost address book you may use address book recovery. It owns various features such as restoring wab files, it working under any Windows OS. The utility has modern and easy to use interface due to almost every experienced users.
    If it is a windows problem it's not going to run on the OP's MacBook Pro

Maybe you are looking for

  • Font issue in OAF -urgent

    hello friends, i think this is simple, but i could not find solution. 1)i have table region,data is populating fine.want to display one text message above table region with same font of table region column headings. example: here some text(any) as sa

  • How to disable the print option in A. Reader (using JavaScript)

    I need be able to disable the print option from JavaScript code. I know that the print option can be disabled in the "File > Form preferences > PDF Security" option in the main menu but i need to do this from a script into the document ( preferably u

  • Problem synching iPhoto library with iPhone

    I was using OS X Lion synching my iPhoto library with my iPhone 3GS with IOS 4 and everything was working perfect. When I updated to IOS 5 start the problem, because doesn't sync all the photos. It's leaving around 100 photos without synchronization.

  • Reverse Engineering a Droplet

    Is there a way to find out all of the compressor settings in a Droplet? I was given a droplet, but the person who gave it to me doesn't remember the specific settings and no longer has access to the machine it was created on. I tried recreating based

  • Dismiss Alerts from the Lock Screen

    I searched but couldn't find the answer i was looking for. When I get a new text message or a missed call, i get an alert on my home screen which is nice, i like that. What i would like to do is be able to dismiss that alert without sliding to unlock