How to disbale a group of checkboxes when i select one check box WEBDYNPRO

Hi Friends,
Can any body help me how to disbale a group of checkboxes when i select one check box WEBDYNPRO Abap
Also can any body tell me how to handle chain endchain type of scenario in WEBDYNPRO Abap
Thank you..
Sai

Hi
In the context tab , create 2 context attributes ca_attr1 and ca_attr2   of type WDY_BOOLEAN under a context node cn_node
now in ur Layout , bind the ENABLE property of CheckBoxGroup UI Element with this attribute ca_attr1
bind the ENABLE property of CheckBox UI Element with this attribute ca_attr2
create a action for ur Checkbox , for the OnToggle property of ur checkbox
in OnactionToggle , check if ca_attr2 is 'X' , set ca_attr2 to ' ' ( for disable)
this can be done by code wizard , press control +f7 and use read/set context attributes , use get_attribute and set_attribute methods
// if ca_attr2 is 'X'
DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
    DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
    DATA ls_cn_node TYPE wd_this->element_cn_node .
    DATA lv_attr  LIKE ls_city-ca_attr2.
    lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
*   get element via lead selection
    lo_el_cn_node = lo_nd_cn_node->get_element(  ).
*   get single attribute
    lo_el_cn_node->get_attribute(
      EXPORTING
        name =  `CA_ATTR2`
      IMPORTING
        value = lv_attr ).
// if lv_attr2 is 'X' , use set_attribute method for ca_attr1
IF lv_Attr EQ 'X' .
DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
    DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
    DATA ls_cn_node TYPE wd_this->element_cn_node .
    DATA lv_attr  LIKE ls_city-ca_attr.
*   navigate from <CONTEXT> to <CN_VISIBLE> via lead selection
    lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
*   get element via lead selection
    lo_el_cn_node = lo_nd_cn_node->get_element(  ).
*   set single attribute
    lo_el_cn_node->set_attribute(
      EXPORTING
        name =  `CA_ATTR1`
        value = ' ').
ENDIF.
regards,
amit

