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.

Similar Messages

  • [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?

  • LinkBar: how to set a selected button's background color?

    I was able to set the text color of a selected LinkBar button by "disabledColor" style of LinkBar. Accordingly, I expect to set the background color of the selected button by "backgroundDisabledColor" style, however, it didn't work; and except "backgroundDisabledColor", I didn't see any other style that could possibly achieve this. Please help. Thanks.

    Solved this myself by writing a programmatic skin and set it to LinkButton's disabledSkin.

  • How to set the default button of an ALERT

    Can someone help me how to set the alert propety to change the default button from button1 to button2.Not from the prioperty palette, but inside the code using like set_alert_property.I am using the Oracle Forms 10g.
    Thanks in advance.
    Srini

    To the best of my knowledge, the default button cannot be set at runtime. This must be set at design time in the Builder.
    Refer to the Forms Builder online help for details:
    http://www.oracle.com/webapps/online-help/forms/10g/topics/f1_help/builts/setatpro.html

  • How to set the Selected row and Column in JTable

    Hi,
    i have a problem like the JTable having one Method getSelectedRow() and getSelectedColumn to know the Selected row and Column but if i want to explicitly set the Selected Row and Column,then there is no such type of Methods.If anybody has any solution then i will be thankful to him/her.
    Praveen K Saxena

    Is that what you're looking for? :myTable.getSelectionModel().setSelectionInterval(row, row);
    myTable.getColumnModel().getSelectionModel().setSelectionInterval(column, column);

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

  • How to set the "delete" button in Mail to actually delete instead if Archive Google Mail messages...

    I know these kinds of questions are asked a lot, but I just wanted to ask my specific question for a nice specific answer.
    I understand Gmail's thoughts on archiving and labels, but it makes gmail a beast to work with on mail clients.  I FINALLY have everything set up perfectly on my Mac's Mail app so that everything syncs and I get no duplicate messages.
    The only issue I have is that when I highlight emails and press the "trash" icon in the toolbar (and hit the delete key I assume) the message(s) is/are archived in the All Mail folder instead of going into the "Trash" folder.  The only way I can truly delete messages is to drag and drop them into the Gmail/Trash folder in the side bar, which can get tedious. 
    Is there anyway to set the "delete" icon and delete key to actually send messages to the trash instead if archiving without causing syncing issues, or do I just need to stick with the drag and drop method?
    Thank you.
    Respectfully,
    JAC151

    Take a look here: http://jeffschuette.com/2012/03/07/setting-up-apple-mail-to-rock-and-roll-with-g mail/
    Jeff explains why it happens and how to deal with it.

  • How to get the command button component id  in bean class?

    Hi All,
    I'm using adf 11g.
    I'm having three command button , which have some similar code to use on fire of these buttons.
    if it possible to catch the component id in bean , i can use the code with little parameter passing .

    Hi,
    You can get the command button from the actionEvent (if you are writing a generic actionListener) and from it, you can get the Text of the command button. Using which, you can process accordingly.
    If the text also same, then set some client attribute for the command button (check out [url http://docs.oracle.com/cd/E21764_01/apirefs.1111/e12419/tagdoc/af_clientAttribute.html]af:clientAttribute), and from the actionListener, get the client attribute using getClientAttribute method and process accordingly.
    -Arun

  • [ADF Faces] How to set target for commandLink in af:menuTabs

    I try to use tabbedpane component from Oracle ADF...As I found, they stated that only <af:commandLink> can be child of <af:menuTabs>
    I want to press the tab then the result can be show at the bottom of that tab...as same as the jsf demo from SUN.
    <af:menuTabs binding="#{editor.component}">
    <af:commandLink text="Quick-Info" action="#{action.qinfo_page}"
    selected="true" />
    <af:commandLink text="Vertrieb" action="#{action.vertrieb_page}"/>
    <af:commandLink text="Wichtig" action="#{action.wichtig_page}"/>
    <af:commandLink text="Kontakt" action="#{action.kontakt_page}"/>
    <af:commandLink text="Notizen" action="#{action.notizen_page}"/>
    </af:menuTabs>
    Now when i press to each tab, it will redirect to new page as i define (such as the code in welcome.jsf...then it redirect to qinfo.jsf when i press at Quick-Info tab).
    Pleas help me to solve this problem...I need to show the result at that page (area below the tab). Thank you in advance.

    We're sorry, but this isn't supported. One rationale is that it's not generally sufficient to simply reload the target page; you also have to reload the tab control itself to show the new selection. We generally recommend not using frames in this circumstance, instead putting the menuTabs and the content on one page.
    (BTW, "target" isn't really supported on <h:commandLink> either)

  • How to remove the select button from the alv grid

    Hi,
    I am using the Function modules for alv report,
    My 1st field in the list is checkbox,
    User can select the checkbox for further process.
    My problem is I want to remove the standards select option from alv.
    I have searched in slis_layout_alv for any option, but I could not.
    Please help me.
    Regards
    Rajan

    HI
      Exclude process options from ALV
        PERFORM alv_excl. ( g_r_excl     TYPE  ui_functions  . )
    FORM alv_excl.
      APPEND cl_gui_alv_grid=>mc_mb_sum          TO  g_r_excl.
      APPEND cl_gui_alv_grid=>mc_mb_subtot       TO  g_r_excl.
      APPEND cl_gui_alv_grid=>mc_fc_graph        TO  g_r_excl.
      APPEND cl_gui_alv_grid=>mc_fc_info         TO  g_r_excl.
      APPEND cl_gui_alv_grid=>mc_fc_print_back   TO  g_r_excl.
    ENDFORM.                    " alv_excl
    CALL METHOD g_r_grid->set_table_for_first_display
              EXPORTING
                is_layout                     = g_r_layo
                is_variant                    = g_r_variant
                it_toolbar_excluding       = g_r_excl
                i_save                        = 'X'
              CHANGING
                it_outtab        = g_t_yetprint[]
                it_fieldcatalog  = g_t_fieldcat.
    Options appended in g_r_excl, will be excluded from ALV
    Praveen

  • 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();

  • ADF Faces: how to set height of af:panelBorder to be % of screen height

    Hi,
    I am having hard time setting height of af:panel to be a percentage of screen height. Using inlineStyle, I tried the following but it doesn't work:
    <af:panelBorder inlineStyle="height:90.0%;">
    Any thoughts?
    Thanks
    Message was edited by:
    samsam

    Hi,
    not sure skinning can help here. There is no property on the dialog
    Frank

  • Apple Keybord ADB (Anyone knows how to use the power button?)

    Hi, I just found my uncle's old Mac SE and I was wondering if anyone knows how to set the power button on the keyboard (Apple Keyboard) model number M0116C? I want this key to work, because it is actualy not working.
    Tanks!

    Hi, I just found my uncle's old Mac SE and I was
    wondering if anyone knows how to set the power button
    on the keyboard (Apple Keyboard) model number M0116C?
    I want this key to work, because it is actualy not
    working.
    You don't make any settings for the power switch; either the Mac can use it or it can't. The Mac SE has a rocker power switch on the back of the CPU. The keyboard can't change the state of the power supply. Later Macs could, but not the SE.

  • Unable to set the selected value for a ADF LOV

    Hi,
    I am developing an application using jdeveloper 10.1.3 and Struts.
    I have created a ADF LOV on my JSP Page as given below:
    <html:select property="lob" onchange="javascript:selectLOB(this.form)">
    <html:optionsCollection label="prompt" value="index" property="lob.displayData"/>
    </html:select>
    When i submit the form, i am able to get the value of the selected Value in the List.
    JUCtrlListBinding listBinding = (JUCtrlListBinding) formBean.get("Lob");
    Row r = (Row) listBinding.getSelectedValue();
    String SoLob = (String) r.getAttribute("LobLob");
    But i am unable to set the selected value back in the list when i return to the form again.
    I tried the following:
    int x = listBinding.getSelectedIndex();
    listBinding.setSelectedIndex(x);
    It would be really helpful if some one could let me know what needs to be done.
    Thanks,
    Subashini

    Gyan,
    I tried with the code you suggest , its trying to set the value of a field, but my requirement is to change the property for
    "Rendered" on the field so that based on search parameters we can hide result table column.
    After searching online, I modified the controller code as follows
    1.Created a new transient attribute (Testrender) with type "Boolean" and always updateable.
    2.changed the "Rendered" property value on the field I want to hide as ${oa.PoSearchVO1.Testrender}.
    3. Modified the controller code as follows :
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            OAViewObject testvo = (OAViewObject)am.findViewObject("PoSearchVO1");
            OADBTransaction txn = am.getOADBTransaction();
            if (testvo != null)
              OARow row = (OARow)testvo.first();
                if (a.equalsIgnoreCase("Approved"))
                     row.setAttribute("Testrender", Boolean.FALSE);
                else
                     row.setAttribute("Testrender", Boolean.TRUE);
            } But now when i run the page and populate the search field and click "Go" its hiding the field but throwing the following error and the search results are also bad.
    Its using only the value of one search parameter but not the second one .
    The search cannot be executed because the table has pending changes that would be lost. I think the vo is getting dirty when I update the transient attribute value. So I used txn.rollback ,then search is working fine but its not hiding the field.
    So can you please let me know how to proceed from here ?

Maybe you are looking for

  • Two devices on one iCloud account - how to separate?

    Our family has two iPhones, one a 3 and one a 4s. We just added the 3 to the iTunes account when we got it, it wasn't really a problem that our contacts were synced or new app downloads were until today. I (on the 4s) downloaded a new software update

  • Can someone open this idml file in CS4 and convert it to inx?

    Hi guys, I have a client who has only CS2. I know... I know what you think... But that's beside the point. I need to convert a CS5 doc to an inx so they can open it on their end. I exported it to idml. But when I try to open it in CS4 it just crashes

  • A Problem with Comments on iWeb

    I am having a problem with the comments feature in iWeb. Something has happened where people can no longer add comments to my blog or other sites. Every time they try they see this, "We're sorry. We are having problems processing your request." Does

  • Multiple Signatures on Large Plan Sets? - Open to Other Security Measures

    Good afternoon, I'm looking for a way to circulate large plan sets to three reviewers for digital signature. The PDFs are, and must remain, formatted to clearly print at 24''x36''. As some plan sets are 12+ pages, this is too large to pass along thro

  • Sort Key JUR and allocation

    When invoice sales tax items from the tax conditions are posting to GL tax account document in the allocation field it is always using the txjcd of the shipto but the rate and gl tax amount has been calculated on the plant. Therefore the two don't ma