ADF Faces: How to autoselect the first item in a af:table ?

Hi
I want <af:table> to autoselect the first item in the set (if there is at least one item). I'm looking for a programatic way to do it, but haven't found a solution.
Any suggestions?
TIA,
Brian

There is no declarative way of doing this.
The java apis to do this are...
call...
table.getSelectionState().clear()
table.setRowIndex(myIndex);
table.getSelectionState().add();

Similar Messages

  • ADF FACES: how to preserve the sort criteria for an af:table

    How can I preserve the sort criteria on an af:table across page invocations? I've searched all through the forum and I don't see anything on this topic.
    I simply want the sort criteria (from when the user clicks on a column header) to be remembered across multiple uses of the page. I know that the control handles this itself for multiple invocations of the same page (like when you page through the table). But I need to preserve the sort order so I can install it again when someone leaves the page and then returns to it.
    I've tried various attempts using a SortListener to record the sort criteria, but I can't figure out how to reinstall the criteria without generating exceptions from the table control.
    Any pointers on how to do this would be greatly appreciated.
    Thanks.
    Larry.

    Ok, I've solved the problems with the odd behavior by always creating a new model when the table data changes and copying the sort criteria into the new model, like this:
            // Construct our own CollectionModel from this result set
            if(_model == null) {
                // Construct the initial data model and set the starting sort criteria
                ListDataModel m = new ListDataModel(results);
                _model = new SortableModel(m);
                // Set the sort criteria to last name
                ArrayList criteria = new ArrayList();
                criteria.add(new SortCriterion("lastName", true));
                _model.setSortCriteria(criteria);
            } else {
                // Construct a new model so the table "sees" the change
                ListDataModel m = new ListDataModel(results);
                SortableModel sm = new SortableModel(m);
                sm.setSortCriteria(_model.getSortCriteria());
                _model = sm;
            }But, I end up with one final thing that doesn't work. In the "then" clause above, I try to set the initial sort criteria for the table - it has no effect. When the table is rendered, it is not sorted in any way.
    How can I specify an initial sort order for the table? Why is it ignoring the sort criteria on the model?
    Thanks.

  • Windows Explorer - How to select the first item once we open the explorer?

    Hi,
    In Windows Explorer - How to select the first item once we open the explorer using keyboard shortcut. I typically use downward arrow, it goes to the 2nd item in the list, then I again have to use upward arrow to go up.
    Is there a shortcut to select the first item in the list using keyboard? This is not specific to Windows 7, it has been the behavior even in previous Windows OS versions.
    Thanks,
    Mallik

    Opening a Microsoft Ticket is probably your best option. Unfortunately the change will not happen immediately and it will require multiple users to send in a ticket. I hope this ends up being resolved though.
    Good luck Mallik
    Also, don't forget to mark the post as answered so that it does not show up as unanswered to help others who search the forums.
    Agreed, MS wont change it easily. :)
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

  • ADF Faces: How to get the ADF BindingContainer in a managed bean?

    Hi,
    I not sure how to get the BindingContainer instance from inside of a managed bean method. I have tried the following config, but it does not work in all situations.
      <managed-bean>
        <managed-bean-name>backing_showBooks</managed-bean-name>
        <managed-bean-class>view.backing.ShowBooks</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
        <managed-property>
          <property-name>bindingContainer</property-name>
          <property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
          <value>#{bindings}</value>
        </managed-property>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1showBooks.jsp-->
      </managed-bean>When an ActionListener- method of my ShowBooks bean is called the property bindingContainer is NULL!!
    Is there a save way to get the BindingContainer in my bean??
    Any hints are welcome.
    Thanks,
    Markus

    Maybe I just need another pair of eyes but when I set this up as explained and watch it in the debugger my method public void setBindingContainer(DCBindingContainer bc) gets called but bc is null. Can anyone help?
    Thanks
    Backing Bean-
    private DCBindingContainer bindingContainer;
    public void setBindingContainer(DCBindingContainer bc) {
    this.bindingContainer = bc;
    public DCBindingContainer getBindings() {
    return bindingContainer;
    //I just threw this method on there in case I was missing something & I also
    //tried using a getBindingContainer method above but that didn;t work.
    public void setBindings(DCBindingContainer bindings) {
    this.bindingContainer = bindings;
    adf-faces.conf entry
    <managed-bean>
    <managed-bean-name>backing_VunerabilityDetail</managed-bean-name>
    <managed-bean-class>viewcontroller.backing.VunerabilityDetail</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindingContainer</property-name>
    <property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
    <value>#{bindings}</value>
    </managed-property>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1VunerabilityDetail.jsp-->
    </managed-bean>

  • [ADF FACES] How to remove the "select" header in selection column

    Hi,
    Is there a way I can prevent the "select" header to be rendered (or customize this header) for the selection column in a af:table when using either af:tableSelectOne or af:tableSelectMany?
    Emmanuel.

    Hi, I've read you filed an ER (in 2004, it's 2007 now) to be able to remove/adjust the header in a selection column. Until now I can only find threads/posts about people facing the same issue, the header can't be adjusted. The answer of one of the Oracle-employees is that it isn't supported and we can extend the adf-source code but this isn't supported by Oracle.
    What's the official answer of Oracle on this?
    This is a very popular issue that needs to be adressed to pleaze the customer that was convinced to use Oracle ADF ... and now we can't answer his requests?
    This issue has been around for quite a long time now, from 2004, there has to be a solution for this, wright?

  • How to place the page items horizontal in pivot table in OBIEE

    Hi experts
    In pivot table i have two pages items. And i want to place them horizaontaly. So how can i achieve this.
    for Ex: I have placed my two columns in page section of pivot table: Year,city.
    then i need as ;
    Year City
    where year is one dropdown list and city is another drop down list.
    Thanks in advance
    Regards
    Sunil

    Hi,
    We can seperate the page items using 'Start New Page Drop Down', but the item will be displayed in the next line.
    I think you would like to show them side by side i.e, horizontally..
    If it is, i think it is not possible as of OBIEE 10.1.3.3.. not sure about 10.1.3.4..
    Please let me know if my assumption is wrong.. I will be very happy if anyone corrects me..:)
    -Vency

  • ADF Faces : How to set the selection button in a managed bean

    I am looking for a way to select the selection radio button of a specific row in a Table when using af:tableSelectOne.
    I am using the tableModel to manage row but I did not find a way to select the row.

    Have you implemented a CollectionModel?
    If so, then you must know the rowKey of the item you want to select in the table.
    simply bind the "selectionState" attribute of the <af:table> to point to your RowKeySet instance that has the rowKey of the item you want selected.

  • How can i show the first item in the list as selected item

    Aslam o Alikum (Hi)
    Dear All
    How can i show the first item in the list as selected item when user click on the list. Right now when user click the list the list shows the last item in the list as selected or highlighted. Furthermore if the list item have large no of value and a scroll bar along with it then the list scroll to last item when user click it with mouse. I want that when user click the list item with mouse list should show the first item as highlighted.
    Take Care
    Allah Hafiz

    Hi!
    You can set list "initial value" using When-Create-Record trigger.
    I.g.
    :<Block_name>.<list_item_name> := Get_List_Element_Value('<Block_name>.<list_item_name>', 1);

  • How to execute separate code for the first item inside forloop?

    Hi All,
    I would like to execute "foreach (SPListItem item in items)". Here, for the first item i want to execute separate code and all other items should execute another code. How to achieve this?

    Basic .NET question... not really a SharePoint question...
    Option one, create a counter:
    int myCounter = 0;
    foreach (SPListItem item in items)
    if (myCounter == 0)
    else
    myCounter++;
    Option 2 - use a for loop
    for (int i = 0; i < items.count; i++)
    SPListItem item = items[i];
    if i == 0)
    else
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

  • Navigate to the first item in a updatable report

    on my page i have a master/detail form. When a new detail - record is created, the cursor navigate to the first item on the page => it is the first item of the master! What I have to do, that the cursor navigate to the first item in the new detail-record ??
    Thanks
    Robert

    Hi Andy,
    thank you for your answer.
    When the program start, I can not find the cursor. I think, I have a problem to reference the item in the updatable report. I wrote the following lines:
    <script language="JavaScript1.1" type="text/javascript">
    alert('Vor Cursor Navigation');
    first_field('#FKOM_RUFNR#');
    </script>
    (FKOM_RUFNR is a column of the select statement in the report!!)
    A second problem: The cursor navigate to the field - first_field('FIELD_NAME') - every time. But the cursor should navigate to the field in the updatable report, if the button "ADD" in the region of the updatable report was clicked. If the page was displayed without clicking the ADD - button, the cursor should navigate to the first item in the master form ( like => Cursor focus: first item on the page). How can I do that ??
    Thanks
    Robert

  • How to split the Order items using standard procedure

    Hi All,
                   I am a BW Consultant and currently working for Sales Module. I have one question  regarding the Order Item changes in VA02.  For example a user creates one SO with Item 10 and the  quantity is 1000. Later they want to split this Order into two i.e. they change the first item quantity to 500 and create another item (20) with Quantity 500 .Users are doing this ,because of allocation process.
                 Now I would like to ask whether this is a standard procedure to follow.I have no issues with the new item , I am not sure  how they are changing the first order item qty in VA02, because Qty is greyed out . My assumption is, they are deleting the item first and then recreating with the new quantity.
                Hence I would like to check is there any other option/process  available to change the quantity and also would like to know whether it is a standard procedure? Reason I am asking this question is,extractor is not picking the correct records.Hence I suspect this is not a standard procedure to follow.
    Please advice .Thanks for your time.
    Thanks.

    hi raja,
    go to shedule line data of position 10
    here you want to have 1000 pcs for the 18.12.2009
    change her into
    500 pcs for the 18.12.2009   and
    500 pcs for the 21.12.2009
    at 18.12.2009 you will get adelivery of 500
    at 21.12.2009 you will get the rest.
    in total, the Position has 1000 pcs.
    hans

  • How to Capitalize the first letter or an entire word using a shortcut on the keyboard just like in microsoft that uses shift+F3

    please how can one How to Capitalize the first letter or an entire word using a shortcut on the keyboard just like in microsoft that uses shift+F3

    What do you mean there was "no effect?" I'm not aware of any effects.
    It looks like that Service is also in the App Store. From their screen shots, the services are prefaced with WordService:
    You can see an example in the App Store for their app: App Store
    After installing, you should now have those text services in your Services menu. You can then add shortcuts in the Keyboard System Prefs.
    Most Apple apps have a Transformations menu in the Edit menu. You can Make upper, lower, and Initial caps with those. I would stick with Word Services, but you can make Application Shortcuts for the items in the Transformations menu.
    Again, in Keyboard System Prefs, Under Applications, Click the Add button on the right side pane.
    Set it for All Applications
    Enter the menu command exactly as they appear in the Transformation menu (separate entries for each),
    Make Upper Case
    Make Lower Case
    Capitalize
    Give them a shortcut.

  • How to set the default item showed in a h:selectonemenu

    I need to show the second, or the third, and on so.
    i tried some ways to set the default item showed in it, but failed.
    i had tried the attribute value, but it stiil showed the first item.
    Can u help me?
    in the JSP
    <h:selectOneMenu id = "companyName" rendered="true" binding="#{j03CMSyainAddBean.selectCompany}" style="width:150">
           <f:selectItems value="#{j03CMSyainAddBean.companyList2}"/>
    </h:selectOneMenu>in the back BEAN
    private UISelectOne selectCompany;
    private ArrayList companyList2;In the ArrayList companyList2, there are several selectItems.
    Thanks
    George

    Sanjeev K Sharma wrote:
    and without messing with /boot/grub/grub.cfg  ?
    I need this so that new kernels show up but do not change the default boot kernel
    Is there a way to do it by file name instead of position within the menuentry / submenu list?
    I found some ubuntu and fedora sugestions but all by position, none by name
    AND how to set the kdump kernel as the default?
    Arch is putting this kernel under a submenu - would this pose problems for setting it as the default?
    In /etc/default/grub you can use the name of your entry you wish to use as default
    GRUB_DEFAULT='Arch Linux, with Linux core repo kernel'
    You can tell grub to stop using submenus by doing:
    GRUB_DISABLE_SUBMENU=y
    Or you can just make a purely custom menuentry in /etc/grub.d/40_custom if you'd like:
    menuentry "Other Linux" {
    linux <KERNEL IMAGE HERE>
    initrd <INITRD IMAGE HERE>
    EDIT: /etc/grub/default -> /etc/default/grub
    Last edited by Slabity (2015-04-07 11:16:22)

  • How to remove the Page Item in thin Bean JSP

    Hi, I'm wondering how to remove the Page Item in JSP developed by BIBeans, since I have tried to remove the Presentation's Page Item in BiBeans Catalog, but with no result in JSP. Thank you!
    Jeff

    There are two ways to do this:
    1) If you want to remove and individual dimension from a presentation, you can hide the dimension. This can be performed directly from within QueryBuilder. Within the first section of Query Builder that shows the selected measures selected and associated dimensions, simply remove the required dimensions from the right dialog panel.
    2) To hide all page items within a presentation, simply add the following the property, pagingControlVisible="False", to the presentation tag in your JSP. For example:
    <orabi:Presentation location="Local Computer Sales/Products/KPI Sales Prior Period and Prior Year" id="BIProductKPIs_pres2" pagingControlVisible="False"/>
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • ADF Faces + hardware device in the client side.( adf swing  or adf java fx)

    We are using adf+swing in desktop app.
    We like ADF Faces but we need interations with Hardware device in the client side: scan reader, web cam, bar code reader, finger prints reader …
    How to do that’s in the adf faces web environment ( what about with sandbox security) how to obtain in the adf faces web page in the client side de video streams.
    In the future adf will be use Java FX?
    Thanks
    Juan Carlos Llanes

    Hi,
    see sample 71 http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples
    You can use ActiveX plugins or JavaApplet to access the client system. To reach out of the sandbox, it will require a certificate
    In the future adf will be use Java FX?
    No.

Maybe you are looking for

  • Not enough memory on startup disk

    How do I create more memory on my startup disk?

  • PLD for A/R Invoice over JE

    Hi experts, I  have  two PLD layouts in Journal Entry tab, one is use for JE printing and one for A/R vouchers printing(with debit and credit column ). When  printing  A/R invoices, I'll go to accounting tab and set the PLD default to A/R voucher and

  • 6.0 jsp deploy

    I can't get a jsp to be served up from a managed server. It works from the           admin server however.           I created a new domain (FooDomain) and ran an admin server with           a jsp copied into the default web app dir:           C:\bea

  • XMLSQL and stored procedures

    I looked in the archives and found an entry dated November 9, 1999 that asked the question of wheter the XMLSQL utility could be used in conjunction with a stored procedure. That answer was essentially 'not yet'. I just wanted to get an update on whe

  • Comparing GL Actual Values with BUDGET Values

    Hi All, Do we have any report in SAP,  to Compare GL Actual Balances with BUDGET  Values. Regards, Venkat