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

Similar Messages

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

  • How to focus a specified column in ADF Table at run time?

    I drag and drop an ADF table.It contains *10 column*..I bind the column using ArrayList..First 3 column is set frozen =True..At the time of runtime,a Horizontal scroll is appeared..*May be for certain conditions , only 8th column contains values at run time.So i want to focus that column Only*.Because it is very easy for an user to see the value..If not,user has to scroll the bar to check. How can  i focus a specified column?

    Hi Briston,
    You can make the column selected by setting "selected" property of column to true
    Sireesha

  • ADF 11g How to create the custom FilterableQueryDescriptor for adf table

    Can you please let me know on the following.
    1. I am dispalying the adf table using a List from the managed bean
    2. I wanted to filter the table using the filter model.
    3. i wanted to create the sub class of FilterableQueryDescriptor which i can specify. Not finding enough information on how to create and add the information in the setFilterCriteria
    Can you please provide some insight into this topci

    Hello there
    I have the same issue: chaging the background color of some column headers.
    My application is using a custom skinning and when i had headerClass property with a custom class defined in a separate css file, the page generated specified first the class from the skinning and then my new class definition. But my skinning is specifying a background color so the color is not overriden. Any idea?
    ADF code:
    <link type="text/css" rel="stylesheet" href="../../css/pivot.css" id="myStyles"/>
    <af:column headerText="#{level1.userObject.name}"
    headerClass="inputHeader"
    sortable="false" align="center" width="100"
    id="col_level1" >
    Generate HTML code:
    <th align="center" class="xuh inputHeader" afrroot="true" rowspan="2" afrleaf="true" dindex="6" id="pt1:tableId:col_level1" style="">
    <div class="x13t">AEKLF</div>
    </th>
    My CSS file:
    .inputHeader{
    background-color: Red;
    background-image: none;
    color: Black;
    font-weight: bold;
    Thanks for your help !

  • Create ADF Table at runtime

    Hi,
    I am trying to create ADF table at run time. Initially I tried to include all the tables at design time. Then I turned the setVisible property to false. Then , based on the condition, I turned it to true at runTime, so that to give the effect of the table getting created at run time.
    But now, I would like to know , is there any option to extract the table component from the ViewObject or from the iterator, at run time.
    say,
    I have my ViewObject like this.
    DCIteratorBinding dcIter=(DCIteratorBinding)bindings.getControlBinding("Table1View1Iterator");
    ViewObject vo=dcIter.getViewObject();
    Now, I have a panel, 'pb1'. I am able to add input boxes at run time. Now I want to add the table that corresponds to the above View also at run time.
    Could someone pls give me the suggestion..
    Thanks,
    Sabarisri. N

    well, in that case you can create table dynamically from managed bean. I am giving you a sample code which add row dynamically to a table on click of "Add" button.
    jspx code:
    <af:document id="d1" title="XXXX">
          <af:form id="f1">
            <af:commandButton text="Add" id="cb1" action="#{MyBean.add}"/>
            <af:table varStatus="rowStat" summary="table"
                      value="#{MyBean.collectionModel}"
                      rows="#{MyBean.collectionModel.rowCount}"
                      rowSelection="none" contentDelivery="immediate" var="row"
                      rendered="true" id="t1">
              <af:forEach items="#{MyBean.columnNames}"
                          var="name">
                <af:column sortable="true" sortProperty="#{name}"
                           rowHeader="unstyled" headerText="#{name}"
                           inlineStyle="width:100px;" id="c1">
                  <af:activeOutputText value="#{row[name]}" id="aot1"/>
                </af:column>
              </af:forEach>
            </af:table>
          </af:form>
        </af:document>managed bean:
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Map;
    import org.apache.myfaces.trinidad.model.CollectionModel;
    import org.apache.myfaces.trinidad.model.SortableModel;
    public class MyBean {
        private SortableModel model;
        private List<String> columnNames;
        public MyBean() {
            System.out.println("Cntl in MyBean constructor :::");
            columnNames = new ArrayList<String>();
            columnNames.add("Col-1");
            columnNames.add("Col-2");
    //        generateColumnModel();
        public void generateColumnModel() {
            this.model = new SortableModel(createRows(columnNames));
        private static List<Map> createRows(List<String> columnNames) {
            int i = 0;
            List<Map> mapListforRows = new ArrayList<Map>();
            //for (String name : columnNames) {
                Map newRow = new HashMap();
                mapListforRows.add(newRow);
                for (String col : columnNames) {
                    newRow.put(col, "data");
            return mapListforRows;
        public String add() {
            System.out.println("Cntl in add method :::");
    //        columnNames = new ArrayList<String>();
    //        columnNames.add("Col-1");
    //        columnNames.add("Col-2");
            generateColumnModel();
            return null;
        public CollectionModel getCollectionModel() {
            return model;
        public void setColumnNames(List<String> columnNames) {
            this.columnNames = columnNames;
        public List<String> getColumnNames() {
            return columnNames;
    }I hope this will help you to solve your use case
    ~Abhijit

  • How to bind dynamic columns in ADF table to view object

    In the below piece of code i am trying to bind a dynamically added column to my newly added attribute in view object, but the value expression does not set the value of this attibute in the view object please help on what is wrong in this code ??
    <af:table value="#{bindings.ViewObj1.collectionModel}" var="row"
    rows="#{bindings.ViewObj1.rangeSize}"
    emptyText="#{bindings.ViewObj1.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.ViewObj1.rangeSize}"
    filterModel="#{bindings.ViewObj1Query.queryDescriptor}"
    queryListener="#{bindings.ViewObj1Query.processQuery}" varStatus="vs"
    selectedRowKeys="#{bindings.ViewObj1.collectionModel.selectedRow}"
    rowSelection="single"
    binding="#{backingBeanScope.backing_createDTpg1.table1}"
    id="table1"
    columnSelection="single"
    partialTriggers="::addCol ::addColAfter ::addColBefore ::removeCol ::addRow ::addRowAfter ::addRowBefore ::removeRow ::addAction ::addActionAfter ::addActionBefore ::deleteAction :::dialog1 :::d1"
    allDetailsEnabled="true" verticalGridVisible="false"
    horizontalGridVisible="true" width="100%" disableColumnReordering="true"
    selectionListener="#{bindings.ViewObj1.collectionModel.makeCurrent}"
    immediate="true" contentDelivery="immediate"
    editingMode="clickToEdit" autoHeightRows="-1">
    <af:column sortProperty="Sno" filterable="false" sortable="false"
    headerText="Sno"
    align="center" width="28" rowHeader="true"
    inlineStyle="font-style:italic;" frozen="true"
    id="sno" selected="true" headerNoWrap="true"
    displayIndex="0">
    <af:outputText id="ot0" value="#{vs.index+1}"/>
    </af:column>
    <af:column id="separatorColumn" align="center"
    width="15" frozen="true" displayIndex="1"
    rowHeader="unstyled" sortable="false"
    filterable="false" selected="false"
    inlineStyle='background-image:url("jheadstart/images/jsp_forward.png"); background-repeat:no-repeat; outline-color:InactiveCaption; outline-style:solid; outline-width:thin;'
    headerText=""/>
    </af:table>
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind =
    (DCIteratorBinding)dcBindings.get("ViewObj1Iterator");
    ViewObject decisionTableView1 = iterBind.getViewObject();
    System.out.println("before getAttributeCount :"+decisionTableView1.getAttributeCount());
    int counter = decisionTableView1.getAttributeCount() + 1;
    AttributeDef attribute =
    decisionTableView1.addDynamicAttribute("condition_" + counter);
    RichColumn column = new RichColumn();
    column.setId("condition_" + counter);
    column.setHeaderText("condition_" + counter);
    column.setNoWrap(true);
    RichInputText inputtext = new RichInputText();
    inputtext.setId("condition_"+counter);
    inputtext.setAutoSubmit(true);
    inputtext.setValueExpression("condition_"+counter,
    getValueBinding("#{row.bindings.condition_" +
    counter +
    ".inputValue}"));
    column.getChildren().add(inputtext);
    RichCommandImageLink headerLink = new RichCommandImageLink();
    headerLink.setText("<<Select Fact>>");
    headerLink.setId("conditionLink_" + counter);
    column.setHeader(headerLink);
    List columnList = this.table1.getChildren();
    int separatorColumnIndex =
    findColumnIndex(columnList, "separatorColumn");
    if (columnIndex == -1 || columnIndex > separatorColumnIndex) {
    columnIndex = separatorColumnIndex;
    System.out.println("Column Index :" + columnIndex);
    column.setDisplayIndex(columnIndex);
    this.table1.getChildren().add(columnIndex, column);

    Sorry Frank i could not figure out what u rtrying to say.
    In my case i have ADF table with two predefined coulmns :
    1 : a serial number read only column
    2 : a separator coumn
    I need help to bind the newly created dynamic attribute in the VO with my newly created column in the ADF table which has a input text as child.
    My problem is binding the is not working properly as values entered in the Table are not reflected in the VO.
    And when i insert a new column in between two columns which has already filled values the data in the rows does not shift coreespondingly..
    Edited by: user10281080 on Jul 27, 2009 12:22 AM

  • How to set a default value in an ADF table when adding a new row

    Hi Guys,
    I have a view object which I am using to create an ADF table. I also have a button which uses a CreateInsert binding to add a new row to the table. I have four fields: created_by, creation_date, last_update_by and last_update_date.
    I want these values to be set automatically when I click add new row.
    The values I want are:
    created_by - admin
    creation_date - sysdate
    last_update_by - admin
    lsat_update_date - sysdate
    Any suggestions on how to do this would be appreciated
    Thanks
    -Mark

    mark,
    Those four fields can be set completely declaratively in the Entity Object (check out the History Colum feature). Copied from the (11g) documentation:
    If you need to keep track of historical information in your entity object, such as when an entity was created or modified and by whom, or the number of times the entity has been modified, you specify an attribute with the History Column option selected (in the Edit Attribute dialog).
    If an attribute's data type is Number, String, or Date, and if it is not part of the primary key, then you can enable this property to have your entity automatically maintain the attribute's value for historical auditing. How the framework handles the attribute depends which type of history attribute you indicate:
    * Created On: This attribute is populated with the time stamp of when the row was created. The time stamp is obtained from the database.
    * Created By: The attribute is populated with the name of the user who created the row. The user name is obtained using the getUserPrincipalName() method on the Session object.
    * Modified On: This attribute is populated with the time stamp whenever the row is updated/created.
    * Modified By: This attribute is populated with the name of the user who creates or updates the row.
    * Version Number: This attribute is populated with a long value that is incremented whenever a row is created or updated.
    John

  • Issue with the last column stretching in ADF table

    There is an issue wherein when  I try stretching the last column of the ADF table to reduce its width it does stretch. But whenever I try stretching it back to this original position it doesn't despite having columnstretching attribute set to multiple and assign widths in percentages to columns . When I set the columnstretching attribute to none, the last column does stretch back and forth but on page load the table does not stretch to its full width despite having styleClass="AFStretchWidth". Now I dont want to be assigning fixed width in pixels to the columns. I would want the last column to stretch back and forth with columnstretching="multiple" and styleClass="AFStretchWidth". I see the same issue on components demo page as well. Tag Guide

    If you are trying that each column gets equally stretched based on the browser, its not possible as adf doesn't supports that.
    If your table is not stretching use styleClass="AFStretchWidth".
    But if all your columns are not stretching you can only try setting column widths + columnStretching property (where you can specify which column to stretch to fill all the spaces)
    Amit

  • Issue with autosubmit selectchoice in adf table

    I have a column in adf:table which has select choice with autosubmit property set. When the value in the select list changes the table has to refresh and so I have set partialTrigger on table to the select list.
    Now the issue is that when a query is performed and the table refreshes to render the query results, the value change listener of the select choice is invoked with mutiple times (based on number of rows ). The new value of the select choice is null. Why does this happen, how can I avoid it?

    hi ,
    can i see the code of the table ?

  • Adf Table with selection as set to NONE

    Hi,
    I having a scenario as explained below:
    I am populating records in to the adf Table
    After that I am using checkbox for selecting multiple records in the table and delete them.
    So I set selection property to None for the table. Because I want user to edit only that record which is checked.
    My multiple delete is working fine.
    Now if i selected one checkbox and and click on edit(which I have placed in the panal collection toolbar) it should show me the record in the which I have selected by check box. But it is showing me the first row.
    Can anybody help me to set the current row of the adf table manually which is having selection property as none. so that I can populate in popup.
    If some other way is available please explain.
    I am using jdeveloper 11.1.2.1
    Thanks,
    Sandeep.

    I don't see why you can't set selection property to "single"? (and don't forget to restore table SelectionListener property - if deleted)
    This will set current row when you click on it.
    If you programmatically iterate through RowSet to find rows with selected checkbox, this will work regardless of value in "selection" property.
    Dario
    Edited by: kdario on Nov 7, 2012 5:20 AM
    Edited by: kdario on Nov 7, 2012 5:22 AM

  • Problems with RowSelection in adf table

    I have problems with selection of a row in a adf table. Even though I have set the property : rowSelection="single" , when i select a row, the two other rows that follow, get selected too. For example I have 10 records an when i select the 7th row, the 8th and 9th row are also selected. This doesn't happen with the first rows.
    Also when i evaluate an attribute on selectionListener, it is always getting just the one from the first row.
    <f:facet name="second">
    <af:panelBox id="pbCon" showDisclosure="false" text="Históricos"
    binding="#{pageFlowScope.HistoricoEnvios.pbCon}">
    <af:table var="row" summary="Histórico de envios"
    rows="#{bindings.VOHistoricoEnvios.rangeSize}"
    emptyText="#{bindings.VOHistoricoEnvios.viewable ? 'No se encontraron resultados.' : 'Access Denied.'}"
    fetchSize="#{bindings.VOHistoricoEnvios.rangeSize}"
    rowBandingInterval="0" id="tHist"
    disableColumnReordering="true"
    value="#{bindings.VOHistoricoEnvios.collectionModel}"
    binding="#{pageFlowScope.HistoricoEnvios.thist}"
    rowSelection="single">
    <af:column width="32" id="c13" align="center"
    headerText="#{bindings.VOHistoricoEnvios.hints.Rownum.label}"
    rowHeader="unstyled">
    .

    I have two panelBox, one for a set of options with commandMenuItem and the second one wich shows the result in a table. The first commandMenuItem generate records an show them in the table. Here i got no problem with selection. The third commandMenuItem execute a log of the records generated, here is the problem.
    Thes two pages are part o a template, the template has a panelSpliter, in the right are the set of commandMenuItem an in the second is the part that i can edit.
    I have also drag an drop from the datacontrol again and have the same result
    The table that shows the records is :
    <af:panelTabbed id="ptReg" styleClass="AFStretchWidth"
    visible="true"
    binding="#{pageFlowScope.EnvioSunasa.ptReg}"
    partialTriggers="::dpEnv">
    <af:showDetailItem text="Datos Personales" id="sdiDp"
    stretchChildren="first"
    inflexibleHeight="100">
    <af:panelSplitter id="psDP" orientation="vertical"
    splitterPosition="216">
    <f:facet name="first">
    <af:panelBox id="pbErrDP"
    text="Registros con Error:#{pageFlowScope.EnvioSunasa.numRegErrDP}"
    showDisclosure="false">
    <af:table var="row" summary="Errores Datos Personales"
    rows="#{bindings.VOErrDatosPersonalesAfiliado1.rangeSize}"
    emptyText="#{bindings.VOErrDatosPersonalesAfiliado1.viewable ? 'No se encontraron errores.' : 'Access Denied.'}"
    fetchSize="#{bindings.VOErrDatosPersonalesAfiliado1.rangeSize}"
    rowBandingInterval="0" id="tErrDp"
    disableColumnReordering="false"
    value="#{bindings.VOErrDatosPersonalesAfiliado1.collectionModel}"
    rowSelection="single"
    binding="#{pageFlowScope.EnvioSunasa.terrDp}">
    .

  • Populating ADF Table from Multi-Dimensional Array

    Hello!
    I'm trying to populate an ADF table from a multi-dimensional array.
    Let's say that my array is
    String [] [] myArr = new String [3][5].
    On my page backing bean, I have a private attribute called tmpArr like this...
    String [] [] tmpArr;
    ...which I will initialize later after I know the proper dimensions. The dimensions will come from a multimap that contains a key and and another array (for the key's value) containing values for the key. So once I know the dimensions I initialize my array with...
    tmpArr = new String [x][y] where x and y are the dimensions (counters).
    Now I have my multidimension array. On an jsp page I have an ADF table, and I'm setting the value for the table to the array (the table's value property is bound to the backing bean's tmpArr attribure).
    Like so:
    <af:panelForm id="availableOptions"
    binding="#{myBackingBean.availableOptionsValues}">
    <af:table emptyText="No items were found" rows="10"
    value="#{myBackingBean.tmpArr}" var='myArr'>
    Now I need to know how to do the following:
    1) Set the table's columns based on the number of attributes on the array.
    2) Set the table's rows based on the array's length.
    3) Set each table cell value to values on the array's 2nd dimension. I'm assuming that ADF takes care iterating through the array, and that I should do something like...
    <af:outputText value="#{myArr[][0]}"/>
    <af:outputText value="#{myArr[][1]}"/>
    etc...
    However, this isn't working...
    javax.faces.el.ReferenceSyntaxException: myArr[][0]
    ...bla bla bla...
    Was expecting one of:
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <STRING_LITERAL> ...
    "true" ...
    "false" ...
    "null" ...
    "not" ...
    "empty" ...
    <IDENTIFIER> ...
    Is there a blog or resource (article, book, etc) that shows how this is done? Anyone has done this and would like to share how?
    Thank you.

    This is in fact possible. I'm not sure about the "best practice" around doing this but there is a couple of ways to do this.
    You can either create a managed bean then right click on it and use the wizard to create a data control or you can do it as per below
    The a table will convert an array into a collection.
    Once you have created an array and generated the accessors in a bean you can then reference the mutli-dimensional array from a table as per below.
    <af:table value="#{pageFlowScope.PageBean.sessionArr}" var="row" rowBandingInterval="0" id="t1" varStatus="status">
    <af:column sortable="false" headerText="col1" id="c1">
    <af:outputText value="#{pageFlowScope.PageBean.sessionArr[status.index][0]}" id="ot1"/>
    </af:column>
    </af:table>
    String [][] sessionArr = new String[5][2];
    public void setSessionArr(String[][] sessionArr) {
    this.sessionArr = sessionArr;
    public String[][] getSessionArr() {
    sessionArr[0][0]="rice";
    sessionArr[1][0]="water";
    return sessionArr;
    EDIT: For either of the above methods the managed bean must have a scope of pageFlow or longer.
    Cheers,
    Aaron
    Edited by: Aaron Rapp on Oct 6, 2011 3:28 PM

  • How to change the text alignment of an adf table column

    Hi everyone
    I have a read only adf table that uses banding. What I want to do is change the text align property of one of it's columns but the task seems not at all trivial.
    I tried entering a value for the text-align property in the inline style of the specific af:column tag and failed. I then tried to do the same for the af:outputText element inside the column but still nothing worked. I even created a css style and changed the StyleClass attribute on each or both elements without any luck.
    Can anybody shed some light here ...
    Thanassis

    Specify the text-align in a css.
    Re: styling column headers in adf table

  • How to programmatically change the cell color of an ADF table ?

    Hi all,
    I have an ADF table with some fields on it. Depending on the value of a field named, say, "F1", I would like to change its background color.
    So far I can change the field color with this EL expression inside the InlineStyle table column property:
    font-size:medium; background-color:#{viewScope.myBean.setColor};
    where setColor is a bean function, in where I access the field "F1" via binding, parse its value, and return the right value - so far, so good.
    The bad thing is, the InlineStyle affects that field in all the rows of the table, while I would like to change only the field in the rows, which have that specific value in it.
    So for example having the rows:
    F1
    abc#1 ----> currently selected row
    cde#2
    efg#3
    I want to change the background color to all the F1 fields which have a "1" after the '#' and let the other "F1" row cells background color stay unchanged.
    But as you can imagine, the InlineStyle affect the "F1" background color in all the rows (assuming that the first row of the table is selected).
    So the question: how to access a single cell of a row in an ADF table, and programmatically change its background color ?
    So far I can iterate through the ADF table with:
    BindingContext bindingctx = BindingContext.getCurrent();
    BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("aTableIterator");//access the iterator by its ID value in the PageDef file
    RowSetIterator rsi = dciter.getRowSetIterator();
    System.out.println("rsi getrowcount = " rsi.getRowCount());+
    Row row = null;
    +if (rsi.getRowCount() > 0) {+
    row = rsi.getCurrentRow();
    System.out.println("row attr = " Arrays.toString(row.getAttributeNames()));+
    System.out.println("class : " row.getAttribute("F1").getClass().toString());+
    +}+
    +while (rsi.hasNext()) {+
    row = rsi.next();
    System.out.println("row attr = " Arrays.toString(row.getAttributeNames()));+
    +}+
    Regards,
    Sergio.

    Hi,
    I mean a specific cell within a row.
    Here are two pictures that show an ADF table with two rows and some fields on it:
    https://skydrive.live.com/?cid=7D3084D8BF755808&id=7D3084D8BF755808!107&sc=documents#cid=7D3084D8BF755808&id=7D3084D8BF755808!107&sc=documents
    bild_A is what I have, bild_B is what I would like. Note that:
    in bild_A the first row contain a yellow background color for the field F4 and an orange background color for the field F5. This is correct, because F4 has an "1" at the end of its string value, and F5 has a "3" at the end. So far so good.
    But the second row (again, bild_A) has also the fields F4 with yellow background color, and the field F5 with orange background color, even if the value in both fields is 0.
    What is should be, is shown in bild_B.
    The problem is that the solution provided affects all the cells of the column, while I need to change the background color of a single cell, and leave the other unchanged (see bild_B).
    I hope that clarify a bit :)
    Sergio.

  • How to add SelectionListener to ADF table Programatically?

    Hi,
    Iam creating ADF table programatically and trying to setSelectionListener(MethodExpression) to it. i am unable to pass parameter MethodExpression properly.
    What i am trying to do is, need to get the values on row selection of table.
    How to pass that method name in setRowSelection(MethodExpression) programatically.?
    and Any one got sample code of performing row selection event programatically, i mean accessing the selected row in java class i.e., creation of table and adding listeners to it programatically.....
    Thanks
    Thoom
    Edited by: User007 on Sep 4, 2011 9:06 PM
    Edited by: User007 on Sep 4, 2011 9:45 PM

    Thoom,
    from the Docs:
    public final void setRowSelection(java.lang.String rowSelection)so setRowSelection method take a string parameter, and when you look at the property inspector for 'RowSelection' in jdev (which setRowSelection is the peer) you see the possible values:
    single, multiple, multipleNoSelectAll and none or their constant field values ROW_SELECTION_SINGLE, ROW_SELECTION_MULTIPLE, ROW_SELECTION_MULTIPLE_NO_SELECT_ALL, ROW_SELECTION_NONE. You use this property to let the framework know if you want row selection at all, single or multiple rows.
    As you want to get the selected rows of a table you have to distinguish between singe and multiple selection, as they are handled in a different way. The default for single selection is to use the 'makeCurrent' selection listener from the bindings
    #{bindings.YOUR_TREE_BINDING.collectionModel.makeCurrent}To Set this in code you need to generate an MethodExpression out of it
    MethodExpression ex = JSFUtils.resloveMethod("#{bindings.EmployeesView1.collectionModel.makeCurrent}", Object.class, new Class[]
                                { SelectionEvent.class });
    table.setSelectionListener(ex);
        public static MethodExpression resloveMethod(String expression, Class returnType,
                                                     Class[] argTypes)
            FacesContext facesContext = cesContext.getCurrentInstance();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            MethodExpression methodExpression =
                elFactory.createMethodExpression(elContext, expression, returnType, argTypes);
            return methodExpression;
        }Timo

Maybe you are looking for