Use checkbox to select rows in a table

Is it possible to use a checkbox on the first column of a table as row selection control? Just like most of the web email client (Yahoo, Hotmail...).
Thanks,
Samson Fu

I am using JDeveloper 11.1.1.2 <af:table>.
Regards,
Samson Fu

Similar Messages

  • Use checkbox to select rows in a af:table

    How to use a checkbox on the first column of a table as row selection control?
    Just like most of the web email client (Yahoo, Hotmail...).
    I am using JDeveloper 11.1.1.2 with Fusion Web Application - ADF.
    The control I am using is a <af:table>.
    Thanks,
    Samson Fu

    The sample you provide is very usefull. But it has some limitations to my working application. It dose not work for tables in clickToEdit mode. User has to click a row in the table to enable the selection checkbox, and the tick the checkbox again to have the row to be selected, if the table is in clickToEdit mode.
    Anyway, that is really a good example. Thank you!
    Regards,
    Samson Fu

  • How to set focus on a input field in a selected row of a table?

    In a previous discussion (http://scn.sap.com/thread/3564789) I asked how to access an input (sap.m.Input) field of a selected row in a table. In the answer that was supplied I was shown how to get the items of the table. Then using the selected index to get the selected item get the cells. Then I could set editable on the proper cell(s). This worked fine.
    Now I need to set the focus on one of the fields. I tried something like this:
                var oNewLink = table.getSelectedItem();
                var oNewLinkName = oNewLink.getCells()[1];
                oNewLinkName.focus();
    But this doesn't seem to work.
    I have searched through other discussions and have seen this technique for putting focus on a field if you have its ID:
    sap.ui.getCore().byId(id_of_the_input_field).$().focus();
    In my case though I do not have an ID since the row and its cells are generated. How can I set focus on the cell of a certain row in a table?

    Hello Venkatesh. Yes that code does work. First I tried it on a table cell that was already rendered and it did work. The next time I tried it on a table row that was being added and it did not work there. So I added an on after rendering function for the table and added that code there. That did not work until I added a delay (timeout) to do a context switch before calling the focus and that worked.
    Once last thing though sometimes when I call focus on an input field (actually in a table row cell) if the field has text in it already the flashing cursor is at the beginning of the text and other times it is at the end of the text (which is the desired way). It depends on where I click in the row. Is there anyway to make sure the flashing cursor is at the end of the text when the focus is applied to a field that contains text?

  • Using checkbox at selection screen

    I used checkbox at selection screen and i want output as per selected checkbox. How to do that??

    hiii
    use following code
    AT SELECTION-SCREEN.
      IF p_char EQ 'X'.
        w_check = 'X'.
        WRITE: w_check.
      ELSE.
        w_check = ' '.
        WRITE: w_check.
      ENDIF.
    SELECT b~carrid                      "Carrier Id
             b~connid                      "Connection id
             b~fldate                      "Flight date
             b~price                       "Price
             b~currency                    "Currency
             b~seatsmax                    "Maximum Seats
    INTO TABLE t_flight
    FROM spfli AS a
           INNER JOIN sflight AS b ON a~carrid = b~carrid
          INNER JOIN sbook AS c ON c~carrid = b~carrid AND
                                           c~connid = b~connid AND
                                           c~fldate = b~fldate
              WHERE b~carrid IN s_carrid AND
                              c~cancelled EQ w_check.
    regards
    twinkal

  • When iam selecting row of the table i got the exception

    Hi ,
    When iam selecting row in the table at that time iam getting below exceptions
    <21/02/2013 1:31:35 PM EST> <Warning> <oracle.adf.view.rich.component.fragment.UIXRegion> <ADF_FACES-00009> <Error processing viewId: /InventoryPropertiesViewTF/InventoryPropertiesView URI: /com/avocent/trellis/apps/mainUi/inventory/pages/fragments/InventoryPropertiesView.jsff actual-URI: /com/avocent/trellis/apps/mainUi/inventory/pages/fragments/InventoryPropertiesView.jsff.
    javax.el.PropertyNotFoundException: Target Unreachable, 'BracketSuffix' returned null
    <21/02/2013 1:31:35 PM EST> <Warning> <oracle.adf.view.rich.component.fragment.UIXRegion> <ADF_FACES-00009> <Error processing viewId: /PropertyDisplayTF/PropertyDisplay URI: /com/avocent/trellis/apps/coreapps/ui/fragments/PropertyDisplay.jsff actual-URI: /com/avocent/trellis/apps/coreapps/ui/fragments/PropertyDisplay.jsff.
    javax.el.PropertyNotFoundException: Target Unreachable, 'BracketSuffix' returned null
         at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    Please Let me know why its getting this type exception only some time interemitten issue,
    Please provide me any solution for these,
    jdeveloper 1.1.1.4

    Check your page code for an EL that uses 'BracketSuffix'. This is the point of error as the 'BracketSuffix' can't be evaluated at the given point.
    Timo

  • Passing selected rows in a table to Popup Iview

    Hi all,
    I have a main iview in which i search and display some data in a table. Users can select multiple rows from the table and upon clicking on a button in the table toolbar, all the selected rows should be passed to a popup iview.
    But, when i tried, only one value is passed to the popup.
    I need to update a set of rows together from the popup iview.
    Is it a limitation of pop iviews in VC, or did i miss out anything?
    I have selected "multiple select" option for the source table.
    Can anyone advice us on this???
    Thanks alot in advance
    Shobin

    Hi Sreeni,
    Thanks alot for your reply.
    As I saw in some forum posts in SDN, multiple data rows can not be passed to a pop up.
    My application has a list of submitted appointment orders which the authorized person can  approve. I wanted a popup in order to provide a confirmation message when the user multi select and approve many AOs together.
    I found a work around without using pop ups. Instead, I used layers to show the confirmation message. I passed the selected rows to another table using signal in and out.
    It works now.
    Thanks alot
    Shobin

  • Get values from selected row in a Table?

    Hello.
    I'm on VC 7.1 (the trial version downloaded from SDN).
    I'm trying to figure out a way to retrieve some values from the currently selected row in a Table element through the output connector.
    I have a web-service which returns results to the Table, and I want the user to be able to select one of the rows and then trigger another web-service call with some of the values from that row -- is this possible?
    Also, I can't find any documentation that lists what can and can't be done with each UI element, is there something like this some where? (the Modeler's guide doesn't help, and the Reference guide seems to focus on menu items and what the VC screen looks like)
    Thanks,
    Alon

    Hi Alon
    This is a very simple task.
    You just need drag the service which you want to execute, after select row, in model.
    Drag output connector from table to input connector of service. Then map the parameter.
    Regards
    Marcos

  • Display and edit currently selected row of ADF Table in ADF Form

    I have an ADF Read-only Table and ADF Form, which were created from the same Data Control.
    I need to be able to edit the selected row of the table in the form (just like in "Binding Data Controls to your JSF page" part of "Developing RIA Web Applications with Oracle ADF" Tutorial). However, I can't figure out how to do this :(
    I found the following solution on the Web: #{bindings.DeptView1.currentRow.dataProvider.dname} - but it doesn't work, since "the class oracle.jbo.server.ViewRowImpl does not have the property dataProvider".
    Sorry for the newbie question.
    Thanks in advance for any help!

    Hi,
    AFAIK, dataProvider is not supported on ADF BC, hence the error.
    If you have created ADF Read only table and form from the same data control you just need to refresh the form based on table selection to show up the selected record, to do which you just need to add partialTriggers property to the panelFormLayout and set its value to the id of table
    Sireesha

  • Trapping the selected row in the table using boolean checkbox

    Hi,
    I am using Jdev 11.1.1.2.0 with ADF 11g.
    I have a screen that has a table with an additional column of 'Select boolean checkbox'. I have assigned a valuechangelistener method that helps me know which row has been selected. But the issue is it gets fired for all the rows in the table once I select/de-select a checkbox of 1 single row.
    How can I handle this? Yes I can iterate through the table rows and check the values of the checkbox. But that is not I want, I also want to trap the de-select event.
    What is the way to achieve this?

    Timo Hahn wrote:
    I don't see a bug in this behavior. This is because each row gets stamped when they render.
    The way to do this is to use an attribute (which can be transient) to hold the status of the check box. Exactly this does the link I gave.
    TimoHi,
    Why I am saying it as a bug is because it is not firing the event for the record where the event has occurred. instead the event is fired for each row which should definitely not what is expected. And because of this we have to add an additional variable.
    Now it becomes more complex if I have to handle de-selection as well, b'coz if the valuchangelistener is going to fire for all the records then I need to know which row was previously selected and now de-selected as now the de-selected record will also return a false.
    So any better solution, anyone?

  • How to directly access a SELECTED row in a table using MasterColumn

    I'm using a table with MasterColumn (TreeByNestingTableColumn) contains checkbox element.
    In order to get the selected row I have to navigate the whole tree which is a very expensive when the tree is big.
    I also tried without check box by just using MULTI ROW SELECTION property of the table but that didn't work.
    Is there a way to directly access selected row like we do in the standrard table control?
    Any help would be appretiated.
    regards
    Qamar

    hi, Qamar
    Just Check out the Following Link's
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial on creating a tree structure in a table - 27.htm
    and also if u had not seen it before...............
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial on creating tables in web dynpro - 11_0_.htm
    regard's
    Dheerendra

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

  • Improving performance:How to know selected rows in af:table through chk box

    Hi,
    I've a VO which has 3 transient variables. 2 of these transient variables getting the values from a view accessor. Using the other transient variable in the Ui to select the rows in the af:table.
    In my UI, I've a table and a Check Box to select the rows. I want to get the selected rows through the check box, in the backing bean for my business requirements.
    I've used below logic to get the selected rows. Here, I am iterating through the entire viewobject rows, so it is impacting the performance of the UI. How can I know the selected rows in the bean? or How can I improve the performance?
    I also applied below view criteria, but still its not performant.
    // ViewCriteria vc = vo.createViewCriteria();
    // //.getViewCriteriaManager().getViewCriteria("SelectedMerchantCriteria");
    // ViewCriteriaRow vcr = vc.createViewCriteriaRow();
    // vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE | ViewCriteria.CRITERIA_MODE_QUERY);//MerchantName1
    // //vcr.setAttribute("MerchantName1", "1017 CAFE");
    // vcr.setAttribute("SelectToMap", "true");
    // vc.addRow(vcr);
    // vo.applyViewCriteria(vc);
    // vo.executeQuery();
    public void mapSupplierMerchant2(ActionEvent actionEvent) {
    // Add event code here...
    OperationBinding method = null;
    AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
    Map pageFlowScope = adfFacesContext.getPageFlowScope();
    ArrayList merchantMappingList = new ArrayList();
    Long primaryVendorId = null, groupId = null;
    CollectionModel tableModel = (CollectionModel) this.getMerchantTable().getValue();
    JUCtrlHierBinding tableBinding = (JUCtrlHierBinding) tableModel.getWrappedData();
    ViewObject vo = tableBinding.getViewObject();
    // ViewCriteria vc = vo.createViewCriteria();
    // //.getViewCriteriaManager().getViewCriteria("SelectedMerchantCriteria");
    // ViewCriteriaRow vcr = vc.createViewCriteriaRow();
    // vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE | ViewCriteria.CRITERIA_MODE_QUERY);//MerchantName1
    // //vcr.setAttribute("MerchantName1", "1017 CAFE");
    // vcr.setAttribute("SelectToMap", "true");
    // vc.addRow(vcr);
    // vo.applyViewCriteria(vc);
    // vo.executeQuery();
    List<JUCtrlHierNodeBinding> merchantList = (List<JUCtrlHierNodeBinding>)tableBinding.getChildren();
    JUCtrlHierNodeBinding merchantNode = null;
    List supToMap = new ArrayList();
    boolean isMerchantSelected = false, isMasterSup = false;
    Long merchantIdToMap = null, masterSupId = null;
    Row r = vo.first();
    while(r!=null) {
    System.out.println("================================ " + r.getAttribute("MerchantName1") + " " + r.getAttribute("SelectToMap") );
    if(r.getAttribute("SelectToMap")!=null) {
    isMerchantSelected = (Boolean) r.getAttribute("SelectToMap");
    if(isMerchantSelected) {
    merchantIdToMap = (Long) r.getAttribute("MerchantMapId");
    if(merchantIdToMap!=null) merchantMappingList.add(merchantIdToMap);
    r = vo.next();
    if(merchantMappingList.size()>0) {
    primaryVendorId = (Long) pageFlowScope.get("primaryVendorId");
    groupId = (Long) pageFlowScope.get("groupId");
    method = (OperationBinding) ADFUtil.findOperation("mapSupplierMerchant");
    if(method!=null) {
    Map paramMap = method.getParamsMap();
    paramMap.put("vendorId", primaryVendorId);
    paramMap.put("groupId", groupId);
    paramMap.put("merchantList", merchantMappingList);
    Boolean result = (Boolean) method.execute();
    List errors = method.getErrors();
    if(result!=null && result) {                   
    this.getMerchantMappedFlag().setValue(true);
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.getMerchantMappedFlag());
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.getMerchantTable());
    tableBinding.getViewObject().setRangeSize(25);
    FacesMessage message = new FacesMessage("The selected merchants have been mapped to the group. Please save the changes. " );//+ adfFacesContext.getPageFlowScope().get("merchantGroupName") );
    message.setSeverity(FacesMessage.SEVERITY_INFO);
    FacesContext.getCurrentInstance().addMessage(null, message);
    } else {
    FacesMessage message = new FacesMessage("No merchants have been selected for mapping. Please select atleast one merchant." );//+ adfFacesContext.getPageFlowScope().get("merchantGroupName") );
    message.setSeverity(FacesMessage.SEVERITY_ERROR);
    FacesContext.getCurrentInstance().addMessage(null, message);
    }

    Hi
    Please check this post [http://adfwithejb.blogspot.in/2012/08/hi-i-came-across-one-common-use-case.html].
    It has clear explanation of how to provide a checkbox for selection of rows. You can also go through my comments at the end of the post. That should solve your problem of iterating through the entire VO.
    Thanks,
    Rakesh

  • How To get selected row in a table

    Hi experts
                        I have been using a table in which I am using a column Tree by nesting . I have written code for dynamically expanding table tree . But I want to know current selected element of the table, for this i have done following
    steps
    1) created an action on Action <b>lead select </b> of the table .
    which has a parameter with type node element .
    2) now i need to use parameter mapping in domodify view .
    as
    IWDTable tab =  (IWDTable) view.getElement("CatalogTable");
            tab.mappingOfOnLeadSelect().addSourceMapping<b>("XYZ",</b> "element");
    But i dont know what is correct parameter <b>XYZ</b> to be passed.
    also if i am wrong in approach please let me know .
    Regards
    Abhay

    Hi
                I have used following code also but its not working
    IWDTable table  =  (IWDTable) view.getElement("CatalogTable");
    table.mappingOfOnLeadSelect().addSourceMappin               ("IWDNodeElement", "LeadSelect");
    and I have created an action
    public void onActionOnleadSelect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.tut.wd.treetable.wdp.IPrivateTreeTableView.ICatalogElement LeadSelect )
        //@@begin onActionOnleadSelect(ServerEvent)
        wdContext.currentContextElement().setDebug4(LeadSelect.getID());
        //@@end
    but when i select one row its giving error
    <b>com.sap.tc.webdynpro.services.exceptions.WDIllegalArgumentException: Parameter IWDNodeElement not found</b>

  • Get selected row values from Table view control

    Hi ,
    I am using transaction ME23N, would like to access row values from item table for selected row. I have written a script as in screen shot and its giving me error at java script step two. I want to get the PR number from item table for selected row.
    With Regards
    Vishal Lokapur

    H Vishal,
    Can you please share how you were able to resolve the issue regarding the selected row
    in case of a table control .
    Regards

  • Delete operation is not working to delete selected row from ADF table

    Hi All,
    We are working on jdev 11.1.1.5.3. We have one ADF table as shown below. My requirement is to delete a selected row from table, but it is deleting the first row only.
    <af:table value="#{bindings.EventCalendarVO.collectionModel}" var="row"
    rows="#{bindings.EventCalendarVO.rangeSize}"
    emptyText="#{bindings.EventCalendarVO.viewable ? applcoreBundle.TABLE_EMPTY_TEXT_NO_ROWS_YET : applcoreBundle.TABLE_EMPTY_TEXT_ACCESS_DENIED}"
    fetchSize="#{bindings.EventCalendarVO.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.EventCalendarVO.collectionModel.selectedRow}"
    selectionListener="#{bindings.EventCalendarVO.collectionModel.makeCurrent}"
    rowSelection="single" id="t2" partialTriggers="::ctb1 ::ctb3"
    >
    To perform delete operation i have one delete button.
    <af:commandToolbarButton
    text="Delete"
    disabled="#{!bindings.Delete.enabled}"
    id="ctb3" accessKey="d"
    actionListener="#{AddNewEventBean. *deleteCurrentRow* }"/>
    As normal delete operation is not working i am using programatic approach from bean method. This approach works with jdev 11.1.1.5.0 but fails on ver 11.1.1.5.3
    public void deleteCurrentRow (ActionEvent actionEvent) *{*               DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    // Get an object representing the table and what may be selected within it
    ViewObject eventCalVO = dcItteratorBindings.getViewObject();
    // Remove selected row
    eventCalVO.removeCurrentRow();
    it is removing first row from table still. Main problem is not giving the selected row as current row. Any one point out where is the mistake?
    We have tried the below code as well in deleteCurrentRow() method
    RowKeySet rowKeySet = (RowKeySet)this.getT1().getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.getT1().ggetValue();
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
    rowData.getRow().remove();
    The same behavior still.
    Thanks in advance.
    Rechin
    Edited by: 900997 on Mar 7, 2012 3:56 AM
    Edited by: 900997 on Mar 7, 2012 4:01 AM
    Edited by: 900997 on Mar 7, 2012 4:03 AM

    JDev 11.1.1.5.3 sounds like you are using oracle apps as this not a normal jdev version.
    as it works in 11.1.1.5.0 you probably hit a bug which you should file with support.oracle.com...
    Somehow you get the first row instead of the current row (i guess). You should debug your code and make sure you get the current selected row in your bean code and not the first row.
    This might be a problem with the bean scope too. Do you have the button (or table) inside a region? Wich scope does the bean have?
    Anyway you can try to remove the iterator row you get
    public void deleteCurrentRow (ActionEvent actionEvent) { DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    dcItteratorBindings.removeCurrentRow();Timo

Maybe you are looking for

  • AFS-PO split

    Hi, I am unable to view the new PO No under logs tab st after successful simulation of Tcode- /n/afs/splitpo.

  • ITunes 12.1.1.4 crashes every time I try to use it

    Was working fine prior to 'upgrade'.  I've tried restarting, uninstalling and re-installing multiple times, etc. Running Windows 7 Enterprise on a work computer on our corporate network.

  • HT1665 does apple have a car charger for iphone 5?

    does apple sell a car charger or car charger with mount for the Iphone 5?

  • Minecraft PE: "scanning for WiFi Games..." never finds any on same network

    My daughter wants to play Minecraft PE with her friends when they are here at the house, but I cannot get things to work.  I suspect this is an Airport issue because we have done everything that the Minecrafte forums suggest to do to get this to work

  • IPod Updater 2006-1-10

    Is the latest updater to follow the 1.1 software upgrade? I was just wondering, because I was reading about it and they said that it contained bug fixes for the IPod w/video. Has anyone tried using this updater yet, and if so, how well did it work? D