Conditionally checking checkboxes

Hi.
I need a checkbox for which the checking operation is conditional -- in certain illegal states of the containing frame and its components none of the checkboxes should change their state. I do not want to use checkbox.setEnabled(false). The changeListener does not sound good either.
(Also I had to prevent combobox popup from appearing on same conditions. I was able to solve that by implementing my own ComboBoxUI with show() method modified. I can't think of a similar approach for the checkboxes at the moment.)
Any ideas how to do it?

That sure is an interesting link, rkconner, thank you, I think I'll need to read something like this soon.
As for current case -- I have a really complex page (lots and lots of them, actually), with some fields disabled, and others enabled. Some fields need verification and the focus (generally) should not be able to leave such field unless the field value is legal. The legality is determined by querying a remote database.
When I click an enabled checkbox, the verify() method for recently focused field starts. If the remote query returns negative response, I shouldn't be able to change the checkbox value, until the recent field is considered legal. So, I can't use setEnabled(false) for the checkbox, because, when I change the illegal value to a legal one, the checkbox should become changable instantly. I mean, I should be able to launch the verification process by clicking the checkbox.
That's why I'm looking for another solution. Still looking :)

Similar Messages

  • How i can make in the same action 2 condition (check the exemple down)

    how i can make in the same action 2 condition (check the exemple down)
    this is an example and I really thank you for helping me(any body plz)
    http://www.2shared.com/file/DPpdgC_a/Exemple_Edge.html

    1. make each rectangle a symbol  (Symbol_1 and Symbol_2) and uncheck autoplay()
    2. Delete your code on the click event and put the following code in compostion ready:
    var toggle=true;
    function btnPlay(){
              if (toggle){
                        toggle=false;
                        sym.getSymbol('Symbol_1').play();
              else{
                        toggle=true;
                        sym.getSymbol('Symbol_2').play();
    sym.$('Ellipse').click(function(){
              btnPlay();

  • I want to create new popup block screen in CO11N SCREEN for condition check

    in standard CO11N screen after completing filling the required field , when i click the save icon I NEED TO CREATE THE POBUP BLOCK SCREEN FOR CONDITION CHECKING WHICH CONSIST
    YES    NO    CANCEL
    IS THERE ANY FUNC MODULES TO DO THIS? OR IS IT POSSIBLE BY CODING?

    Don't rely on 'Preview'.
    Share/Export as .ibooks file and then drag that to iTunes and sync to your iPad.
    Still no joy, find a pre-processing recipe ( that includes export for iPad) that doesn't spoil the quality in the process.
    Just keep in mind that low quality in means low or lower quality out, in this example.

  • Condition Checking

    Hi,
      Is there anyway i can ensure, let's say my "net income" is larger than 2 million before the user can submit the data? is there some sort of condition checking or locking mechanism that does this?
      any input on this?
    cheers

    You can have something like that for submission
    please check into help online the follow link
    http://name of your application server/osoft/help/admin/helpstart.htm#Setting_application_set_parameters.htm
    It is not exactly what you want but you can do something using this approach.
    You can change the work status settings for each application. Changing the work status settings involves identifying three to five 'work status dimensions,' and then defining specific members for the remaining non-work status dimensions used for validation purposes. You must determine which account you will use for validation of the data at the time the work status is changed. The validation account must be ”0u201D at the intersection of the 3-5 variable members and the members designated for the non-work status dimensions.  If the account is not ”0u201D then the owner/manager cannot set the work status.  This is an option feature.
    The dimensions you select as the work status dimensions are the variables in your business process. For example, the entity, category, and time might change based on who is submitting data, but the account, data source, reporting currency, etc., remains static. (Typically, Time is a work status dimension since data is usually segregated based on time.)
    For example, lets say that you set Entity, Category, and Timeas your work status dimensions for a given application. You then set your other current view members to the following:  Account: Validation; DataSrc: TotalAdj; Intco: All_Intco; and RptCurrency: LC. In addition to assigning work status dimensions, you also specify which dimension is the 'owner dimension.' The owner dimension includes the Owner property. The owner property determines who can edit a work status setting. The following figure shows this setup, where Entity is the Owner dimension.
    A user attempts to post data to the current view shown in the following table. The system checks the 'validation' account to make sure the intersection equals zero (0). If so, the data is posted, and a success message is displayed. The user can now set the work state to 'submitted' on that intersection. Subsequent submissions to that exact intersection will be rejected. Users can only send data to the same intersection if the Entity, Category, or Time member changes.
    Account
    <All>
    Category
    Actual
    DataSrc
    <All>
    Entity
    SalesNE
    Intco
    <All>
    RptCurrency
    <All>
    Time
    Feb.2007
    To change work status settings for applications
    From the Admin Console, expand the Application node.
    Expand the application for which you want to change the work status setting.
    Select Work Status Settings.
    In the Work State column, select Yes for each dimension you want to use to control the work status settings. Select Owner for the dimension that contains the Owner property.
    In the Member Validation column, select a member for each non-work status dimensions. (Use the browse button to open the Member Lookup.)
    From the action pane, select Save Work Status Settings.

  • How to loop to get value of all checked checkboxes?

    I am a non-techic trying to fix something for work. Your help is really appreciated.
    I have a form with checkboxes (4 check boxes). Everything sumbits fine. SQL db is updated perfectly and data is displayed on webpage w/o any problem. However when I go to edit an entry, on the edit form, (if more then one checkbox were selected oringally), non of the checkboxes are checked. If only one checkbox was selected orinally, that checkbox is selected. What am I missing? I know I am suppose to use loop to get all checked checkbox values, but I have no idea how.
    Here is my code so far.
    <input type="checkbox" name="colors" value="red" <cfif #getResultSet.colors# EQ "red">checked</cfif>>red
        <input type="checkbox" name="colors" value="blue" OR<cfif #getResultSet.colors# EQ "blue">checked</cfif>>blue
        <input type="checkbox" name="colors" value="green" OR<cfif #getResultSet.colors# EQ "green"></cfif>>green
        <input type="checkbox" name="colors" value="yellow" OR<cfif #getResultSet.colors# EQ "yellow">checked</cfif>>yellow

    JayYaj wrote:
    However when I go to edit an entry, on the edit form, (if more then one checkbox were selected oringally), non of the checkboxes are checked. If only one checkbox was selected orinally, that checkbox is selected.
    You've given all the checkboxes the same name. Give them each a unique name and you will be able to access them individually. Current standards also require a unique ID, which can (but does not have to) be the same as the name.
    The "OR" characters in your code are not doing anything. You can safely delete them.

  • Method to uncheck a checked checkbox

    Hi there,
    I have been trying to uncheck a checked checkbox but haven't found a way to do so. Is there a java method to do it? I've tried setState(false) but it doesn't work.
    Thanks in anticipation :)
    kiat

    Hi, dieterjanssen
    Thanks for your advice :)
    Yes, I do have an itemListener added but I don't have the itemStateChanged method. How do I implment that method?

  • Show report conditionally by checked checkbox

    All,
    I created 8 checkboxes:
    ‘Source’
    STATIC2:a;1,b;2,c;3,d;4,e;5,f;6,g;7,h;8
    Depending on c (checked) I want to show a report.
    Condition of Report:
    ‘PL/SQL function Body Returning a Boolean’
    begin
    if (:c= '3') then
    return true;
    else
    return false;
    end if;
    end;
    But it doesn’t work.
    Any help appreciated,
    Cheers
    lucio

    I believe if you select multiple items it wills separate them with a ':'. So try this:
    begin
       if (instr(:P1_SOURCE,'3') != 0) then
          return true;
       else
          return false;
       end if;
    end;Replacing :P1_SOURCE with whatever your checkbox is named as.
    Hope this helps,
    Aaron
    Edited by: aaron22 on Dec 10, 2009 7:58 AM

  • Formvalidation conditional on checkbox

    I have a form (payment) where users enter creditcard information. All fields are required.
    Except
    Some users may choose to have their credit card information collected by phone.
    In that case, they check a Checkbox (input name="Later" type="checkbox" id="Later" value="Ph")
    How do I make the validation conditional on the checkbox not being checked?
    This is my validation Script:
    function MM_validateForm() { //v4.0
      if (document.getElementById){
        var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
        for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
          if (val) { nm=val.name; if ((val=val.value)!="") {
            if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
              if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
            } else if (test!='R') { num = parseFloat(val);
              if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
              if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
                min=test.substring(8,p); max=test.substring(p+1);
                if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
          } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
        } if (errors) alert('The following error(s) occurred:\n'+errors);
        document.MM_returnValue = (errors == '');

    Just have the user disable javascript to circumvent the required form fields.

  • Agree to terms and conditions check box

    I am using a checkbox for users to indicate that they agree to the forms terms and conditions. On Submit how can I validate that the box was checked and if not block the Submit process from completing until the checkbox is selected.

    Make the submit button presence 'hidden', add a second button that performs the check box validation and if the validation succeeds, call 'click' on the submit button.
    // form1.page1.subform1.callSubmitBtn::click - (JavaScript, client)
    if (form1.page1.subform1.cb.rawValue == "0") {
       xfa.host.messageBox("Please agree to terms and conditions.","Agree",0);
    else {
       form1.page1.subform1.submitBtn.execEvent("click");
    Steve

  • Imp: event to occur immediately on checking checkbox: points assured

    hi all,
    I am working on a module pool prog . There is a single screen 0900 on which i have a checkbox 'CHK' and two input fields 'IP1' and 'IP2'.
    I have a requirement where i need an event to occur immediately on checking the checkbox on screen without the press of any key.
    Also i have a separate requirement where i need that the data entered into IP1 is immediately copied to IP2 without pressing enter or any other key.
    Points assured
    thanks in advance

    U have defined it in the Screen Painter, Say its name is T1 and the second one is T2.
    In your main prog , declare them as data ( if you have referenced a data element or table field -  keep the type as same).
    so syntax is
    Data : T1 type char20,
              T2 type char20.
    then go to the Flow Logic tab, u ll find PBO and PAI events of the screen.  Create the PAI module and inside it u can wtite
    T2 = T1, may be u ll be having a few conditions on which value of t2 will take value of t1 -- u can put those logic there.
    For further helps, open any standard program say SE38 itslef and click on the screen number and see the codes. U ll understand by urself.
    OK ?

  • Negative Condition checking in read statement

    Hi,
    i have table, which i have to read,  key on which i am going to read that will be determined dynamically. now i have to check the value for the key field is initial or not. i can't use a loop here as it doesn't allow me to mention where condition field dynamically.
    thanks & regards,
    prabhu

    Hi use this:
    DATA: BEGIN OF it OCCURS 0,     "your dynamic table
            field1 TYPE c,
            field2 TYPE c,
          END OF it.
    it-field1 = '1'.
    it-field2 = 'A'.
    APPEND it.
    it-field1 = ''.
    it-field2 = 'B'.
    APPEND it.
    it-field1 = '2'.
    it-field2 = 'C'.
    APPEND it.
    FIELD-SYMBOLS: <struct> TYPE ANY,
                   <comp>   TYPE ANY.
    LOOP AT it ASSIGNING <struct>.   "loop at your dynamic table
      ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <struct> TO <comp>.   "FIELD1 is determined dynamically
      IF sy-subrc = 0 AND <comp> is not initial.  
        WRITE <comp>.   "will write out <comp> for each entry which has non initial value in <comp> (here FIELD1)
      ENDIF.
    ENDLOOP.
    Please note that your <lfs> must hold name 'FIELD1' inside, than you can replace it with below code
      ASSIGN COMPONENT <lfs> OF STRUCTURE <struct> TO <comp>. 
    Regards
    Marcin
    One thing to be added here:
    You can't read table comparing its key field with negative condition NE , only comparison EQ are allowed in READ TABLE statement, that's why I chose above approach.
    Edited by: Marcin Pciak on May 26, 2009 4:51 PM

  • Condition checking in Message Mapping

    Hi
    My scenario has a IDOC coming in XI and gets converted into a flat file
    Idoc Structure
    ControlRecord
    ParentRecord
    Field1
    Field2
    ChildRecord
           Field3
           Field4
           Field5
    Condition is Field2 = 0500 and Field5=""
    If both the conditions are satisfied,then
    For every occurence of child record,parent record needs to be repeated.
    I used "useOneasMany" function to check ,but I am not able to check both the conditions.
    Help needed on how to check these conditions
    Thanks

    Hi,
      Try Like below.
    Field2-----------
       ChildRecord----Use One as many-->@
       Field5-----------
    @----equalsS("0500")----------and----if with out else---then(--@)----Target.
       Field5--length--equalsS("0")--
    If you required else condition then use "if" condition. As per above mapping any one condition fails target field will suppress.
    Regards,
    Prakasu.M

  • Checked checkboxes in Numbers for iPad

    Hi,
    Before submitting feedback to Apple about the following glitch, I’m posting it here to find out whether any Numbers for iOS jockeys have experienced the glitch also.
    In Numbers 09 (2.0.3) under Snow Leopard.8, I imported a spreadsheet created in Excel for Windows (not sure which version), then added a column to one of the worksheets/tabs, and in every row within this column I inserted a checkable checkbox, then saved the file in Numbers 09 format.
    After importing the file into Numbers 1.4 for iOS (on a 1G iPad) via iTunes 10.3.1, I checked the checkbox in some rows. I did this by displaying the virtual keyboard and switching to the one that contains the checkbox, then tapping on the checkbox. This method worked; i.e., a check displayed in each checkbox where I performed these steps.
    After quitting Numbers for iOS, I connected the iPad to my Mac, imported the spreadsheet file to the Mac via iTunes, and opened the spreadsheet file in Numbers 09.
    All checkboxes were unchecked.
    Many thanks in advance!

    I submitted the above info to Numbers feedback.

  • While loop condition check

    Dear All,
    attached is an NI that does the following.
    1. The user inputs a frequency and amplitude range to drive a speaker.
    2. A laser displacement sensor measure the speaker displacement, checks if it is in the desired range, and jumps on to the next frequency, if its not in the desired range it tries another drive voltage.
    The program works fine, the problem is, is that the while loop checks the condition in the beginning or the middle of the loop, therefore if it is in range instead of stoping at that particular amplitude and frequency, it goes to the next amplitdue before going to the next frequency. Since at the begining of the loop execution the condition was different that in the middle.
    How can I force the while loop to read the condition only after the sequence inside has completed.
    Thank you
    Ala
    Attachments:
    AmpFinder.vi ‏431 KB

    Dear All,
    I think this fixes the problem
    Cheers,
    Ala
    Attachments:
    AmpFinder.vi ‏431 KB

  • Condition check in PO

    Hi guys,
    I've a problem: I have a condition type defined "Required" in calculation schema and the condition appear in PO with value zero. How can I do to check if the value is greater than zero ?
    Regards
    Alberto

    when you mark a condition as "Required"  , it only means that  the  condition type must mandatorily appear in the procedure ,  it however does  not check the value at all   ,   in order to check the value  ,  you  need do define Limits for conditions  , you  can define this under customizing for conditions in purchasing.  apart from this, you can also define some routine and assign to the condition type.
    If  the value for that condition is  based on some parameters ( e.g.  plant/ p.org etc)  , then you can define an access sequence and maintain condition records to default the same.
    regards
    Raviraj

Maybe you are looking for

  • General question about classes

    Hi every one, I have an application that works but i'll like to optimize it, regarding about speed and system ressources. For resume and represent diagrammatically the application I wrote, there is a first frame (the main menu) with severals buttons.

  • Condition record exist, but has not been set

    I am creating proforma invoice for STO replenishment delivery. I am getting error log "Billing type contains split criteria, n invoiced:123456789, invoice not required". But I am able to save it. I used all standard settings for copy control and bill

  • Question - is it possible to view Lumix G5 .rw2 files using Lightroom 3.6?

    I'm not great with IT.  I've just about worked out how to use Lightroom 3.6 with my Canon images, then gone and blown it by buying a Panasonic Lumix G5, and Lightroom cannot read its RAW files.  I downloaded Camera Raw 7.2 as the forums seemed to sug

  • How to paste or record to multiple spots

    Scenario. Working with audio files and say i want to record part of the 'hook" to a song and its going to be in three differnt places...after the first vs. second and third ....is there a way to either set it to record the one take in all three place

  • Reinstalled OS X, lost all my info. Can I get it back?

    Okay, long story short: ~ Computer wouldn't turn on past 'starting OS X' ~ Someone suggested putting Installer disks in comp and pressing 'C' and use Disk Utilities to fix it ~ Did so, but also accidentally re-installed OS X ~ Lost ALL my files and p