Change rows property of ADF Table

I am trying to set the rows property of an af:table object based on the value of a drop down box (af:selectOneChoice)
http://img.photobucket.com/albums/v294/jammiedodgers/BrianS/Accounts-1.jpg
I have tried this a number of ways but can't get the table to pick up the change unless I do a browser page refresh. I have the autoSubmit property of the drop down box set to true. It is bound to the rows property of my backing bean (which is also bound to the table rows property)
af:table var="row"
value="#{accountBacking.model}"
rows="#{accountBacking.rows}"
first="#{accountBacking.first}"
banding="row"
styleClass="table.sample"
binding="#{accountBacking.table}"
>
<f:facet name="actions">
<af:selectOneChoice id="rowChoice"
label="Rows Per Page: "
autoSubmit="true"
value="#{accountBacking.rows}"
valueChangeListener="#{accountBacking.rowChange}">
<f:selectItem itemLabel="5" itemValue="5"/>
<f:selectItem itemLabel="10" itemValue="10"/>
<f:selectItem itemLabel="20" itemValue="20"/>
<f:selectItem itemLabel="50" itemValue="50"/>
</af:selectOneChoice>
</f:facet
Here is the code from by backing bean. (accountBacking)
package com.stlouiscity.budget.jsf.beans;
import com.stlouiscity.budget.database.beans.AccountBean;
import com.stlouiscity.budget.database.dao.AccountDAO;
import com.stlouiscity.budget.database.dao.DAOFactory;
import com.stlouiscity.budget.jsf.delegates.AccountService;
import java.util.List;
import javax.faces.application.Application;
import javax.faces.application.ViewHandler;
import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import oracle.adf.view.faces.context.AdfFacesContext;
import oracle.adf.view.faces.model.SortableModel;
import oracle.adf.view.faces.component.core.data.CoreTable;
import oracle.adf.view.faces.event.ReturnEvent;
public class AccountBacking implements java.io.Serializable{
private AccountService acctService;
private AccountBean account;
private CoreTable table;
private SortableModel model;
private Integer first;
private Integer rows;
/** Creates a new instance of AccountBacking */
public AccountBacking() { 
acctService = new AccountService();
AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
setFirst((Integer)afCtx.getProcessScope().get("first"));
setRows((Integer)afCtx.getProcessScope().get("rows"));
//afCtx.getProcessScope().clear();
public CoreTable getTable() {
return table;
public void setTable(CoreTable table) {
this.table = table;
public SortableModel getModel() {
if (model == null)
refreshAction();
return model;
public void setModel(SortableModel model) {
this.model = model;
public AccountBean getAccount() {
return this.account;
public void setAccount(AccountBean account) {
this.account = account;
public void setRowData() {
try {
this.account = (AccountBean) this.table.getRowData();
} catch (NullPointerException npe) {
this.account = new AccountBean();
public String editAccountAction() {
setRowData();
AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
if (getAccount() == null) {
setAccount(new AccountBean());
afCtx.getProcessScope().put("account",getAccount());
afCtx.getProcessScope().put("first",this.table.getFirst());
afCtx.getProcessScope().put("rows",this.table.getRows());
return "EditAccount";
public String deleteAccount() {
setRowData();
acctService.deleteAccount(this.getAccount());
refreshAction();
return null;
public String refreshAction() {
List list = acctService.getAccounts();
ListDataModel listModel = new ListDataModel(list);
model = new SortableModel(listModel);
table.setValue(getModel());
table.setRows(getRows());
table.setFirst(getFirst());
return null;
public void rowChange(ValueChangeEvent event) {
refreshAction();
public Integer getFirst() {
return first;
public void setFirst(Integer first) {
if (first != null) {
this.first = first;
} else {
this.first = 0;
AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
afCtx.getProcessScope().put("first",this.first);
public Integer getRows() {
return rows;
public void setRows(Integer rows) {
if (rows != null) {
this.rows = rows;
} else {
this.rows = 10;
AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
afCtx.getProcessScope().put("rows",this.rows);
I am attempting to pass the rows and first property of the table into the process scope and then look them back up during the constructor. The backing bean is request scoped. I do no want to use a session scoped bean because I don't want to have to deal with thread safety.

One thing...I use a technique mentioned in other threads to refresh the page that changes the view root to the page it is currently at. I call this after I return from a dialog: page to enact any change that the dialog page did that the current page should see. One problem here: the af:table does not seem to refresh (sometimes?), even when I put this partial target assignment in the return action listener of the button that enacted the dialog:...but I found a solution! In the life cycle I look for that view root to come up, tap into the backing bean of the current page to get the table UIComponent, and do this partial target assignment. Here is the lifecycle prepareModel code...
String lCurrentView = fctx.getViewRoot().getViewId();
if (PartialPageUtils.isPartialRequest(fctx)) {
// Create an elsif for each form which has a popup you want to refresh from.
if (lCurrentView.equals("/WPForm.jspx")) {
CoreTable AccessoriesTable = (CoreTable)EL.get("#{WPForm.accessoriesTable}");
AdfFacesContext.getCurrentInstance().addPartialTarget(AccessoriesTable);
AdfFacesContext.getCurrentInstance().partialUpdateNotify(AccessoriesTable);
super.prepareModel(ctx);
Note: EL is a helper class that Steve M. (I think) wrote, which gets and sets ValueBindings. A similar functionality can be found in his ADFUtils and JSFUtils classes in the SRDemo app for ADFBC, downloadable from TechNet.oracle.com ...or the JDev help menu updates section.

Similar Messages

  • How to set text and background color of current row in a adf table?

    Hi,
    In jdev 11.1.2.3,
    How to set text fond and background color of current row in a adf table?
    I tried to set Background color in table property, but that is not what i want.
    Thanks.

    Hi,
    We almost had the same requirement, but we just needed to color a specific column.
    Here goes the solution to that, you might do the same for your row highlighting
    Changes are required in jsff and one method to be added in backing bean
    1. JSFF :
    <af:column headerText="Amount"
                     id="c4" width="100"
                     inlineStyle="#{backingBeanScope.BackingBean.cellColor}">2. Backing Bean
    //searchResultTableVO is Table's VO
    public String getCellColor() {
          FacesContext ctx = FacesContext.getCurrentInstance();
          ExpressionFactory ef = ctx.getApplication().getExpressionFactory();
          ValueExpression ve = ef.createValueExpression(ctx.getELContext(), "#{row}", FacesCtrlHierNodeBinding.class);
          FacesCtrlHierNodeBinding node = (FacesCtrlHierNodeBinding)ve.getValue(ctx.getELContext());
          Row row = node.getRow();
        if(row.equals(searchResultTableVO.getCurrentRow())){
    //You can add your inline style for font-style too
          return "background-color:Red;";
             return null;
      }Hope this is helpful :)
    Regards,
    Neha..

  • How to differentiate a row in a ADF table in Oracle 11g

    Hi
    How to differentiage the each row in a ADF table with the back ground colour? I tried with RowBandingInterval option, but it didn't work out?
    Thanks

    Hi,
    setting row banding to 1 (the default) works for me on FF and IE 7
    Frank

  • Temparally remove rows from a ADF table by action event of a jsf page.

    Hello Developers,
    I needed to temporally remove rows of a ADF table when execute action event of corresponding page.
    So in this case my task can describe by following steps,
    (1). I created a ADF table using <af:table> on a jsf page.
    (2). The data populated using a VO.
    (3). Several radio buttons added to the page for temporally remove rows from the table.
    This means one radio button check, it responsible to temporally remove rows which contain empty cell values of a identified column.
    If I check another radio button it should temporally remove identified data included rows but above removed (empty cell included rows) rows should appear in this event
    My ultimate target is temporally remove rows of a table & re call again removed rows another event without again & again query from BC.
    Pleas advice me to archive this task very sealy?
    (Are there have a way to do this using EL or coding in Manage bean ?)
    Thanks in advance..!

    Hi,
    the DCIterator gives you an option to iterate over the fetched rows (the ones you see in the table). You can try call removeAndRetain() on these rows. This will not remove or delete rows but allows you to insert these rows back to the collection.
    JavaDocs:
    * Removes the row from the collection and then retain it for insertion
    * into another location.
    * <p>
    * This method differs from <code>{@link #remove()}</code> in that
    * it just removes the row from the collection. It does not
    * remove the underlying Entity row(s) or database row(s).
    * <p>
    * This method also differs from <code>{@link #removeFromCollection()}</code>
    * in that after the row is removed from the collection, it can be inserted
    * back into the collection at another location.
    void removeAndRetain();
    Frank

  • How to programmatically change style in an ADF table

    Hi,
    I got an ADF table generated form my data controls.
    But I need to change de style of every cell in my backing bean.
    I can't really find anything usefull on google, hopefully you guys can provide me with some usefull information.

    I got my answer somewhere else :
    >
    Based on the comments we now know that you use jdev 11.1.2.2.0. What you can do is to bind the styleClass property of the table to a backing bean property. The property in the bean has a getter and a setter method. In the setter method you can get all the values you need from the row and do you calculation. Based on the outcome you return the name of a style class suitable for the cell. The different style classes you define in a skin fro the application. If you e.g. defien the following style classes in your skin
    .high_value { background-color:green; }
    .negative_value { background-color:red;}
    and in a bean in request scope, which you access from the page the table is on
        private String styleForCell;
    public String getStyleForCell()
        // get the value of the cell
        FacesContext lContext = FacesContext.getCurrentInstance();
        ELContext lELContext = lContext.getELContext();
        ExpressionFactory lExpressionFactory = lContext.getApplication().getExpressionFactory();
        Number val;
        val = (Number) lExpressionFactory.createValueExpression(lELContext, "#{row.valargument}", Object.class).getValue(lELContext);
        if (val == null)
            return "";
        // do the calculation and return the suitable style class
        int ival = val.intValue();
        if (ival >= 100000 )
            return "high_value";
        else if (ival < 0)
            return "negative_value";
        else
            return "";        
    public void setStyleForCell(String aStyleForCell)
        this.styleForCell = aStyleForCell;
    }Now you can access the calculated style class from the tables column styleClass property as #{beanname.styleForCell} This will call the method for each cell of the column.

  • Jdev 11.1.1.5 R1 How To Get Row Data From ADF Table

    Hi everyone,
    I have an ADF Table Populated with dummy data (for now). Below the Table there is an InputText field.
    What I need to do is have the body of the message show up in the InputText field when the user clicks on a message in the inbox(Table).
    I've been trying to figure this out for quite some time now, unsuccessfully of course. Hopefully you guys can help me change that.
    I do consider myself a beginner still, so please be as clear and specific as possible.
    Thanks in advance!
    Here is the code I have for the Table/InputText and Backing Beans
    <tr>
    <td>
    <af:table value="#{TableBean.messageAll}" var="message"
    rows="5"
    inlineStyle="color:Navy; border-style:outset; border-color:Background; border-width:thick; font-size:small; text-align:center; vertical-align:middle; height:135.0px;"
    width="610" rowBandingInterval="0" id="t1"
    rowSelection="single"
    selectionListener="#{TableBean.messageSelected}"
    immediate="true" summary="Message Inbox"
    disableColumnReordering="true"
    columnSelection="none"
    columnResizing="disabled">
    <af:column sortable="false" align="center"
    id="chechboxCol" width="25"
    minimumWidth="25">
    <f:facet name="header">
    <h:selectBooleanCheckbox id="selectAll"
    onclick="selectAll();"></h:selectBooleanCheckbox>
    </f:facet>
    <h:selectBooleanCheckbox id="selectMessage"
    value="#{message.selected}"
    immediate="true"></h:selectBooleanCheckbox>
    </af:column>
    <af:column id="urgentCol" width="25" align="center"
    minimumWidth="25">
    <f:facet name="header">
    <h:outputText id="urgentHeader">
    <img src="urgent.gif" height="14"
    width="14" alt="Urgent Icon"/>
    </h:outputText>
    </f:facet>
    </af:column>
    <af:column sortable="true" headerText="From"
    align="start" id="fromCol" width="175"
    minimumWidth="175">
    <af:outputText value="#{message.from}"
    id="ot1"/>
    </af:column>
    <af:column sortable="true" headerText="Subject"
    align="start" id="subjectCol" width="175"
    minimumWidth="175">
    <af:outputText value="#{message.subject}"
    id="ot2"/>
    </af:column>
    <af:column sortable="true" headerText="Type"
    align="start" id="c5" width="100"
    minimumWidth="100">
    <af:outputText value="#{message.type}"
    id="ot3"/>
    </af:column>
    <af:column sortable="true"
    headerText="Date Received" align="start"
    id="c6" width="80" minimumWidth="80">
    <af:outputText value="#{message.date}"
    id="ot4"/>
    </af:column>
    <af:column sortable="true" headerText="Body"
    rendered="false" align="start" id="c7"
    width="100" minimumWidth="100">
    <af:outputText value="#{message.body}"
    id="ot5"/>
    </af:column>
    </af:table>
    </td>
    </tr>
    <tr>
    <td>
    <p>
    <af:commandButton text="Print" id="printButton"
    inlineStyle="font-size:x-small;"/>
    </p>
    <af:inputText binding="#{TableBean.textArea}" rows="10"
    readOnly="true" partialTriggers="t1"
    contentStyle="width:620px;"
    inlineStyle="color:Black; outline-color:Background; outline-style:outset;"
    id="it1"></af:inputText>
    </td>
    </tr>
    package Backing;
    import javax.faces.event.ActionEvent;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adf.view.rich.component.rich.output.RichOutputText;
    import java.util.List;
    import java.util.ArrayList;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    import org.apache.myfaces.trinidad.event.SelectionEvent;
    public class TableBean {
    private RichInputText textArea;
    private message[] messageAll =
    new message[] { new message("Sender 1", "Author 1", "Message 1",
    "Alert", "6/21/2011",
    "This is the body 1."),
    new message("Sender 2", "Author 2", "Message 2",
    "Notification", "6/22/2011",
    "This is the body 2."),
    new message("Sender 3", "Author 3",
    "Message 3", "Broadcast", "6/23/2011",
    "This is the body 3."),
    new message("Sender 4", "Author 4",
    "Message 4", "Alert", "6/24/2011",
    "This is the body 4."),
    new message("Sender 5", "Author 5", "Message 5",
    "Notification", "6/25/2011",
    "This is the body 5."), };
    public message[] getmessageAll() {
    return messageAll;
    public void messageSelected(SelectionEvent selectionEvent) {
    textArea.setValue("Message body should go here.");
    public void setTextArea(RichInputText textArea) {
    this.textArea = textArea;
    public RichInputText getTextArea() {
    return textArea;
    public class message {
    boolean selected;
    String from;
    String to;
    String subject;
    String type;
    String date;
    String body;
    public message(String from, String to, String subject, String type,
    String date, String body) {
    this.from = from;
    this.to = to;
    this.subject = subject;
    this.type = type;
    this.date = date;
    this.body = body;
    public String getFrom() {
    return from;
    public String getTo() {
    return to;
    public String getSubject() {
    return subject;
    public String getType() {
    return type;
    public String getDate() {
    return date;
    public String getBody() {
    return body;
    }

    try this code in selection method
    RichTable object = (RichTable)selectionEvent.getSource();
    Row row = null;
    for (Object facesRowKey : object.getSelectedRowKeys()) {
    object.setRowKey(facesRowKey);
    Object o = object.getRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)o;
    row = rowData.getRow();
    }

  • How to get edited row values from ADF table?

    JDev 11.
    I have a table which is populated with data from Bean.
    I need to save changes after user make changes in any table cell. InputText is defined for table column component.
    I have defined ValueChangeListener for inputText field and AutoSubmit=true. So when user change value in inputText field, method is called:
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    getSelectedRow();
    SaveMaterial(material);
    This method should call getSelectedRow which take values from selected table row and save them into object:
    private Row getSelectedRow(){
    RichTable table = this.getMaterialTable();
    Iterator selection = table.getSelectedRowKeys().iterator();
    while (selection.hasNext())
    Object key = selection.next();
    table.setRowKey(key);
    Object o = table.getRowData();
    material = (MATERIAL) o;
    System.out.println("Selected Material Desc = "+material.getEnumb());
    return null;
    Problem is that getSelectedRow method doesnt get new (edited) values, old values are still used.
    I have tried to use ActiveButton with same method and it works fine in that case. New values are selected from active row and inserted into object.
    JSF:
    <af:table var="row" rowSelection="single" columnSelection="single"
    value="#{ManageWO.material}" binding="#{ManageWO.materialTable}">
    <af:column sortable="false" headerText="E-number">
    <af:inputText value="#{row.enumb}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    <af:column sortable="false" headerText="Description">
    <af:inputText value="#{row.desc}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    </af:table>
    <af:activeCommandToolbarButton text="Save" action="#{ManageWO.EditData}"/>
    What is a correct place from where save method should be called to get new (edited) values from ADF table?
    Thanks.

    Did you look into the valueChangeEvent?
    It has oldValue and newValue attributes.
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    Object oldVal = valueChangeEvent.getOldValue();
    Object newVal = valueChangeEvent.getNewValue();
    // check if you see what you are looking for.....
    getSelectedRow();
    SaveMaterial(material);
    }Timo

  • How to change "next" "previous" in ADF table ?

    **hi ,**
    **I am using oracle jdev 10.1.3.4**
    **I want to put my own text instead of "next" "previous" in ADF table , also I have the same problem in shuttle box ,**
    **I want to change the default javascript validation (ex: shuttle box alerts)**
    **I do not know to customize it or where these files saved ?**
    **any one can help ?**

    Hi Dave,
    Thank you so much for the email.  I tried every object and method I can
    posibly think about such as
    myTable.Rows.Item(1).PointSize = 24
    myCell.Characters.Item(1).PointSize = 24
    I got error message all the time.  These objects don’t support PointSize.
    All I need is to change point size of the text in InDesign tables created
    using VBScript. Could you help me with this?  Thanks,
    Regards,
    Li

  • Single-row refresh in ADF tables, with PPR

    Hello everybody. I have an application in JDeveloper 11gR2 environment.
    Here are my requirements:
    1. I have a table, each cell is an input text;
    2. Some cell must be rendered differently depending on a specific key-field (for example, input or output text)
    3. Any manual change in the key-field must result in a re-rendering of the interested row, not the entire table.
    I addressed req 2 using an af:switcher which renders either a facet or another, evaluating the key-field.
    About req 3, I tried to set auto-submit to true on key-field and then specifying partialTriggers="key-field-id" in the column component including the switcher.
    It works, with 2 issues:
    a) the main one: it refreshes the entire table (which simply disappear/reappears when I tab out of the key-field);
    b) the second one: I'd prefer not to use the auto-submit 'cause I don't want to submit anything, yet: I just want to change rendering/values of other cells.
    Any idea?
    Thanks a lot,
    Emanuele

    Hi,
    I addressed req 2 using an af:switcher which renders either a facet or another, evaluating the key-field.
    I would have used an af:inputText field and set the readOnly property to true for the read only fields. This can be done through EL
    About req 3, I tried to set auto-submit to true on key-field and then specifying partialTriggers="key-field-id" in the column component including the switcher.
    It works, with 2 issues:
    You cannot just refresh a single row. The table is stamped at rendering, which means individual rows are not represented by their own object
    Frank

  • Row selection in adf table issue after commit or rollback

    Using jdev 11g (11.1.1.62)
    I have a adf table with multi select enabled. There is a child table bounded at BC4J level via a VL
    On the rowSelectionListener I attached a bean method. This bean method bascially finds the selected row from UI and then based on it query the child vo again and then finally refreshes the child table.
    This works fine as expected.
    However, what happens is when the Cancel button is called on UI which is bound to a rollback action in the AMImpl then the UI refreshes. And the master table still shows the previously selected row but the child VO shows the rows of the first master VO row rather the selected one.
    How to fix this? Further as old row is already selected in the master table so reclicking on the same row does nothing,

    just to update after the rollback is called in the cancel button i wrote following code which does not change the row focus to the first row
    DCBindingContainer bc =
    (DCBindingContainer)BindingUtils.getBindingContext().getCurrentBindingsEntry();
    DCIteratorBinding profItr =
    bc.findIteratorBinding("ProfileSearchInstIterator");
    Row cRow = profItr.getRowAtRangeIndex(0);
    if(cRow != null){
    System.out.println("Current row is not null so fixed ");
    profItr.setCurrentRowIndexInRange(0);
    RowKeySetImpl rks = new RowKeySetImpl();
    ArrayList keyList = new ArrayList();
    keyList.add(cRow.getKey());
    rks.add(keyList);
    profileTable.setSelectedRowKeys(rks);
    AdfFacesContext.getCurrentInstance().addPartialTarget(profileTable);
    }

  • Multiple row selection in ADF Table using addition column with checkbox

    I am using ADF table(Jdeveloper11g) and i want to selecte multiple rows it may be more than one OR all rows.
    For that i added one Column to the table with Header Delete and checkbox
    <af:table....
    <af:column sortProperty="Delete" headerText="Delete" width="100"
    sortable="false">
    <af:selectBooleanCheckbox label="#{row.favoriteId}"
    valueChangeListener="#{Mybean.onCheck}"
    id="checkbox" autoSubmit="true">
    </af:selectBooleanCheckbox>
    </af:column>
    </af:table>
    backing bean:Here i added code to get Value of one column with id favoriteId and use an arrayList(listForDelete) to monitor the state of the checkboxes
    public void onCheck(ValueChangeEvent valueChangeEvent) {
    BindingContainer bindings = getBindings();
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind =
    (DCIteratorBinding)bindings.get("getUserFavoritesByUserIDIterator");
    if (iterBind != null && iterBind.getCurrentRow() != null) {
    RichSelectBooleanCheckbox ch = (RichSelectBooleanCheckbox)valueChangeEvent.getSource();
    if (!ch.isSelected()) {
    Long issueId = (Long)iterBind.getCurrentRow().getAttribute("favoriteId");
    listForDelete.add(issueId);
    else
    Long issueId = (Long)iterBind.getCurrentRow().getAttribute("favoriteId");
    listForDelete.remove(issueId);
    Problem is that when i select single row checkBox, onCheck() method of backing bean gets called multiple times(equals to the number of rows)
    I think this is beacuse of <af:selectBooleanCheckbox id is same that is "checkbox" but i am not sure.Even i tried to assign some unique id but no any success in assigning Id with value Expression.
    I also find related post
    Re: ADF Table Multiple row selection by Managed Bean
    but that is related to Select All rows or Deselect all rows from table.
    From the simillar post i follow the steps given by Frank.but problem with below step
    ->have an af:clientAttribute assigned to the checkbox with the following EL #{row.key} ,here I added <af:clientAttribute name="#{row.key}"></af:clientAttribute> and i am getting error
    Error(64,37):  Static attribute must be a String literal, its illegal to specify an expression.
    Please let me know if any one had already implemented same test case.
    Thanks for all help
    Jaydeep
    Edited by: JaydeepJ on Aug 7, 2009 4:42 AM

    just to update after the rollback is called in the cancel button i wrote following code which does not change the row focus to the first row
    DCBindingContainer bc =
    (DCBindingContainer)BindingUtils.getBindingContext().getCurrentBindingsEntry();
    DCIteratorBinding profItr =
    bc.findIteratorBinding("ProfileSearchInstIterator");
    Row cRow = profItr.getRowAtRangeIndex(0);
    if(cRow != null){
    System.out.println("Current row is not null so fixed ");
    profItr.setCurrentRowIndexInRange(0);
    RowKeySetImpl rks = new RowKeySetImpl();
    ArrayList keyList = new ArrayList();
    keyList.add(cRow.getKey());
    rks.add(keyList);
    profileTable.setSelectedRowKeys(rks);
    AdfFacesContext.getCurrentInstance().addPartialTarget(profileTable);
    }

  • Re: Getting the current selected Row & column in adf table

    Hi,
    Our requirement is we have to retrieve both the current row and column in adf table.
    We can retrieve the current row in the backing bean like
    ViewObject view = getViewObject();
    view.getCurrentRow();
    Is it possible to retrieve selected column id or column header text as we are getting for row?
    please give some sample.
    Thanks,
    Vijay.
    Edited by: Vijayakumar Palanisamy on Jun 23, 2011 2:23 AM

    Hi John
    My exact requirement,
    1.     We have collection of records in adf table
    2.     Each cell in the row has commandImageLink (Like adding approver, edit approver, delete etc)
    Currently it’s working fine for me in the commandImageLink listener, but the problem is table is refreshed 2 time,
    while selecting a record and commandImageLink is clicked, I have to avoid 2 times refreshing,
    If it’s possible to identify a particular cell in the row selection, I can avoid the image link listener.
    we are using Jdeveloper11.1.1.4.0
    Please suggest.
    Thanks,
    Vijay

  • How to perform Autosubmit  on Row selection in ADF Table

    Hi,
    I am using ADF Table , in which I want to enable AutoSubmit for the Table Row Selection.
    I want to enable some button on my screen when a row is selected in the table.
    I want to achive this with out using SelectionListener .. any iputs for this?
    Thanks,
    Swathi

    Hi Timo,
    here is my code : this code is to implement Custom shuttle .. where I am using two ADF Tables to display the Available list and Selected List ..and using navigation buttons to move the selected item.When I select a Row in the left table .. I want to enable the 'add' button.
    <af:table value="#{pageFlowScope.ebean.al}" var="row"
                      rowBandingInterval="0" varStatus="vs" id="t2"
                      rowSelection="single"
                      binding="#{pageFlowScope.ebean.availableList}"
                      partialTriggers="::cb2 ::cbAdd ::cbRemove"
                      summary="#{backingBeanScope.BundleBean.MEASURES}"
                       selectionListener="#{pageFlowScope.ebean.rowSelection}"
                      inlineStyle="height:200.0px;" horizontalGridVisible="false">
              <af:column sortProperty="Name" sortable="false"
                         headerText="Name"
                         id="c3" width="300" rowHeader="unstyled">
                <af:panelGroupLayout id="pgl6">
                  <af:image source="/images/file_ena.png" id="i2"
                            shortDesc="#{backingBeanScope.BundleBean.FILE_ENA}"/>
                  <af:outputText value="#{row.label}" id="ot2"/>
                </af:panelGroupLayout>
              </af:column>
            </af:table>
          </af:panelGroupLayout>
          <af:panelGroupLayout id="pgl3" layout="vertical"
                               inlineStyle="width:39px;">
            <af:commandButton id="cbAdd"
                              actionListener="#{pageFlowScope.ebean.onAdd}"
                              partialSubmit="true"
                              disabled="#{pageFlowScope.ebean.dataToAdd==null}"
                              icon="/images/shuttleright_ena.png"
                              shortDesc="#{backingBeanScope.BundleBean.ADD}"
                              partialTriggers="t2"/>
            <af:spacer width="10" height="10" id="s1"/>
            <af:commandButton id="cbAddAll" action="addAll"
                              actionListener="#{pageFlowScope.ebean.onAddAll}"
                              disabled="#{pageFlowScope.ebean.availableListSize==0}"
                              icon="/images/shuttlerightall_ena.png"
                              shortDesc="#{backingBeanScope.BundleBean.ADD_ALL}"
                              partialTriggers="cbRemove"/>
            <af:spacer width="10" height="10" id="s2"/>  
            <af:commandButton id="cbRemove" partialSubmit="true"
                              actionListener="#{pageFlowScope.ebean.onRemove}"
                              icon="/images/shuttleleft_ena.png"
                              shortDesc="#{backingBeanScope.BundleBean.REMOVE}"
                              partialTriggers="t3"
                              disabled="#{ pageFlowScope.ebean.dataToRemove==null}"/>
            <af:spacer width="10" height="10" id="s4"/>
            <af:commandButton id="cbRemoveAll"
                              actionListener="#{pageFlowScope.ebean.onRemoveAll}"                         
                              icon="/images/shuttleleftall_ena.png"
                              shortDesc="#{backingBeanScope.BundleBean.REMOVE_ALL}"
                              disabled="#{pageFlowScope.ebean.listSize==0}"
                              partialTriggers="cbAdd "/>
          </af:panelGroupLayout>
          <af:panelGroupLayout id="pgl5">
            <af:outputText value="#{backingBeanScope.BundleBean.SELECTED_MEASURES}#{pageFlowScope.ebean.listSize}#{backingBeanScope.BundleBean.CB}"
                           id="ot3"
                           inlineStyle="font-weight:bold; font-size:small;"
                           partialTriggers="cbAdd cbRemove"/>
            <af:table value="#{pageFlowScope.ebean.sl}" var="row"
                      rowBandingInterval="0" varStatus="vs" id="t3"
                      rowSelection="single"
                      binding="#{pageFlowScope.ebean.list}"
                      partialTriggers="::cbAdd ::cbAddAll ::cbRemove ::cbRemoveAll"
                      summary="#{backingBeanScope.BundleBean.MEASURES}"
                      selectionListener="#{pageFlowScope.ebean.rowSelection}"
                       inlineStyle="height:200.0px;" horizontalGridVisible="false">
              <af:column sortProperty="Name" sortable="false"
                         headerText="Name"
                         id="c5" width="300" rowHeader="unstyled">
                <af:panelGroupLayout id="pgl9">
                  <af:image source="/images/file_ena.png" id="i3"
                            shortDesc="#{backingBeanScope.BundleBean.FILE_ENA}"/>
                  <af:outputText value="#{row.label}" id="ot1"/>
                </af:panelGroupLayout>
              </af:column>
            </af:table>
        </af:panelGroupLayout>
    public void rowSelection(SelectionEvent selectionEvent) {
            RichTable at = (RichTable)selectionEvent.getComponent();
            if(at.getId().equals("t2"))
                getDataToAdd();
            else          
               getDataToRemove();       
        public Object getDataToAdd(){
            if(availableList!=null)
         return availableList.getComponent().getSelectedRowData();
            return null;
        public Object getDataToRemove() {       
            if (list != null && list.getComponent().getSelectedRowKeys()!=null)
                    return list.getComponent().getSelectedRowData();
            return null;
        }Thanks,
    Swathi

  • Changing row content in displayed table & saving it in database table back

    hi!
      I am just Learning BSP applications.....i got struck with a problem....
       i am using cl_htmlb_tableview class for selecting a row...and that line is made editable....
    i want to change the data of that line and then modify the entry in the database table....
    i am using a button to be clicked and in that i am reading the line according to the 'tv_data->rowselection'
    and modifying the database table with that work area...but my data is not changing....
       Can u help me out how to get this....and what is that is being missed ......and how to proceed with it so that it is done....

    Hi,
    Foolow the below code.
    In the Do_Handle_event,
    case event.
    when 'id of the button'.
          submit( ).
    endcase.
    In the Submit method,
    data:  loc_table_event type ref to cl_htmlb_event_tableview.
    call method cl_hrrcf_iterator=>get_tv_attr
        exporting
          p_tv_id               = 'Tble view id'
          p_component_id        = me->component_id
          po_request            = me->request
        importing
          po_tv_event           = loc_table_event.
    local varibale = loc_table_event->get_cell_value(
                                             row_index     = indv
                                             column_index  = feild number ).
    <now update ur database with local variable value>
    Hope this will be helpful.
    Regards,
    Gokul.N

  • Frozen property in adf:table

    Hai everyone, i was wondering why cant we freeze right side of the table or any particular column because frozen property is applied from left side columns.Can anyone share me with your ideas.
    Thanks in advance.
    Edited by: wyse14 on Feb 5, 2013 9:58 PM

    hai frank ,
    yes offcourse .But it is the actual reason or can we change the default format. My requirement is to keep last column frozen .
    Thanks and Regards

Maybe you are looking for

  • "access to keychain forbidden" while adding CalDav account

    My problems started when a client's mobile account became disabled after the open directory locked them out.  I was able to "unlock" the account by deleting the a keychain (somehow, I am not so good documenting while under pressure).  Unfortunately,

  • Scniwall 2400 GVC (vpn) is not working after FIPS Enable

    Hi ,Yesterday i have enabled FIPS Mode on my Sonicwall 2400 after that globle vpn is not working i i am getting following error which connecting:2015/07/10 16:17:52:918 Information x.x.x.x Phase 1 has completed.2015/07/10 16:17:52:918 Error x.x.x.x F

  • Sending mail to multiple adress

    Hello friends, i have written java code for sending mail,its working fine for single mail address. if we include multiple mail address its giving ERROR:" Illegal route-addr in string" , so friends if there is any solution for this problem: please kin

  • Using ipad or mini with HDMI TV

    Is there a way to connect an ipad or mini to the HDMI input on a TV?

  • Save all Open Files in CS4?

    Hi all, Looking for a script that will save all open files as a a JPG to a specific directory.  I tried using this in CS4 but it doesnt work.  It just opens the save dialog and thats it.  Want something a bit more automated: var tempFolder = new Fold