Similar Messages

  • Uncheck one check box when we select other check boxes

    Hi All,
    This might be very simple question for experts. I just want to unselect one check box (this check box is to select 'ALL' and this will be selected by default) when we select any other check box (for individual categories) on same region. Can any one please suggest me how to implement this?
    Thanks in advance.
    Regards,
    Hari

    Hi Shijesh,
    Thanks for you reply.
    I'm using two items (check boxs), like P1_ALL and P1_TEST. I want to unselect P1_ALL when we select P1_TEST check box.Both the check boxes contains single value in List of values. For this I wrote script like
    <script type="text/javascript">
    function uncheckAll(pthis)
    elm = document.getElementsByName('P1_ALL');
    if(pthis.checked)
    elm.checked = false;
    </script>
    And in HTML form element attribute of P1_TEST, I have 'onclick=uncheckAll(this)'. But for some reason when I select 'P1_TEST', P1_ALL check box not getting un-selected.
    I would be grateful if you suggest what needs to correct in this one.
    Regards,
    Hari

  • How to select One Check Box at a time

    Dear All
    I have 10 records in details blok and also I have 10 check boxes .
    I want user can only check one check box at a time .
    For example If first record I have checked and i am trying to check the last record then the first record UNCHECKED and the last record will checked .
    Like how redio buttons work ..
    How can i do that ..?
    I have done like this :-
    1st I have declare a global variable in PRE_FORM :GLOBAL.CNT := 'N';
    Then
    WHEN-CHECKBOX-CHANGED trigger
    IF CHECKBOX_CHECKED(EMP.CHK') THEN
        IF :GLOBAL.CNT != N THEN
            :EMP.CHK := Null
       HERE what to write ???
            RAISE FORM_TRIGGER_FAILURE;
        ELSE
            :GLOBAL.CNT := Y;
        END IF;
    ELSE
        :GLOBAL.CNT := N;
    END IF;Edited by: LuKKa on Aug 29, 2012 1:12 PM
    Edited by: LuKKa on Aug 29, 2012 1:13 PM

    LuKKa,
    An easier method would be to use a Calculated Field to summarize the value of your CHECKBOX Item. For example, add a non-table item (call it SUM_CHECKED) to your detail block and do not assign it to canvas - so it will not be displayed. Then set the following properties of the SIM_CHECKED item:
    Database Item = No
    Calculation Mode = Summary
    Summary Function = Sum
    Summarized Block = <YOUR DETAIL BLOCK>
    Summarized Item = <YOUR CHECKBOX ITEM>
    Next, you will need to change your Detail Block property Query All Records to YES (this is required for the Calulated Item).
    Now, make sure your checkbox is data type NUMBER and has the following minimum properties set:
    Data Type = Number
    Maximum Length = 1
    Initial Value = 0
    Value when Checked = 1
    Value when Unchecked = 0
    Check Box Mapping of Other Values = Not Allowed or Unchecked
    Now, in your Checkbox Item's When-Checkbox-Changed trigger add code similar to this:
    IF ( CHECKBOX_CHECKED('YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM') ) THEN
       IF ( :YOUR_DETAIL_BLOCK.SUM_CHECKED > 1 ) THEN
       --Reset the checkbox
       :YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM := NULL;
       MESSAGE('You can only check one item.');
       Message(' ');
       RAISE Form_Trigger_Failure;
       END IF;
    END IF;I have confirmed this method works and it is more efficient than looping through your records to see if other checkboxes are checked.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Why is it when I select my personal preferences/user/login items, that when i select the check box for items to NOT pop up on my dock when i restart and start my macbook air 11 inch that they still continue to?

    why is it that every time i start up my macbook air and when i restart it, that the new office with word and those three other apps constantly pop up? even though i went to personal preferences/users/login items, and selected the box that clearly says "items to NOT be brought up when logging in" ?

    If you don't want to start Office automatically when your Mac starts, see > http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/how-do-i-prev ent-microsoft-office-2011-word-from/dd5b8b17-8397-4e7c-b635-79b9c976c4ab?msgId=f 00ac42a-e4fe-43aa-83d7-16ccd35a0d8a
    Also, on System Preferences > Users & Groups > Login Items, select all items related to Office and press - button to delete them

  • How to disable one check box when another is checked

    Hi, I'm a first time user.
    i am trying to make text fields appar and dissapaer when check boxes are ticked. but only alow one check box to be active at one time. 
    I am making a simple form in Acrobat pro 9,
    I have two check boxes Checkbox1 & Checkbox2.
    I have two text fields Textfield1 & Textfield2
    i have added actions to checkbox1 & checkbox2 to 'hide or show' the text fields.
    Action --> on focus (checkbox1) show/hide field (textfield1) is hide
    Action --> on focus (checkbox1) show/hide field (textfield2) is show
    oposite
    Action --> on focus (checkbox2) show/hide field (textfield2) is hide
    Action --> on focus (checkbox2) show/hide field (textfield1) is show
    problem 1 - how to disable checkbox1 when checkbox 2 is ticked.
    or disable checkbox2 when checkbox1 is ticked.  
    my other problem is that this action has the same effect for ticking or unticking the checkbox.
    thanks in advance to anyone who can help.
    can you please write your answer in simple terms. Basically this is the first time i have used acrobat pro so please dont assume any knowledge at all. thansk very much .

    First, I would experiment with just check boxes and learn their properties and how they can interact.
    Have you tried using the same name for 2 check boxes and assign a different "export value" to each check box.
    Have you looked at the values a check box or boxes have when checked or un-checked?
    Have you looked at how the various actions for a field work?

  • How to Select each check box values in a group of records

    Hi,
    I have a requirement in forms 10g. In that form there are 10 records are displaying each record has one check box is there if i click the check box on record number one and record number three and do some changes in the text field(adjustment field is number data type) then finally I want to see the total on one field called total amount.
    In this my question is how to select particular records in a group of records? and finally these selected records are inserted into one table.
    Because I am not able to fetch these records at a time.
    Is there any Array to define a record group to fetch each of them individually for example Rec[1],Rec[2]...like that if yes please suggest me the steps how to do this.
    Thanks in advance
    Prasanna
    Edited by: user10315107 on Dec 17, 2008 11:44 PM

    I'm sorry, but i didn't get your requirement in detail.
    Do you want to do the summing of the selected records in forms ? Or do you just want to know which records are selected and then process them?
    If you want to process the selected records in sql you could use an object-type to store the list of id's (of whatever primary key you use), loop over the block to fill it, and then afterwards process them.
    For this approach, first create an object-type in the database:
    CREATE OR REPLACE TYPE ID_LIST AS TABLE OF NUMBER;
    /Then, in forms you could do something like this to fill a list of id's:
    DECLARE
      lIds ID_LIST:=ID_LIST();
    BEGIN
      GO_BLOCK('MYBLOCK');
      FIRST_RECORD;
      LOOP
        EXIT WHEN :SYSTEM.RECORD_STATUS='NEW';
        IF :BLOCK.CHECKBOXITEM="CHECKEDVALUE" THEN
          lIds.EXTEND(1);
          lIds(lIds.COUNT):=:BLOCK.PRIMARYKEYITEM;
        END IF;
        EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
        NEXT_RECORD;
      END LOOP;
      -- Now you can use the object-list in SQL like :
      INSERT INTO MYNEWTABLE (cols..)
      SELECT (cols..)
        FROM MYOLDTABLE
       WHERE ID IN (SELECT COLUMN_VALUE FROM TABLE(lIds));
    END;Edited by: Andreas Weiden on 18.12.2008 18:17

  • How to invoke an event when i select one of the items in my JComboBox

    Can any one help me for doing this,i have a combobox in a panel,when i select one item in the combobox some text fields below the combobox need to be disabled,that disabled components vary with the item selected,i try to do this by using event listener but some how i could not get invoke the event,pl some one help me for this,any help would be appreciated.
    Regards.

    The block:
    ivjJComboBox1.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    ivjJComboBox1_mouseClicked(e);
    usually should be included in your constructor or init method.
    The method:
    void ivjJComboBox1_mouseClicked(MouseEvent e){
    String s = (String)ivjJComboBox1.getSelectedItem();
    System.out.println(s);
    should be outside your constructor or init method.
    So it should be:
    public class yourClassName extends xxxxx implements xxxxx
    public yourClassName (...) {
    ivjJComboBox1.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    ivjJComboBox1_mouseClicked(e);
    void ivjJComboBox1_mouseClicked(MouseEvent e){
    String s = (String)ivjJComboBox1.getSelectedItem();
    System.out.println(s);

  • HT2534 I bought an ipod touch at the pawn shop and I am needing to know how to put my ID in it when there's one already there

    I bought an ipod touch at the pawn shop and I am needing to know how to put my ID in it when there's one already there

    Restore it and set it up as new.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • How do I change an apple Id when the wrong one appears

    How  do I change an apple id, when the wrong one appears

    On your Mac/PC open iTunes (make sure it is updated). On the tabs on the left click on "iTunes Store". This will change the window on the right to the iTunes store. The top right corner should have your Apple ID or Sign In written. If there is an Apple ID written click on it and Sign Out. The corner should then change to "Sign In".
    Now click on Sign In and sign in with the wrong/incorrect Apple ID that you no longer wish to use or update from.
    Once logged in, click on the down arrow that shows when you move the pointer on the top right corner where it should now show the apple id, and select Account.
    The page that opens up should have a section called "iTunes in the Cloud" with a tab on the side saying "Manage Devices".
    Click on Manage Devices. Its should list your iPhone or iPad that you no longer wish to use with this Apple ID. And click Remove.
    Once its confirmed click "Done" and from the top right corner select Sign Out.

  • How to keep the selection as the old when I select one and click the submit

    maybe it is a HTML problem,but I still ask for help here!
    When I select one option in the form's element-select and submit it ,I want to keep the JSP page as old, but I can't .I also use cookie and bean.The problem is still being.

    store the parameter names and their corresponding values in a variable, say Hashtable. After you do the submit, you can retrieve the values from the hashtable.
    example:
    if you have these parameter names:
    "name", "age"
    then you can do:
    Hashtable h = new Hashtable();
    h.put("name", request.getParameter("name"));
    h.put("age", request.getParameter("age"));Have this hashtable available in your response jsp so you can retrive the old data.

  • How to validate that only one check box is checked in detail block

    Hi All,
    I am using oracle Forms 10G on windows.
    I need help on how to validate that only one check box is checked in detail block. I have multiple records in the detail block and I have check boxes for each record in the detail block.
    I have a button to select the values from the detail records where the check box is checked. But I want to make sure that only one record is check not more than one.
    How do I validate this on a push button trigger?
    Thanks

    When I've done this kind of thing, I create a Form level variable of TYPE number and then add or subtract to this variable as I check and uncheck the checkboxes. If the value of the variable is 1, then you know that only one checkbox is selected. If the value is greater than 1, then you know the user has selected more than one check box. You could also add code to your When-Checkbox-Changed trigger to test the variable and instruct the user to un-check selected record before selecing a new record.
    With respect to the Form level variable, you can use a GLOBAL, PARAMETER or Program Unit package specification. I prefer to use the PU Package Spec as this method has a smaller memory footprint. For example, in the Program Unit node of the object navigator create the following;
    /* Form variables package spec */
    PACKAGE Form_Vars IS
      CheckBox_Cnt     NUMBER := 0;
    END;Now in your When-Checkbox-Changed trigger...
    BEGIN
       IF ( Form_Vars.CheckBox_Cnt = 0 ) THEN
          Form_Vars.CheckBox_Cnt  := Form_Vars.CheckBox_Cnt  + 1;
       ELSE
          /* it's assumed the value is greater than 0 */
          Message('Please uncheck selec ted record before choosing a new record.');
          RAISE Form_Trigger_Failure;
       END IF;
    END;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Feb 3, 2011 10:15 AM

  • Popup when clicking on a check box

    Hi All,
    I have created a report which has check boxes for each record. Now I need to do the following.
    1. When clicking on the check box cause a pop up box to appear
    2. This popup box will allow you to enter a date.
    3. The date is then populated into a field linked to that record
    I don't expect a answer but just some hints or links that would help.
    Thanks
    Nahim

    Thanks Pleiadian,
    I'll do that for the date field. I have another scenario as follows:
    1. You have multiple records with 4 check boxes on each record
    2. Each records represents a job.
    3. The check boxes allow you to accept ,reject,start or complete the job.
    4. When selecting "Reject" a pop up box needs to appear to allow the user to enter a rejection reason.
    Could you please give me some idea on how to get this done.
    Thanks for you help
    Nahim

  • How to select the check box automatically

    Hi All,
    I'm using forms 6i.I have 3 check boxes.If i Select the 2nd and 3rd check box then the fist check box should be selected automatically.The 2nd and 3rd check boxes are mutliarray block attached to each other while the !st check box is not attached to them. while Can someone please tell me how to write the code for this?
    With Regards,
    Gowtham
    Message was edited by:
    Gowtham1232
    Message was edited by:
    Gowtham1232

    It's not very clear, but I think that having a WHEN-CHECKBOX-CHANGED trigger on checkbox2 and checkbox3 that says
    IF :checkbox2 = 'Y' and :checkbox3 = 'Y' THEN
      :checkbox1 := 'Y';
    ELSE
      :checkbox1 := 'N';
    END IF;assuming 'Y' is the checked value of each checkbox and 'N' the unchecked.

  • How to install Windows on MAC? (Can't see the check box "Install or remove Windows 7 or later version" on Boot Camp Assistant)

    I want to install Windows 7 on my MBP mid 2012 but in Boot Camp does not appear the check box: "Install or remove Windows 7 or later version". I continued with making the USB bootable with Windows 7 but then when I restart and boot with the USB I still can't install Windows because then I receive an error: ""Windows cannot be installed on this disk. The selected disk is of GPT partition style."  
    From OS with Boot Camp I didn't manage to make a partition for Windows instead I made one with Disk Utility (formated FAT).
    After booting from USB that partition was also formated into NTFS necessary for Windows. Still the same error.
    Any idea how to install Windows on my MAC?

    My Windows copy is a X64.
    MBP mid 2012 with Mountain Lion 10.8.3.
    Model Identifier:          MacBookPro9,2
      Processor Name:          Intel Core i5
      Processor Speed:          2.5 GHz
      Number of Processors:          1
      Total Number of Cores:          2
      L2 Cache (per Core):          256 KB
      L3 Cache:          3 MB
      Memory:          4 GB
      Boot ROM Version:          MBP91.00D3.B08
      SMC Version (system):          2.2f41
    Should have:
    MacBook Pro (13-inch, Mid 2012)
    MacBookPro9,2
    MBP91.00D3.B08 (EFI 2.9)
    If you are refering to this I tried to update the EFI version (I see only SMC version 2.9 as a diferrence of what I have)  but on installing I received an error: "This software is not supported on your system."

  • FRM-40501 Error When Attempting To Change Check Box Value

    I am getting a FRM-40501 error when attempting to update/change a check box value. There are a few factors in my form setup that could be the problem, I will list them below:
    My initial problem was that my INSERT statement would not trigger to fire (based on an IF statement) when my check box value was not initially set to the value of 'Y', even though the initial value was set to 'Y' in the property palette (value when checked was set to 'Y' and value when unchecked was set to 'N'). So, to remedy this I placed a specific literal select of 'Y' and aliased it back to the name of my check box name in the data block query, like: SELECT 'Y' CB_SELECT_SCHOOL FROM user_schools. Then I changed the check box to a database item (value to Yes when it was No before my "SQL select cheat" in the data block query). This made the initial value 'Y' and satisfied my IF statement before my INSERT statement in my trigger. However, now I can not update the check box item.
    Does anyone know a better way to satisfy the initial value of my check box to 'Y', even though in the initial value parameter for my checkbox is set to 'Y' and forms is not really setting the initial value (when the check box is not set to a database item)?
    Thanks in advance.
    Kyle

    I have fixed my issue.
    I have reverted the check box to not be a database item, removed the "SQL cheat" of selecting 'Y' aliasing my checkbox name in the datablock SQL, and changed the initial value of 'N' in the check box property palette. This will force a change by the user making the check box value of 'Y', satifying my insert when-button-pressed trigger to fire and update the selected row.

Maybe you are looking for