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

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 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 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.

  • [SOLVED] Problem with netctl and dhcpcd

    Hi everybody,
    I had a problem with netctl and dhcpcd.
    I was using netctl and wifi-menu to connect to wirelless networks with dhcp.
    It worked fine at home, then i went to a friend where it also worked but then i went back home and it failed at every try with those error messages:
    dhcpcd[2718]: version 6.0.5 starting
    dhcpcd[2718]: wlp9s0: rebinding lease of 192.168.1.154
    dhcpcd[2718]: wlp9s0: reject NAK via 192.168.178.1
    dhcpcd[2718]: wlp9s0: soliciting a DHCP lease
    dhcpcd[2718]: wlp9s0: offered 192.168.178.44 from 192.168.178.1
    dhcpcd[2718]: timed out
    network[2659]: DHCP IP lease attempt failed on interface 'wlp9s0'
    systemd[1]: netctl@wlp9s0\xxx.service: main process exited, code=exited, status=1/FAILURE
    systemd[1]: Failed to start Automatically generated profile by wifi-menu.
    systemd[1]: Unit [email protected] entered failed state.
    I figured that dhcpcd tried to rebind an ip that my router rejected and didn't accept the ip that it offered instead.
    The solution was to delete:
    /var/lib/dhcpcd/dhcpcd-wlp9s0.lease
    now how can i configure netctl and or dhcpcd so that won't happen again and that it accepts all ips offered by routers?
    Last edited by Samy (2013-09-04 13:32:13)

    I've had this happen now and again. You can rebind the lease yourself with:
    $ dhcpcd --rebind
    You could also try increasing the timeout by adding
    TimeoutDHCP=
    to your netctl profile/s - see netctl.profile(5) as WonderWoofy suggests. Although I haven't tried the latter.
    Last edited by youngdm (2013-09-01 22:01:05)

  • Problem with Java and Windows (Mainly Vista and UAC)

    Hi all,
    I am having a problem with a program that I've devoloped. The program itself is packaged as a jar and I plan to deploy it across multiple platforms eventually however right now i am only concerned about windows based systems. I have made an installer for a windows baised systems using NSIS to install the software files. I made the installer as I need several java packages to be installed so the program would work (JAI, J3D, JAI ImageIO) and I also require the program to have fileassociations on windows.
    I know that this is not what java is about, however the majority of the users will be on windows baised systems so I've decided that OS specific installers is the best option.
    During the process I have noticed that there are several key problem with java for this type of application!
    The first issue that I have come across is getting file associations to work on java. As a .jar is not an excutable it is not possible to directly associate a filetype with it in java so to overcome this I currently run the program from a .bat files and also the program requires large memory so this also allows me to run the program with -xmx. The batch file that I use is :
    <code>
    cd PATH TO PROGRAM
    start javaw -Dsun.java2d.noddraw=true -Xmn100M -Xms500M -Xmx1000M -jar "PATH TO PROGRAM\program.jar" %1 -vram 134217728
    pause;
    </code>
    Ok so all this appears to work fine and allows windows to have file associations and start the program and thats all works perfectly but this is a non-ideal solution. Has anyone got any advice on improving this?
    The next problem that I have appears to be a problem with Vista and UAC (user access control). When a user installs the program and installs the program into the program files directory I found that the program did not work and kept saying that I did not have access to the files in the current directory. This is a problem as I read and write settings files during program execution.
    On a Vista system UAC prevents file write operations into the Program Files directory unless the program has requested elevated status even if the user is a full administrator. The probem is that there appears to be no real way to achieve this under java that I'm aware of...
    Has anyone else had this probem and has a suitable solution?
    Any advice on these issues would realy be appricated.
    Regards
    Joey

    Ok so i've kinda found a solution, its not ideal but its very good. I found this program called Elevate
    A link to the site I got it was
    http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/03/27/elevate-a-process-at-the-command-line-in-vista.aspx
    This program allows you start java with a UAC dialog for high access using
    Elevate java -jar myjar.jar
    This then allows you to have full access using java... I guess it could be dangerous but it does the job.

  • 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

  • Problems with RAC and XA: Fallback

    Hello,
    we are seing problems with RAC and XA (Tuxedo 11, DB 11.2), specifically encountering "ORA-24798: cannot resume the distributed transaction branch on another instance".
    The first scenario relates to fallback after a RAC node failure. There are two servers, S1 and S2. S1 makes an ATMI call to S2. Both servers are in the same Tuxedo group, using TMS_ORA. RAC is set up for failover (BASIC), no load balancing.
    The sequence is:
    - S1 and S2 are connected to the same RAC node n1. All is well.
    - RAC node n1 fails. S1, S2 and the TMS_ORA all fail over to RAC node n2. After the failover has happened, all is well.
    - RAC node n1 recovers. All is still well (as there is no automatic fallback).
    - S1 (or S2) is restarted (either intentionally or because of a crash). Since n1 is up again, S1 connects to n1. Now we get ORA-24798. Permanently.
    S1 is connected to n1 and S2 is connected to n2. Since both are in the same group, both use the same XA transaction branch. When called, S2 attempts to JOIN the transaction branch that S1 started. But the DB (11.2) does not allow the same branch to span more than one node. Hence the ORA-24798.
    This seems to be a severe limitation in the combination of Tuxedo, XA and RAC. It basically means we still have to use DTP services, even with Tuxedo 11 and DB 11.2. Or are we missing something?
    We could put S1 and S2 into different groups, but that seems to be inefficient, and not practical for a real application (10s of servers).
    I am extrapolating from this that RAC load balancing would also not work, as S1 and S2 could be connected to different RAC nodes.
    Roger

    Roger,
    When using an external transaction manager such as Tuxedo you should still declare Oracle services as DTP services when using Oracle Database 11g. The Tuxedo documentation is not clear about this. The relevant 11gR2 RAC documentation is at http://download.oracle.com/docs/cd/E11882_01/rac.112/e16795/hafeats.htm and states
    "An XA transaction can span Oracle RAC instances by default, allowing any application that uses the Oracle XA library to take full advantage of the Oracle RAC environment to enhance the availability and scalability of the application.
    "GTXn background processes support global (XA) transactions in an Oracle RAC environment. The GLOBAL_TXN_PROCESSES initialization parameter, which is set to 1 by default, specifies the initial number of GTXn background processes for each Oracle RAC instance. Use the default value for this parameter clusterwide to allow distributed transactions to span multiple Oracle RAC instances. Using the default value allows the units of work performed across these Oracle RAC instances to share resources and act as a single transaction (that is, the units of work are tightly coupled). It also allows 2PC requests to be sent to any node in the cluster.
    "Before Release 11.1, the way to achieve tight coupling in Oracle RAC was to use Distributed Transaction Processing (DTP) services, that is, services whose cardinality (one) ensured that all tightly-coupled branches landed on the same instance—regardless of whether load balancing was enabled. Tightly coupled XA transactions no longer require the special type of singleton services to be deployed on Oracle RAC databases if the XA application does not join or resume XA transaction branches. XA transactions are transparently supported on Oracle RAC databases with any type of service configuration.
    A"n external transaction manager, such as Oracle Services for Microsoft Transaction Server (OraMTS), coordinates DTP/XA transactions. However, an internal Oracle transaction manager coordinates distributed SQL transactions. Both DTP/XA and distributed SQL transactions must use the DTP service in Oracle RAC."
    This issue came up earlier this year in another newsgroup thread at https://forums.oracle.com/forums/thread.jspa?threadID=2165803
    Regards,
    Ed

Maybe you are looking for