Check/Uncheck checkbox

Hi all !
I am having  a problem wich is very simple to solve but I haven't managed yet  to accomplish that ... When I check a checkbox I previously added to my Items Form I want to deactive Sales Item checkbox .Currently my code is :
If (pVal.FormType = 150 And pVal.FormMode = SAPbouiCOM.BoFormMode.fm_ADD_MODE And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK And pVal.ItemUID.CompareTo("rental") = 0) Then
            Try
                oDocPrintForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                check = oDocPrintForm.Items.Item("rental").Specific
                If (check.Checked) Then
                    oCheckbox = oDocPrintForm.Items.Item("13").Specific
                    oCheckbox.Checked = False
                Else
                    oCheckbox = oDocPrintForm.Items.Item("13").Specific
                    oCheckbox.Checked = True
                End If
            Catch ex As Exception
            End Try
        End If
It is not working correctly . it only works on the first time ... Any hint
Regards,
Ivan Frias

Hi !
when i had the problem in past the reason was the wrong event.
you check the clickevent but try
pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
lg David

Similar Messages

  • Unable to check / uncheck a checkbox in a JTable...

    Hi all,
    I know that a lot of people have asked this question before but I am unable to find a solution even after going all the messages. My issue is:
    My initial rendering of the checkboxes inside the table works ok. I am using a TableCellRenderer and my input to determine the "checked/unchecked" is string like "true" or "false" and not boolean values. But I am unable to do check / uncheck any of the checkboxes.
    I would really appreciate any pointers.
    Thanks in advance.
    Below is my code snippet:
    public Component getTableCellRendererComponent(JTable table_,
    Object value_, boolean isSelected_, boolean hasFocus_, int rowIndex_,
    int colIndex_)
    Component component = super.getTableCellRendererComponent(table_,
    value_, isSelected_, hasFocus_, rowIndex_, colIndex_);
    indicator = table_.getColumnModel().getColumnIndex("IND");      
    if (indicator == colIndex_)
         if (value_.equals("true")){
              component = new JCheckBox("", true);           
         } else {
              component = new JCheckBox("", false);           
         return component;
    }

    Your TableModel has to indicate that the column is editable. Your TableModel also has to implement setValueAt() so that when the user changes the value, it updates the data.
    The table will know to use it's own boolean renderer/editor for that column because it knows what to do when a column returns a Boolean.

  • Use spacebar to check/uncheck a checkbox in a datagrid.

    I have a DataGrid that has checkbox in the first column. The user wants to be able to check/uncheck the checkbox when he selects a row, by mouse or up and down keys, and hits the spacebar. Currently the spacebar functions if the last thing that the use has clicked on is the Checkbox. If the user clicks in the cell where the checkbox in located(not the checkbox itself), the spacebar won't do anything.
    <mx:TabNavigator>
         <mx:VBox>
              <ms:datagrid id="lgGrid" dataProvider="{this.lData}">
                   <mx:columns>
                        <mx:Array>
                             <mx:DataGridColumn dataField="vis" id="dfID" sortable="false">
                                  <mx:itemRenderer>
                                       <mx:Component>
                                            <mx:CheckBox click="data.vis = !data.vis"  paddingLeft="4"/>
                                       </mx:Component>
                                  </mx:itemRenderer>
                              </mx:DataGridColumn>
                              <mx:DataGridColumn dataField="name"/>
                        </mx:Array>
                   </mx:columns>
              </ms:datagrid
       </mx:VBox>
    </mx:TabNavigator>

    Your TableModel has to indicate that the column is editable. Your TableModel also has to implement setValueAt() so that when the user changes the value, it updates the data.
    The table will know to use it's own boolean renderer/editor for that column because it knows what to do when a column returns a Boolean.

  • How to obtain checkbox checked/unchecked  while editing

    Hi All,
    My scenorio is,
    I have a form and on that form i have text field & checkbox.
    I am saving record by entering some value in text box & checking checkbox(if my checkbox checked then I am saving "Y" for that checkbox in DataBase).Its saving both things properly in databse.
    While editing , If i click on edit link , my text box value coming properly(i.e. value which I stored in databse. )
    But that checkbox is not coming in checked mode(i.e while saving I have checked checkbox)
    So how to obtain checkbox at the time of editing checked/unchecked as they were at the time of saving ?
    Thanks
    Sandip

    Hi,
    Thanks for your reply.
    Sorry my variable is userAdmin.
    I have getUserAdmin() method in the C.java(server side pojo )?
    But its return type is String.(return type String because I want to save "Y / N") while saving
    public class C{   // server side pojo
    private String userAdmin; // corresponding getter & setter
    lly, I have getUserAdmin() method in cleint side pojo
    public class B{ // client side pojo
    private boolean userAdmin; // corresponding getter & setter
    but while saving I am doing as,
    public class SaveClass
    public String saveMethod()
    C c = new C();
    B bb = new B();
    if (bb.getUserAdmin() == Boolean.TRUE)
    c.setUserAdmin("Y");
    else
    c.setUserAdmin("N");
    // in client side pojo userAdmin variable's return type is boolean for checking as,
    if (bb.getUserAdmin() == Boolean.TRUE)
    but on server side its String for saving "Y / N",
    if (bb.getUserAdmin() == Boolean.TRUE)
    aa.setUserAdmin("Y"); /// to save String here
    So if I write in JSP,
    <h:selectBooleanCheckbox value="#{BeanName.c.userAdmin}"/>
    its giving error as,
    javax.servlet.ServletException: Expected submitted value of type Boolean for Component : {Component-Path :.................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Programatical checking of checkbox is not working in Jdeveloper 11.1.1.3.0

    Hi,
    I've a table whose first column is a checkbox bound to a ViewObject attribute(SelectFlag).
    I've another checkbox placed on column header for Select-All feature.
    The functionality is that when we check Select-All checkbox, it should check checkboxes for all the rows(first column) and when we uncheck Select-All checkbox, it should uncheck checkboxes for all the rows.
    I've the partial trigger on table for the Select-All checkbox.
    Here is the ValueChangeListener code for Select-All checkbox:
    public void checkAll(ValueChangeEvent valueChangeEvent) {
    Boolean isSelected = ((Boolean)valueChangeEvent.getNewValue()).booleanValue();
    System.out.println("New Check Value:"+isSelected);
    ViewObject vo = getIteratorBoundVO("KrcCapabilitiesVO1Iterator");
    vo.clearCache();
    vo.reset();
    vo.setWhereClause("KrcCapabilitiesEO.ACTIVITY_ID = 446");
    vo.executeQuery();
    while(vo.hasNext())
    Row row = vo.next();
    if(isSelected){
    row.setAttribute("SelectFlag",true);
    System.out.println("Checked Value for CapabilityId :: " + row.getAttribute("CapabilityId"));
    else{
    row.setAttribute("SelectFlag",false);
    System.out.println("Unchecked Value for CapabilityId :: " + row.getAttribute("CapabilityId"));
    This code is not working in latest Jdeveloper version 11.1.1.3.0 which uses WebLogic Server Version: 10.3.3.0
    It's working fine in Jdeveloper version 11.1.1.1.0 which uses WebLogic Server Version: 10.3.1.0
    Is this a bug? Can anyone help me on this please.
    Thanks,
    Bhaskar

    Hi Frank,
    Thanks for your response.
    You are right, the selection state is not shown in the table.
    I'm taking the ViewObject from Iterator Binding.
    Here is the entire code:
    public static Object evaluateEL(String el){
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ELContext elContext = facesContext.getELContext();
    ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
    ValueExpression exp = expressionFactory.createValueExpression(elContext,el,Object.class);
    return exp.getValue(elContext);
    public static ViewObject getIteratorBoundVO(String voIterator)
    DCBindingContainer dcb = (DCBindingContainer)evaluateEL("#{bindings}");
    DCIteratorBinding dciter = dcb.findIteratorBinding(voIterator);
    dciter.invalidateCache();
    ViewObject vo = dciter.getViewObject();
    return vo;
    public void checkAll(ValueChangeEvent valueChangeEvent) {
    Boolean isSelected = ((Boolean)valueChangeEvent.getNewValue()).booleanValue();
    System.out.println("New Check Value:"+isSelected);
    ViewObject vo = getIteratorBoundVO("KrcCapabilitiesVO1Iterator");
    vo.clearCache();
    vo.reset();
    vo.setWhereClause("KrcCapabilitiesEO.ACTIVITY_ID = 446");
    vo.executeQuery();
    while(vo.hasNext())
    Row row = vo.next();
    if(isSelected){
    row.setAttribute("SelectFlag",true);
    System.out.println("Checked Value for CapabilityId :: " + row.getAttribute("CapabilityId"));
    else{
    row.setAttribute("SelectFlag",false);
    System.out.println("Unchecked Value for CapabilityId :: " + row.getAttribute("CapabilityId"));
    Thanks,
    Bhaskar

  • Is there a way to search Numbers for UNCHECKED checkboxes?

    Hi,
    I'm attempt to build a spreadsheet to track incoming payments from various sources.  I'm using checkboxes to confirm when a payment has been received.  The question is:  is there a way to search for unchecked checkboxes so that I can find instances where a payment has not been received?
    Any tips or ideas would be greatly appreciated.

    Hi Wyatt,
    I agree with Jerry's suggestion that entering the date of payment rather than checking a checkbox is a better means of tracking the payments.
    For either entry method, you can use conditional formatting to highlight unpaid rows.
    For checkboxes, use Text is FALSE for the rule.
    For dates, use Text does not contain 2013.
    Examples are shown for both types of payment record:
    Regards,
    Barry

  • Check a checkbox in a jtable in a panel from another panel

    I have a panel-> Panel A
    where I have some conditions and on that condition I want to check a checkbox in a jtable in another panel ->PanelB
    So Panel B has a jtable with one column as checkbox,I want to check/uncheck this checkbox based on some conditions in some other panel A
    I have no idea how to do this.Please help.
    Thanks

    885522 wrote:
    How will the change be reflected dynamically if the value changes in some other panel.By code that you write. If you want component X to change based on some changes to component Y, then first you set up a listener which will notify you when changes to component Y take place. In that listener you put code which makes the appropriate changes to component X, based on what happened to component Y.

  • Unable to uncheck checkbox

    I'm relatively new and I think I am probably missing something obvious, but I am stumped.
    <br><br>
    Here's the situation:
    I have a single Checkbox called P30_FINISH_QA_CHECK. I need P30_FINISH_QA_CHECK to default to checked and 'True' on the first load of the page, but I need the user to be able to uncheck it and reload the page. All of my attempts at this made the checkbox permanently checked and set to True.
    <br><br>
    My LOV definition is simple: STATIC2:Finish QA;True
    <br><br>
    I found Unable to uncheck checkbox, which seemed to be exactly what I needed, but I still can't get it to work.
    <br><br>
    I tried to follow sspadafo's suggestion, and I built a page computation set to compute after submit:<br>
    begin<br>
    IF :P30_FINISH_QA_CHECK IS NULL THEN<br>
    :P30_FINISH_QA_CHECK := 'False';<br>
    END IF;<br>
    end;<br>
    <br>
    Then I set the source value of :P30_FINISH_QA_CHECK to True, to be used only when the current value in session state is null. The first time I load the page, it's fine, but if I uncheck the box and hit go, the box goes back to checked.<br>
    I tried setting the default value to True, instead of the source value, but I got the same results. What am I doing wrong?? Please help!
    Message was edited by:
    gaso

    Well, not my first name, but it's what everybody calls me...
    My page branches to itself when the go button is pressed. Is that the same thing as a submit?

  • Multiple Check/Uncheck?

    My late 2005 5G iPod is slowly starting to lose its battery life (down to 12 hours from 16) i always thought 16 hours wasnt quite enough for me as i pretty much listen to my iPod all day. so im seeing now that the new nanos have 24hours battery life which is more of what im looking for. only thing is if i sell my 5G ill prolly only be able to afford the 4gb nano (i want silver anyways, dont like the black top, bottem and click wheel) anyways.. my question is, if i were to have a 4gb ipod my music library is two times as big so i would have to manually select which songs id like to have on my ipod. is it possible to check/uncheck multiple songs at once in itunes?
    thanks in advance!

    To check or uncheck all the songs in a list Command-click the checkbox next to a song: iTunes Keyboard Shortcuts for OSX

  • Can you check/uncheck multiple songs in iTunes for syncing to iPod?

    In a previous reply to this question, the answer given was that you can use Command apple key to uncheck or check groups of iTunes songs for syncing.
    Actually this does not work.
    Apple Commmand only gives you the possibility to check or uncheck the ENTIRE list of iTunes.. unless I am completely mad.
    There must be a way to select say 5 songs from an album and check/uncheck them all at the same time. So that you can make a fresh selection of songs each time you sync to an iPhone or iPod
    I simply cannot believe that iTunes is so dumb that this option is not available...
    ie what one needs to be able to do is highlight x number of songs at a time and then check or uncheck them as you go through the iTunes list to make a fresh syncing selection
    I hope this can be answered
    best
    MS

    AHXtreme42 wrote:
    Once you have all of the selected items, RIGHT CLICK (or alt click whatever) one of those highlighted items and select either CHECK or UNCHECK SELECTION.
    This is EXACTLY the point at which I get stuck - what is the actual key command for Right Click - it is not Alt Click or any combination, and looking for his in the iTunes help does not yield a result.
    Please give me that actual key stroke combination to effect this last operation: I have always been able to select multiple tracks in the way you describe with Shift - but how to actually CHECK and UNCHECK a selection.. once the tracks are selected
    Would much appreciate the answer to this

  • Bookmarks toolbar Firefox 10.0.2/OSX 10.6.8 - gone. View Toolbars Bookmarks Toolbar - checked. Dragging URL's to bookmarks toolbar area no longer works. Gray area appears/disappears when checked/unchecked but will not show any or accept new bookmarks.

    My bookmarks toolbar in Firefox 10.0.2 Mac OSX 10.6.8 suddenly disappeared. View>Toolbars>Bookmarks Toolbar is checked. Dragging URL's to the bookmarks toolbar area no longer works. The gray area appears and disappears when checking/unchecking under View/Toolbars menu, but will not show any or accept addition of bookmarks.

    Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible: "View > Toolbars"
    *Open the Customize window via "View > Toolbars > Customize"
    *Check that the "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    *If the "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the toolbar palette in the customize window to the Bookmarks Toolbar
    *If missing items are in the toolbar palette then drag them back from the Customize window on the toolbar
    *If you do not see an item on a toolbar and in the toolbar palette then click the "Restore Default Set" button to restore the default toolbar set up
    *http://kb.mozillazine.org/Toolbar_customization
    *https://support.mozilla.org/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • Unable to check/uncheck older podcast episodes in iPod sync to iTunes 11.0

    Hi,
    I have a few podcasts in my iTunes where I have saved a large number of episodes. Now I have upgraded to the new version of iTunes I unable to check/uncheck older podcast episodes from iPod syncing - the finder window won't scroll to the bottom of the list, and just 'bounces' after scrolling past a certain number!
    Not sure if this is a bug, or I'm overlooking something.
    Thanks

    I have the same problem.  Scrolling does not work in the iPod podcast list panel, but it works in every other panel or window in iTunes...

  • How to check a checkbox field value in fw9 PDF form

    Hi,
    I got a PDF given form IRS (http://www.irs.gov/pub/irs-pdf/fw9.pdf). While creating a widget to this pdf form to sign it, I merged the custum data to those PDF form fields using API setMergeFields.
    All the data fields are merged fine except the checkboxes. I tried by passing the values to the merge_fields array as 'On', '1', 'checked', 'checkbox(checked)' but no luck
    What is wrong here in checking the chexbox field in this fw9 PDF or How to check a checkbox field in a form?
    Thank you,

    Hi Simon,
    I re-added and edited the fields of fw9 form by pdf printer. While doing so, I made fields as ready only so that, the data cannot be edited in the form through the widget but will be merged the data to fields only be the code. Wherein Im using the widget only for signature but not for form filling.
    Here, Im able to merge my custom data to all fields while creating widget but not to the fields of checkboxes. The checkboxes fields which are made ready-only are not allowing me to merge the value as checked by the API.
    Please help me,
    Thanks you,

  • Set default value for people picker only when user checks a checkbox (Sharepoint 2010)

    The javescript in below link works for me.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/2b130f64-3db2-484a-9a53-ccbe18d2c5de/set-default-value-for-people-picker-in-list-template-current-user?forum=sharepointgenerallegacy
    However, I'd like to set default user for people picker only when user checks a checkbox. 
    I am new to  development. Could you please help me on this requirement ?
    Thank you very much. 

    Hello,
    Use this link to to validate checkbox value, if true then set the person or group value (i.e. as posted in your link).
    http://geekswithblogs.net/haniamr/archive/2011/03/10/validate-that-a-checkbox-is-checked-using-javascript.aspx
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to check/uncheck all check boxes in an insert-not-allowed block

    Hi All,
    I have a column of check box which is placed in a multirow block. This block's INSERT_ALLOWED property is set to false. The column of check box is not a database item and its insert_allowed property is to true. Now I use the following code which is in when-button-pressed trigger to control checking/unchecking all the check boxes:
    go_block('selected_payment');
    first_record;
    loop
    :cb_payflag:= 'N'; -- uncheck the check box
    exit when (:system.last_record = 'true');
    next_record;
    end loop;
    It gives me 'FRM-41051 Cannot create records here' error, and it goes into an infinite loop. It looks like it never reaches the last record where the block actually contains two records.
    Please help!
    Thanks in advance.
    Regards,
    Vanessa

    It sounds like your block does not have a field where the cursor focus can go when looping through the records. Create a dummy non-db field in the block which is enabled and has insert/update allowed. see if it then works. If it does then you can shrink the field down to 1x1 pixels with no border so the user cannot ever click on it and it's invisible.

Maybe you are looking for

  • Keynote has unexpected error when copying a table- how do I report this?

    I looked for a place to send a report of this error in Keynote 09, but can't find the place to do so.  Seems a simple operatoin like this should not cause a fatal error.

  • Browser menu button quit, wont load pages

    after cleaning history n cookies hoping to speed up my Q10, the browser will open but right menu button wont pop up and the left button for history and other browser windows wont pop up either. Did a back up and restored and still doesnt work. only c

  • Docky Issue

    Hey. So I have just installed Docky (sudo pacman -S docky) and it installed fine, but when I try to run it via my DE, it loads but does not open and eventually stops loads. Loading it via terminal outputs the following: [anthony@ArchBox ~]$ docky [In

  • Summing nodes with same id number....

    I thought this would be simple but I'm struggling with it. I have a template called "entry" that outputs account details and after each account for a paricular customer, should sum the total balance and output that also. I can't get the summing to wo

  • Expanded tree view by default

    I have created a tree and placed it in page 0 using application express 3.1 On the initial page load my tree is not fully expanded and it comes along with "up" link as given below: Parent node1 (up) subnode1 subnode2 But the tree should appear in the