Check box mandatory in checkbox

hi i have checkbox which is inside my adf table i what this to be mandatory only once e.g in my table i got field firstname,surname,email,and checkbox accounting office,if i check one person as accounting oficer is ok i must not be able to check another person as accounting officer and vice versa if i add values in table and there is no single person tick as accountingoffice i must have error message saying atleast one person must be accounting officer,i did not use the view the value i been created from the bean class,am in jdeveloper 11.1.1.6.0
this is my checkbox
<af:selectBooleanCheckbox id="sbc2"
                                              value="#{row.bindings.accountingofficer.inputValue}"
                                              required="true"
                                              autoSubmit="true"
                                              showRequired="true"
                                              label="Accounting Officer"/>
is doing validation at the moment,even if i did this required="true"

Such a case can be handled when u fire a ValueChangeListener which validates it every time a checkbox is selected or unselected. The method needs to validate against all the records hold up in the iterator or against the DB as required by the usecase.

Similar Messages

  • Check Box Mandatory

    Hi friends,
    i have a check box item, i need to make this item as a mandatory item and this is my LOV for the item
    STATIC:;Y
    i have also given value Required as 'yes' and also i have writtened the validation for it stating that the item is not null....
    But none of it seemed to work...
    Without checking the box, if i pressed submit button means, it is submitting...
    It should not submit without checking the box...
    thanks
    Mini

    I dont know before what the mess had happened...
    Now it is working fine...
    Thanks for your views...
    Regards,
    Mini

  • How to make check box mandatory.

    Kindly help , how can I make a checkbox UI mandatory and have the corresponding label the mandatory * sign.

    Hi Atanu,
    the documentation doesn't show the required-property for the checkbox. That should explain why the required sign isn't shown.
    But it can simply be added manually:
    label.addStyleClass('sapUiLblReq sapUiLblReqEnd');
    Greets,
    ben

  • Multiple checked boxes fill in common text field

    I am attempting to create a form that has various criteria that are checked off (check boxes) and need to populate a common text field within the same form. Presently with action items I am able to design the form so that when only one item is checked it shows up on in the text field at a time not multiples  Any suggestions would help.
    Thank you

    1) In the Binding tab of your checkboxes you can put the On Value to whatever you want to populate the common text field with and the Off Value blank.
    2) Assuming all your check boxes names are CheckBox under the same subform use this script in the calculate event of your common text field:
    var aChkList=[];
    var vChecks = CheckBox.all;
    for (var a=0;a<vChecks.length;a++){
    if (!vChecks.item(a).isNull){
      aChkList.push(vChecks.item(a).rawValue);
    this.rawValue=aChkList.join(", ");
    Kyle

  • Check box selection

    Hi
    I have a problem with check box selection.I query from the database and based on the output from the query i prepopulate the check box with a tick mark.But when the user goes again and deselects one of the check box that was ticked and submits the form , it also includes the unchecked box.the following is the code I have.
    <%
    if (itemStr == 00 ){
    %>
    <td align="center">
    <input type="checkbox" name="build">
    </td>
    <% }
    else{ %>
    <td align="center">
    <input type="checkbox" name="build1" checked >
    </td>
    Then in my form I do
    String[] ar = request.getParameterValues("build1");
    how do i ensure if the user unselects from build1 , it doesnt add that item.
    Help Needed
    Arn

    Notice that this line
    request.getParameterValues("build1");
    is getting the value of the check box. The "checked" attribute is not the value, just the attribute.
    Oddly enough, I just wrote some code to do this today.
    First, add this little javascript method to your page.
    <SCRIPT language="JavaScript"> <!--  //Hide contents from older browsers
    function setHiddenTagFromCheckbox(checkbox, element) {
      if(checkbox.checked) {
        element.value="yes";  
      else {
        element.value="no";  
    // End hiding the contents -->
    </SCRIPT> 2) Add a hidden input field for each checkbox field.
    <input type="HIDDEN" name="prin2signhidden" value = "no">3) Add an onclick handler for the check box
    <input type=checkbox name="prin2sign" onclick="setHiddenTagFromCheckbox(document.formname.prin2sign, document.formname.prin2signhidden)">In your servlet check the value of prin2signhidden instead of the checkbox input.
    The forum is doing odd things to this source code. Any place you see a > you should actually have a "greater than" sign.

  • How tdo you disable a check box

    Hi
    I'm been trying to dynamically disable (grey out) a check box using
    SET_ITEM_PROPERTY('checkbox name', ENABLED, PROPERTY_FALSE);
    This is not working and when I display the value of ENABLED using GET_ITEM_PROPERTY it shows TRUE.
    Can anyone tell me how to dynamically grey out a check box?

    Dear Friend,
    Whatever u have written is perfectly all right. Only thing can be checked is, do you have 2 items with same name if 2 different blocks. if so then provide name of block in Set_item_property statement. This technique works.
    Regards,
    Manish Trivedi
    Software Developer
    India
    [email protected]

  • Why my check box in template show out is rhombus?

    Hi~~
    I want use check box in my template, it result is OK .
    But it shows rhombus, not standard style 「check box」.
    Is font problem?
    I want 「check box」style , not rhombus .
    How can I do ?
    Emily, Thanks

    This check box is picked up from Wingdings font style,
    thsi font is not shipped with XMLP product.
    Alternatively
    you can map it in the Oracle Apps
    through the configuration or have property in Template
    In Template
    Go File ..... Property and Custom tag
    you'll see the property setting required for the check box.
    name: rtf-checkbox-glyph
    type : Text
    value : fontname;9746;9746
    value syntax is like
    fontname;
    <unicode font number for true value’s glyph>;
    <unicode font number for false value’s glyph>
    Use this,
    http://www.alanwood.net/demos/wingdings.html
    Visit this link , check for the character representation for 9745, 9746 in unicode is
    and the one i have said above, is Check box , check & unchecked characters.
    It should work.
    in Wingdings
    for sample "Wingdings;0168;0254"
    168 represents ¨     168
    254 represents þ     254
    This will come in the report.
    Or else same property can b set in Apps level
    in the configuration page, check for administration
    general
    RTF Templates ==> Characters used for checkbox
    set the value , as i said .
    One thing , i was not able to find is
    documentation says
    use this
    "Albany WT J;9746;9745".
    i found link
    http://www.alanwood.net/demos/wgl4.html#w2500
    Using special characters from Windows Glyph List 4 (WGL4) in HTML
    i was not able to find the character for the corresponding number.
    will investigate further.

  • ALV - Desactivate Check box on a specific line

    Hello all,
    I need your help for desactivate my checkbox on ALV GRID on specific line.
    See on the screen shot on the link :
    http://www.casimages.com/img.php?i=101006040322252671.jpg
    See the implementation of my ALV and my Catalog :
    g_container type scrfname value 'BCALV_GRID_DEMO_0100_CONT1',
          g_grid  type ref to cl_gui_alv_grid,
          g_custom_container type ref to cl_gui_custom_container,
          g_event_receiver type ref to lcl_event_receiver,
          gt_fieldcat type lvc_t_fcat,
          gs_layout type lvc_s_layo.
    types: begin of gs_outtab.
    types: checkbox type c.                "field for checkbox
    * §B1.Extend your output table by a field to dis- or enable
    *     cells for input.
    types: celltab type lvc_t_styl.        "field to switch editability
            include structure zpvprevmaj.
    types: end of gs_outtab.
    form build_fieldcat changing pt_fieldcat type lvc_t_fcat.
      call function 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'ZPVPREVMAJ'
        CHANGING
          ct_fieldcat      = pt_fieldcat.
    *§A2.Add an entry for the checkbox in the fieldcatalog
      clear ls_fcat.
      ls_fcat-fieldname = 'CHECKBOX'.
    * Essential: declare field as checkbox and
    *            mark it as editable field:
      ls_fcat-checkbox = 'X'.
      ls_fcat-edit = 'X'.
    * do not forget to provide texts for this extra field
      ls_fcat-coltext = text-f01.
      ls_fcat-tooltip = text-f02.
      ls_fcat-seltext = text-f03.
    * optional: set column width
      ls_fcat-outputlen = 2.
      append ls_fcat to pt_fieldcat.
    endform.                    "build_field
    gs_layout-stylefname = 'CELLTAB'.
      gs_layout-info_fname = 'LINE_COLOR'.
      perform color_line.
      call method g_grid->set_table_for_first_display
        EXPORTING
          is_layout            = gs_layout
          it_toolbar_excluding = lt_exclude
        CHANGING
          it_fieldcatalog      = gt_fieldcat
          it_outtab            = gt_outtab[].
          "it_sort              = it_sortcat.
    Thank you very much for your answers
    Edited by: Emilien P. on Oct 6, 2010 4:10 PM
    Edited by: Emilien P. on Oct 6, 2010 4:13 PM

    I think is no possible with the style i try a little tutorial. I have test the style for normal cell  and in comment i test with the check box and the checkbox always display !! :
    You can easly test this program in SAP and if anyone arrive to no display the checkbox in line 6, he will be my god Thank you :
    report ZCO_AFFACT_TEST.
    TYPE-POOLS: SLIS.
    *- Fieldcatalog
    DATA: IT_FIELDCAT TYPE LVC_T_FCAT.
    DATA: X_FIELDCAT TYPE LVC_S_FCAT.
    DATA: X_LAYOUT TYPE LVC_S_LAYO.
    " FOR DISABLE
    DATA: LS_EDIT TYPE LVC_S_STYL,
    LT_EDIT TYPE LVC_T_STYL.
    " FOR DISABLE
    DATA: BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN,
    POSNR LIKE VBAP-POSNR,
    STYLE TYPE LVC_T_STYL, "FOR DISABLE
    END OF IT_VBAP.
    DATA: LS_OUTTAB LIKE LINE OF IT_VBAP.
    SELECT VBELN
    POSNR
    UP TO 10 ROWS
    INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
    FROM VBAP.
    DATA:L_POS TYPE I VALUE 1.
    CLEAR: L_POS.
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'VBELN'.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    "Delete commentary for test with check box.
    "X_FIELDCAT-CHECKBOX = 'X'.
    X_FIELDCAT-OUTPUTLEN = '10'.
    x_fieldcat-ref_field = 'VBELN'.
    x_fieldcat-ref_table = 'VBAK'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'POSNR'.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-OUTPUTLEN = '5'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    "FOR DISABLE HERE 6ROW IS DISABLED
    SY-TABIX = 6.
    LS_EDIT-FIELDNAME = 'VBELN'.
    LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    LS_EDIT-STYLE2 = SPACE.
    LS_EDIT-STYLE3 = SPACE.
    LS_EDIT-STYLE4 = SPACE.
    LS_EDIT-MAXLEN = 10.
    INSERT LS_EDIT INTO TABLE LT_EDIT.
    LS_EDIT-FIELDNAME = 'POSNR'.
    LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    LS_EDIT-STYLE2 = SPACE.
    LS_EDIT-STYLE3 = SPACE.
    LS_EDIT-STYLE4 = SPACE.
    LS_EDIT-MAXLEN = 6.
    INSERT LS_EDIT INTO TABLE LT_EDIT.
    INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-STYLE.
    MODIFY IT_VBAP INDEX SY-TABIX FROM LS_OUTTAB TRANSPORTING
    STYLE .
    X_LAYOUT-STYLEFNAME = 'STYLE'.
    " UP TO HERE
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
      EXPORTING
        I_CALLBACK_PROGRAM = SY-REPID
        IS_LAYOUT_LVC      = X_LAYOUT
        IT_FIELDCAT_LVC    = IT_FIELDCAT
      TABLES
        T_OUTTAB           = IT_VBAP[]
      EXCEPTIONS
        PROGRAM_ERROR      = 1
        OTHERS             = 2.
    IF SY-SUBRC NE 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Edited by: Emilien P. on Oct 7, 2010 3:09 PM

  • Check Box Selection Questions

    Is it possible to make a selection with a check box, and then have it select a predetermined selection from a drop down menu?
    e.g. If I select "Los Angeles" from a series of office locations in my check boxes, can it automatically select an address from a drop down selection for that Los Angeles Office?
    Thanks for any help in advance
    Aaron

    Notice that this line
    request.getParameterValues("build1");
    is getting the value of the check box. The "checked" attribute is not the value, just the attribute.
    Oddly enough, I just wrote some code to do this today.
    First, add this little javascript method to your page.
    <SCRIPT language="JavaScript"> <!--  //Hide contents from older browsers
    function setHiddenTagFromCheckbox(checkbox, element) {
      if(checkbox.checked) {
        element.value="yes";  
      else {
        element.value="no";  
    // End hiding the contents -->
    </SCRIPT> 2) Add a hidden input field for each checkbox field.
    <input type="HIDDEN" name="prin2signhidden" value = "no">3) Add an onclick handler for the check box
    <input type=checkbox name="prin2sign" onclick="setHiddenTagFromCheckbox(document.formname.prin2sign, document.formname.prin2signhidden)">In your servlet check the value of prin2signhidden instead of the checkbox input.
    The forum is doing odd things to this source code. Any place you see a > you should actually have a "greater than" sign.

  • Reg : Check boxes

    Hi Experts ,
    Im Having 3 select-options on my selection screen !!
    after that im having 3 check boxes.. first checkbox default it wil be selected.
    Now My query is ??
    1. when i execute default the first check box & process has to be exexute ?
    2. pls give an example abt at selsection-screen output.
    Regs,
    Narayana

    hi,
    Chk this sample.
    tables: mara, marc.
    parameters: p_matnr like mara-matnr obligatory,
                p_matkl like mara-matkl,
                p_werks like marc-werks.
    at selection-screen output.
       select mara~matnr mara~matkl marc~werks
              into (p_matnr, p_matkl, p_werks)
              from mara
              inner join marc
              on mara~matnr = marc~matnr
              where mara~matnr = p_matnr.
       endselect.
    Regards
    Reshma

  • Captute the check box and display

    hi,
    In a report program se38, with the output I've displayed the check boxes before every line item, I need to keep a check box in the header row and if I check this one all the check boxes of the line items must be checked and I need to capture the particular line items if checked manually and randomly.
    i did not use grid display its a simple display with write statements.
    (in short if the first(header) check box is checked need to check remaining and need to process the check box itmes if checked as above and manually)
    thanks and regards with rewards later on

    Hi,
    Check this sample code...
    DATA: t_lineitem TYPE TABLE OF char1.
    DATA: s_lineitem LIKE LINE OF t_lineitem.
    DATA: v_header,
          v_index TYPE syindex.
    START-OF-SELECTION.
      WRITE: / 'Header check box',  v_header AS CHECKBOX.
      SKIP 2.
      DO 10 TIMES.
        s_lineitem = sy-index.
        WRITE: / 'Line item-', sy-index , s_lineitem AS CHECKBOX.
        APPEND sy-index TO t_lineitem.
      ENDDO.
    AT LINE-SELECTION.
      READ LINE 1 FIELD VALUE v_header.
      DO .
        v_index = sy-index + 2.
        READ LINE v_index FIELD VALUE s_lineitem.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        s_lineitem = v_header.
        MODIFY CURRENT LINE FIELD VALUE s_lineitem.
      ENDDO.
    Thanks
    Naren

  • List check box

    Hello he would like to know somebody knows some example of a list check box
    if they could help me I thank
    thanks
    Renato Teixeira
    add msnmessenger
    [email protected]

    Hi Renato,
    I don't know of anything called a "list check box". There are either check boxes, or list boxes. This is what it looks like in HTML:
    Check box
    <input type="checkbox">
    List box
    <select>
    <option>First Choice</option>
    <option>Second Choice</option>
    </select>

  • 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

  • How do I get a radio button acting/check box looking "yes,no" set of checkboxes in InDesign CS6?

    I'm able to do radio buttons OR check boxes, but not the desired "pick only one" yes/no checkbox. Have found lots of general info but not this specific answer. Thanks for any help.

    If I'm understanding your question correctly, you want the FUNCTION of radio buttons (choose only one) with the APPEARANCE of checkboxes (choose all that apply).
    If this is the case you have two options:
    • Create the buttons in ID as radio buttons and edit their button state appearances as appropriate, OR
    • Just create the labels in ID and make the buttons in Acrobat, where there are 6 visual options for radio buttons.

  • Adding a check box in MM01 transcation screen i am not abe see the checkbox

    HI experts,
    I added some checkbox's in mm01 transcation and configured the screen program and number in OMT3B the problem is i am not able see the checkbox's but i can see the labels for the check box in the screen when i am executing the mm02 transcation.
    urgent requirement.

    Hi Santosh,
    When you are importing from data dictionary , please try the following
    (1)in screen painter once you click the import from dictionary
    (a) select the field you want as checkbox
    (b) you can see if you scroll sideways an option like
         Radiobutton/checkbox etc for the same field
    (c) Choose the checkbox option
    (d) use the "Tick" on the table control
    (e) Drag and drop to your screen
    (2) Activate your screen
    (3) Run the transaction again
    Please let me know if it solves the problem
    Regards
    Byju

Maybe you are looking for