ADF FACES, AF:TABLE

Hello all
I am just trying to put two tables in a JSP in a different section each one.
I can't display the two at the same time..., each one works when i delete the other one. I mean...i can see in the desing window the two tables...but when i run it i just see in the explorer one table.
The rows to be displayed are taken from a LIST of values, as I said before, the results are correct but there is just one table in execution run time.
I will put the jsp code...I hope somebody could help me
Thanks
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[http://www.w3.org/TR/html4/loose.dtd]">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="[http://java.sun.com/jsf/html]" prefix="h"%>
<%@ taglib uri="[http://java.sun.com/jsf/core]" prefix="f"%>
<%@ taglib uri="[http://xmlns.oracle.com/adf/faces]" prefix="af"%>
<%@ taglib uri="[http://xmlns.oracle.com/adf/faces/html]" prefix="afh"%>
<f:view>
<f:loadBundle basename="mx.com.uaem.htb.sspoc.portal.resources" var="bundle"/>
<afh:html>
<afh:head title="Consulta Referencia">
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252"/>
</afh:head>
<afh:body>
<h:form>
<af:page title="Expediente Electrónico">
<f:facet name="branding">
<af:objectImage source="/images/logo.jpg"/>
</f:facet>
<f:facet name="brandingApp">
<af:outputLabel value="#{bundle[\'header.title\']}"
inlineStyle="font-weight:bold; margin-left:8.0px;"/>
</f:facet>
<f:facet name="appCopyright">
<af:outputFormatted value="#{bundle[\'footer.copyright\']}"/>
</f:facet>
<f:facet name="appPrivacy">
<af:panelGroup layout="horizontal"
inlineStyle="margin-bottom:16.0px;margin-top:8.0px;">
<af:outputFormatted value="#{bundle[\'login.loginText\']} #{sessionScope.connectionInfos.username}"/>
<af:objectSpacer width="10" height="10"/>
<af:commandLink text="#{bundle[\'page.logout\']}"
action="#{LoginBean.logout}" immediate="true"/>
</af:panelGroup>
</f:facet>
<f:facet name="appAbout"/>
<af:messages inlineStyle="layout=\'table\'"/>
<afh:rowLayout width="80%">
<afh:cellFormat width="20%" valign="top" halign="left"
inlineStyle="padding:3.0px;">
<af:panelBox text="Paciente" width="100%"
background="transparent">
<af:outputLabel value="#{bundle[\'showResults.patientName\']}"
inlineStyle="font-weight:bold;"/>
<af:objectSeparator/>
<af:outputText value="Nombre: #{mostrarResultado1.patient.firstName}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="Apellido: #{mostrarResultado1.patient.lastName}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="Género: #{mostrarResultado1.patient.genderValue}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="fecha: #{mostrarResultado1.patient.birthdayValue}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="Educación: #{mostrarResultado1.patient.nivelEdu}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="Religión: #{mostrarResultado1.patient.religion}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="CURP: #{mostrarResultado1.patient.curp}"
inlineStyle="font-size:10.0pt;"/>
<af:objectSpacer width="10" height="10"/>
<af:outputLabel value="#{bundle[\'showResults.patientAddress\']}"
inlineStyle="font-weight:bold;"/>
<af:objectSeparator/>
<af:outputText value="Calle: #{mostrarResultado1.patient.streetAddressValue}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="Ciudad: #{mostrarResultado1.patient.cityValue}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="Estado: #{mostrarResultado1.patient.stateValue}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="País: #{mostrarResultado1.patient.countryValue}"
inlineStyle="font-size:10.0pt;"/>
<af:outputText value="CP. #{mostrarResultado1.patient.zipCodeValue}"
inlineStyle="font-size:10.0pt;"/>
</af:panelBox>
</afh:cellFormat>
<afh:cellFormat width="30%" valign="top" halign="left"
inlineStyle="padding:3.0px;">
<af:panelBox text="Referencia Médica" width="100%"
background="light">
<af:panelGroup/>
<af:panelHorizontal>
<af:panelForm>
<f:facet name="footer"/>
<h:graphicImage url="/images/p2.jpg" height="88"
width="119"/>
</af:panelForm>
<af:panelForm>
<f:facet name="footer">
<h:panelGroup>
<af:commandButton text="#{bundle[\'mostrarResultados1.nuevo\']}"
action="nuevaReferencia"/>
</h:panelGroup>
</f:facet>
<af:table emptyText="No hay registros de Referencia Medica"
banding="row" bandingInterval="1" width="40%"
binding="#{ExpedienteListBean.dataTable}"
value="#{ExpedienteListBean.resultListRefe}"
var="referencia">
<af:column sortable="false"
headerText="#{referencia.refFecha}">
<af:commandLink text="#{referencia.refFecha}"
action="showReferencia">
<f:param name="hola" value="#{referencia.id}"/>
</af:commandLink>
</af:column>
</af:table>
<af:commandLink text="REF 1, 01-Nov-2007"
action="#{mostrarResultado1.mostrarReferencia}"/>
</af:panelForm>
</af:panelHorizontal>
</af:panelBox>
<af:objectSpacer width="10" height="10"/>
<af:panelBox text="Diagnóstico Médico" width="100%"
background="light">
<af:panelGroup/>
<af:panelHorizontal>
<af:panelForm>
<f:facet name="footer"/>
<h:graphicImage url="/images/op3.jpg" height="88"
width="119"/>
</af:panelForm>
<af:panelForm>
<f:facet name="footer">
<h:panelGroup>
<af:commandButton text="#{bundle[\'mostrarResultados1.nuevo\']}"
action="nuevo"/>
</h:panelGroup>
</f:facet>
<af:table emptyText="No hay registros de Referencia Medica"
banding="row" bandingInterval="1" width="40%"
binding="#{ExpedienteListBean.dataTable}"
value="#{DiagListBean.resultListDiag}"
var="diagnostico">
<af:column sortable="false"
headerText="#{diagnostico.refFecha}">
<af:commandLink text="#{diagnostico.refFecha}"
action="mostrarDiag">
<f:param name="hola" value="#{diagnostico.id}"/>
</af:commandLink>
</af:column>
</af:table>
<af:commandLink text="REF 1, 01-Nov-2007"
action="mostrarDiag"/>
</af:panelForm>
</af:panelHorizontal>
</af:panelBox>
</afh:cellFormat>
</afh:rowLayout>
<af:commandButton text="Cancelar" action="regresar" immediate="true"/>
</af:page>
</h:form>
</afh:body>
</afh:html>
</f:view>Thanks again
Edited by: user743004 on Nov 21, 2008 7:43 AM
Edited by: user743004 on Nov 21, 2008 7:47 AM

Hello all
The problem is fixed now
What I did is the following...
I used a afh:cellFormat (inside I put two af:PanelHorizontal at the same level each one)
------------->af:PanelHorizontal (containing one Table)
------------->af:PanelHorizontal (containing one Table)
At the beginning I had one bean with two methods returning a List each one (one method for the first table and the second method for the second table), but the problem here is tha de BINDING element of the two table was the same (binding="#{DiagListBean.dataTable}") even when te value element was different for both tables...it didin't work
So I cread two different beans, one for each table...and then i selected a different binding element for each table (because having two beans i can have two binding elements)
I will put the code here, but i don't know how to put it with xml format (including spaces). I hope this can help some ppl
TABLE 1
<af:table emptyText="No hay registros de Referencia Medica"
banding="row" bandingInterval="1" width="40%"
binding="#{ExpedienteListBean.dataTable}"
value="#{ExpedienteListBean.resultListRefe}"
var="referencia">
<af:column sortable="false"
headerText="#{referencia.refFecha}">
<af:commandLink text="#{referencia.refFecha}"
action="showReferencia">
<f:param name="hola" value="#{referencia.id}"/>
</af:commandLink>
</af:column>
</af:table>
TABLE 2
<af:table emptyText="No hay registros de Referencia Medica"
banding="row" bandingInterval="1" width="40%"
binding="#{DiagListBean.dataTable}"
value="#{DiagListBean.resultListDiag}"
var="diagnostico">
<af:column sortable="false"
headerText="#{diagnostico.refFecha}">
<af:commandLink text="#{diagnostico.refFecha}"
action="mostrarDiag">
<f:param name="hola" value="#{diagnostico.id}"/>
</af:commandLink>
</af:column>
</af:table>
Thanks

Similar Messages

  • ADF Faces Core Table, TableSelectOne question

    Greetings
    I am using ADF Faces Core Table to display a list and I have it setup with TableSelectOne, it works great. My question is this, I set required = true on the select button and it works. If I dont select one it no longer submits. My question is how do i get the error message back out I tried adding an af:message tag with from = tableSelectOne1 and I dont get anything back out. Is there a way to get this error message out so I can display it for the end user?
    Thanks
    tro

    Hi,
    Try using af:messages instead, as it displays all messages added to the FacesContext.
    Regards.
    Fábio

  • ADF Faces af:table partialTriggers update column footer

    I have table based on SortableModel (stored in session) with one column as input & other column as formula based on input field both as numeric.
    I have ValueChangeEvent on input field,which calculate new value for formula column. It is updated on page immediately. I am also computing summary for both column & store it sessionbean. But ValueChangeEvent does not update these values, I have to refresh page manually to see new totals. I have linked both the outputText field to inputText by partialTriggers property.
    If I move these outputText out of tablefooter they get updated immediately.
    I tried to link af:table & columns to inputText by partialTriggers but do not work.
    How I can update coulmn footer immediately if one of the field in table changed?
    Thanks, Yogesh
    -- Column footer : Does not update immediately
    <f:facet name="footer">
    <af:outputText value="#{PartyTableBean.newTotalBalance}"
    binding="#{backing_FinancialClose.newTotalBalance}"
    id="newTotalBalance" partialTriggers="newInvoiced">
    <af:convertNumber currencySymbol="$" type="currency"/>
    </af:outputText>
    </f:facet>
    -- outputText outside of table : updates immediately
    <af:outputText value="#{PartyTableBean.newTotalBalance}" id="newTotalBalance22"
    partialTriggers="newInvoiced" binding="#{backing_FinancialClose.outputText7}">
    <af:convertNumber currencySymbol="$" type="currency"/>
    </af:outputText>

    I was mistakenly believing that you couldn't use a selectOneChoice in an af:table given some experimentation where they simply failed to render at all.
    It turns out that I had a hadn'e created the appropriate setter method for the property. However, instead of making the data readOnly (as most of the ADF FACES controls do) it just didn't render anything. Thus making me think it just didn't work inside of a table.
    FYI - in case this happens to anyone else.

  • Bug ADF Faces: af:table

    Hello,
    I found a new bug while working with ADF Faces. If you have a form on a page as well as a table and one of the field in the form is flagged required, then the table won't be sortable unless a value is put in the required field. The same holds true for row navigation.
    I already thought about flagging the table as immediate. That fix the row navigation but not the sorting.
    Regards,
    Simon Lessard

    Hello Frank,
    Thank you for the reply. Here's the complete project.
    It's only a little example to show ADF Faces components without any specific model technology. Therefore, the project is a single project with any well defined separation. As you can see, the table is based on a collection completely separated from the form.
    Note: I agree that sorting should fail with a required field if the table is not immediate. However, if it's I see no reason why it wouldn't work since the table and the form are not linked.
    Anyway, here's the case.
    1. A "shop" managed bean:
    import java.util.ArrayList;
    import java.util.List;
    public class ShopBean {
        private Product newProduct;
        private List products;
        public ShopBean() {
            products = new ArrayList();
            newProduct = new Product();
        public String addNewProduct() {
            products.add(newProduct);
            newProduct = new Product();
            return null;
        public Product getNewProduct() {
            return newProduct;
        public void setNewProduct(Product newProduct) {
            this.newProduct = newProduct;
        public List getProducts() {
            // I also tried to return a CollectionModel here, but it didn't change anything
            return products;
        public void setProducts(List products) {
            this.products = products;
    }2. A product class:
    public class Product {
        private String name;
        private String description;
        private Double price;
        public Product() {
        public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
        public String getDescription() {
            return description;
        public void setDescription(String description) {
            this.description = description;
        public Double getPrice() {
            return price;
        public void setPrice(Double price) {
            this.price = price;
    }3. A single page:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces"
              xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
      <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
                  doctype-system="http://www.w3.org/TR/html4/loose.dtd"
                  doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <f:loadBundle basename="com.dmr.cours.jsf.resources.messages" var="msg"/>
        <afh:html>
          <afh:head title="#{msg['page.title']}">
            <meta http-equiv="Content-Type"
                  content="text/html; charset=windows-1252"/>
          </afh:head>
          <afh:body>
            <h:form>
              <af:panelPage title="#{msg['title.page']}">
                <f:facet name="menu1">
                  <af:menuTabs>
                    <af:commandMenuItem text="#{msg['menu1.application.label']}"
                                        selected="true"/>
                  </af:menuTabs>
                </f:facet>
                <f:facet name="menu2">
                  <af:menuBar>
                    <af:commandMenuItem text="#{msg['menu2.welcome.label']}"/>
                    <af:commandMenuItem text="#{msg['menu2.products.label']}"
                                        selected="true"/>
                  </af:menuBar>
                </f:facet>
                <f:facet name="branding">
    <- Using SRDemo branding because no one sane want to
    see a branding made by me, using no branding works as well ->
                  <af:objectImage source="/images/SRBranding.gif"/>
                </f:facet>
                <af:panelHeader text="#{msg['title.new']}">
                  <af:panelForm>
                    <f:facet name="footer">
                      <af:panelButtonBar>
                        <af:commandButton text="#{msg['action.add']}"
                                          action="#{shop.addNewProduct}"/>
                      </af:panelButtonBar>
                    </f:facet>
    <- Removing the required attribute here makes sorting
    and row navigation functional again. ->
                    <af:inputText label="#{msg['product.name']}"
                                  value="#{shop.newProduct.name}" required="true"/>
                    <af:inputText label="#{msg['product.price']}"
                                  value="#{shop.newProduct.price}">
                      <f:convertNumber minFractionDigits="2"
                                       maxFractionDigits="2"/>
                      <f:validateDoubleRange minimum="0"/>
                    </af:inputText>
                    <af:inputText label="#{msg['product.description']}"
                                  value="#{shop.newProduct.description}" rows="5"/>
                  </af:panelForm>
                </af:panelHeader>
                <af:panelHeader text="#{msg['title.list']}">
                  <af:table value="#{shop.products}"
                            var="product" rows="5" banding="row"
                            bandingInterval="1" emptyText="#{msg['list.empty']}"
                            immediate="true">
                    <af:column sortProperty="name" sortable="true"
                               headerText="#{msg['product.name']}">
                      <af:outputText value="#{product.name}"/>
                    </af:column>
                    <af:column sortable="false"
                               headerText="#{msg['product.description']}">
                      <af:outputText value="#{product.description}"/>
                    </af:column>
                    <af:column sortProperty="price" sortable="true"
                               headerText="#{msg['product.price']}">
                      <af:outputText value="#{product.price}">
                        <af:convertNumber type="currency"/>
                      </af:outputText>
                    </af:column>
                  </af:table>
                </af:panelHeader>
              </af:panelPage>
            </h:form>
          </afh:body>
        </afh:html>
      </f:view>
    </jsp:root>4. A property files
    page.title = Test shop page
    menu1.application.label = MyShop.com
    menu2.products.label = Product management
    menu2.welcome.label = Home
    title.page = Product management
    title.new = New product's data
    title.list = Existing product list
    action.add = Add to product list
    product.name = Product's name
    product.price = Price
    product.description = Description
    list.empty = No product yet.5. The /images/SRBranding.gif file.
    EDIT: Forgot to add the required field and "fixed" the comment that the forum was erasing. =P
    EDIT: Added a note.
    Message was edited by:
    Simon Lessard

  • ADF Faces af:table support java.util.Set

    I was using a java.util.Set in my model classes, as implementation of the Collection interface. And wanted to show the Set using a <af:table> after a while I discoverded that the documentation did not mention support of java.util.Set, only List.
    Now I have to convert my collection to List in the backing beans of my view.
    Is there a better approch than converting every Set in the view using
    new Arraylist(set)?
    And what is the reason of the missing Set support (or General Colelction support)?
    Thank you

    Deepak, I don't think you know what you're writing about.
    No, we do not support java.util.Set in <af:table>. For that matter, neither does <h:dataTable>.
    The "why" of it is that we require indexed access into the table for operations like "Display rows 526-550". java.util.Set does not offer indexed access.
    By the way, one corollary - do not use java.util.LinkedList with tables (ADF Faces or the JSF data table). If the list is small, then it won't be a problem, but with a large list, you'll get brutal performance.

  • ADF FACES: af:table and complex column data

    Using EA15.
    I want to use an af:table to allow the in-place editing of the data. However, I have some fields that are not simple text entry fields. Two of them would ideally use af:selectOneList elements. This doesn't work given the limitations of how af:column elements work.
    Is there anyone out there creating complex, in-place edit tables? If so, how are you doing it?
    Thanks.

    I was mistakenly believing that you couldn't use a selectOneChoice in an af:table given some experimentation where they simply failed to render at all.
    It turns out that I had a hadn'e created the appropriate setter method for the property. However, instead of making the data readOnly (as most of the ADF FACES controls do) it just didn't render anything. Thus making me think it just didn't work inside of a table.
    FYI - in case this happens to anyone else.

  • ADF FACES: af:table not rendering all columns

    I'm using ADF EA 17 with myFaces 1.0.9 on JBoss 4.0.1/JVM 1.4.2_07-b05. The af:table is embedded within an af:panelgroup (being body of af:panelbox).
    The af:table is not rendering all columns (only last 2 out of 8 cols total). The model behind the af:table is a java.util.List. Debugging shows that the list is filled up with beans correctly and that each of the properties of such a bean corresponding to a table column are also set correctly.
    Strange thing is that sometimes all columns are rendered ok. Especially if i make heavy changes on the jsp (e.g. removing all but 2 cols from the af:table) and dropping it into the .../jboss/server/../tmp/deploy/tmpXYZ-exp.war directory. Restarting JBoss results in the old behaviour. Also closing browser and re-opening it yields to the missing columns again.
    I've set breakpoints on the bean properties representing on table column and i can see, that the getter methods aren't called (all but those 2 that get rendered finally)
    Table has multiselection enabled with 1 command button.
    This happens with both IE 6 and Firefox 1.0.4; no oracle, myFaces exceptions visible on console or any log file.
    Has anybody made same experiences so far or an idea what the problem really is ?
    best regards,
    Christoph.

    I've tried it also with a plain af:table without any surrounding af:panelgroup or/and af:panelbox. Same result.
    The bean holding the table-model (the java.util.List) is in session-scope. the table-model is update by an actionListener fetching values from an EJB. Could the session-scope be a problem ?
    Potential candidates from my point of view, that might cause trouble here:
    --) Caching (i've seen that sort of "CachedRenderers" are used
    --) partial page rendering
    --) multi-threading issue.
    --) or any silly mistake of mine :-)
    best regards,
    Christoph

  • HOW to add Dynamic Columns in ADF Faces CORE Table

    In ADF im going to display the dynamic column in Coretable,
    Header are displaying very fine. but im unable to display rows sucessfuly,how to resolve.
    Second thing is that JSF page isn't getting the value from dataList, whats wrong in JSF code.
    // JSF PAGE CODE
         <af:table binding="#{backing_test1.table1}" id="table1"
    value="{backing_test1.dataList}" var="myRec"/>
         public void setTable1(CoreTable table1) {
         this.table1 = table1;
         public CoreTable getTable1() {
    //create this table
    table1 = new CoreTable();
    CoreColumn dynamicCol;
    CoreOutputText outText;
    Application app=FacesContext.getCurrentInstance().getApplication();
    DCIteratorBinding iter = (DCIteratorBinding)bindings.get("listAllMonthsIter");
    RowSetIterator rsIter = iter.getRowSetIterator();
    rsIter.reset();
    Row row;
    while (rsIter.hasNext()) {
    row = rsIter.next();
    String header = (String)row.getAttribute("element");
    // element contain the value JAN, FEB...
    dynamicCol = new CoreColumn();
    dynamicCol.setHeaderText(header);
    String currRec = table1.getVar();
    outText = new CoreOutputText();
    ValueBinding vb = app.createValueBinding("#{myRec.value}");
    outText.setValueBinding("value",vb);
    outText.setRendererType("Text");
    dynamicCol.getChildren().add(outText);
    table1.getChildren().add(dynamicCol);
    public void setDataList(List dataList) {
    this.dataList = dataList;
    public List getDataList() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("listAllMonths");
    if (operationBinding == null)
    return null;
    List dataList = (Vector)operationBinding.execute();
    return dataList;
    }

    Well issue is that
    I have a list of values that can be chnaged any time during application execution sya its list of Fav Fruits..
    and in an other page i need a data table having these fruits as coulmns and their details as rows...
    how to achieve this..
    we can not guess the number of columns before time.. so can make the estimate and hide them.

  • ADF FACES: af:table and cellpadding

    How do I control the basic table attributes of cellspacing and cellpadding when using an af:table with sortable headers?
    I have searched through the documentation, and it's not clear at all. The attributes you'd expect (ala h:table) are not legal on af:table.
    Thanks.

    Andy, thanks for picking up this thread - I know the demands of a development schedule :-)
    The problem with no padding on the table is that the data becomes very difficult to read when the cell contents are fairly uniform in size. You need padding around the contents in order to make it easy to read. Also, you should have some control over the border size (cell spacing) in order to create specific visual effects. I need control over the alignment of the cell contents. Not just left, right, and center, but also control over the vertical alignment as well. Finally, some control over things like background color and border color would be very helpful.
    Although abstracting away from the underlying HTML has merits from a device independence perspective, there are capabilities in the HTML model that should not be lost in the process. Since HTML is the underlying view model in almost all cases, we should have proper control over that view. I don't really care how the functionality is realized, but tables are one of the most versatile components in HTML and we need solid control of that component from the ADF abstractions. The ability to control the table cell layout is just one example. Also, L&F guidelines should be just that - guidelines. The defaults should provide your goal L&F, but the developer should have the capability to override that guideline to meet specific project needs.
    Thanks,
    Larry.

  • ADF Faces EA15: table update not working properly after dialog return event

    Hi,
    in my application I have a table with read-only records and an edit button for each row.
    The button triggers a dialog where one field of of the record can be edited.
    The record is a bean which is put into processScope.
    After accepting the change in the dialog the bean makes an update in the database changing the order of the records in the table on the launching page.
    The return event triggers a re-rendering of the launching page (which I can see from the output of a phase listener) and the table model gets updated but the table output is not updated visually.
    However, if I call the dialog on another record I don't get the record I see in the table but instead I get the record which I'd expected if the table re-rendered properly.
    Do I have to trigger any kind of event on the table now so that the framework knows that a change has taken place and that the table has to be re-rendered? There is no difference whether I use PPR or not. It used to work in EA14.
    Thanks,
    Achim

    In EA14, the return from the dialog required a full-page refresh (whether the dialog was launched with PPR or not didn't matter). In EA15, it's done with PPR if possible. This avoids the flash (and re-scrolling, etc.), but means you do need to tell us what's going to get changed because of the return. You can use partialTriggers on the table with the "id" of the button to make this happen.

  • URGENT: ADF Faces table updating issue.

    I have a project that uses JSF, ADF Faces, EJB 3.0, and the ADF binding framework.
    In this project, I have a page with a databound ADF Faces Table. The table has a number of read-only columns and two read-write columns. I also have an Edit button that allows the user to pop up a dialog box to edit the selected row of the table. When the user clicks OK in the dialog box, the data is passed back to the main page and the table is updated.
    Everything works correctly for the read-only columns. For the read-write columns, however, the table data does not get updated following an edit. This is what I have found:
    1. The table row data gets passed in to the Edit dialog correctly.
    2. The data gets passed back correctly.
    3. The model gets updated correctly (up to and including the database).
    4. Looking at the iterator in the debugger shows the correct, updated data.
    5. When the table row is getting redrawn, the getter calls for the read-write columns return the updated data.
    6. As mentioned above, the read-only columns get updated correctly.
    7. Updating the read-write columns directly from the table works correctly.
    So, the problem appears to be in the GUI layer. I suspect that, somehow, the submitted values of the read-write columns are not getting set properly, but I cannot figure out how to do this.
    Note that clicking on the Edit button results in a partial submit. In the return listener, I add a call to AdfFacesContext.getCurrentInstance().addPartialTarget(getRecipientTable()) in order to redraw the table (getRecipientTable() is the bound value of the ADF table).
    Please help! We are so close to production and we need to fix this.
    Thanks,
    Ara

    Hi,
    I don't have a testcase for this, so I just come up with ideas to try
    1. refresh the parent container of the table. It seems that the input text components are not triggered to refresh if the refresh is on the table.
    2. If using ADF, make sure the update is performed directly on theiterator (which automatically is the case if you use a ADF bound form for this)
    3. Check if executing the table iterator and then setting back the current row makes a difference
    Frank

  • ADF Faces - issue with Portal and af table

    I wonder if anybody could help me with a problem we are experiencing with running our ADF Faces app inside a portal (NOT Oracle Portal). We are using the af table tag with the rows attribute set as follows:
    <af:table emptyText="No items found"
    rows="10" banding="row"
    bandingInterval="1"
    binding="#{backing_ModuleSearchReg.table1}"
    id="table1"
    var="row">
    What this does is if we have more than 10 rows to display it will display
    a table header that has a label 'Previous 1-10 of nnn' Next 10. However, when you click on 'Next 10' it produces a Javascript error.
    When we run the app outside of the portal we do not get this problem.
    I believe this is related to known issues with JSF and Javascript inside a 'framed' web page. But if anybody help me with this or point me to a resource that can help it would be very much appreciated.
    Many Thanks in advance.
    Chris

    Hi,
    I remember a similar issue with inner frames that should be fixed in JDeveloper 10.1.3.3. The problem was that the ADF Faces JavaScript did not get the correct document root.
    Frank

  • How to select rows in adf faces table

    Hi guys
    im new to adf faces .I created a adf faces table with some data.My task is to select one row and if i click tht row, the data of tht row will be displayed in an input text fileds.How can i select a row in a adf faces table and give actions to rows...i read so many tutorials...none of them didnt give a correct idea....plz help me...
    thanks in advance..
    rajiv

    You're here in the Sun JSF forum, not in the Oracle JSF forum.
    Try here: JDeveloper and ADF
    If the ADF datatable is technically comparable with the RI datatable, check http://balusc.xs4all.nl/srv/dev-jep-dat.html to get some insights how to retrieve the selected row object.

  • An extra column of a query in an ADF Faces Table?

    Hi to all OTN Community...
    I use ADF Faces, Toplink and EJB 3.0 in JDevelooper 10.1.3.1.0, and i have a question...
    I need to show in an adf faces table, the result of a query like this
    SELECT COLUMN1, COLUMN2, COUNT(*)
    FROM TABLEX
    GROUP BY COLUMN1, COLUMN2
    I do this query in the TableX named queryes...and then i have acces to this named query in the dataControl, but, when i drag and drop the dataControl to a jsf page, this only shows the columns of the tableX. Then, i want to know, ¿How can i show the count(*) column in the page in a dataControl?
    PD: i want to show in the adf faces table the same result if i execute that query in an sql client.
    Thanx in advance...
    Darklorddany

    Darklorddany,
    The solution to this is to add an additional method on your EJB 3.0 session-bean that exposes an dynamic TopLink report (projection) query.
    The TopLink code within the method would leverage your existing TopLink mappings to do the query like:
            ReportQuery rq = new ReportQuery(Employee.class, new ExpressionBuilder());
            rq.addAttribute("firstName");
            rq.addAttribute("lastName");
            rq.addCount();
            rq.addGrouping("firstName");
            rq.addGrouping("lastName");
            List<ReportQueryResult> results = (List<ReportQueryResult>)session.executeQuery(rq);The ReportQueryResult objects are very generic map/row type containers that will not work well in your ADF binding layer. With JPA you can specify and ad-hoc Java class to contain such projection results that make them a little easier to use in clients. This functionality will be available in the next release of TopLink. Until then you will need to write some code to convert to your own result class for this query.
    In my case I'll create a simple POJO like:
        public class EmployeeNameCount {
            private String firstName;
            private String lastName;
            private int count;
            public EmployeeNameCount(String firstName, String lastName, int count) {
                this.firstName = firstName;
                this.lastName = lastName;
                this.count = count;
            public String getFirstName() {
                return this.firstName;
            public String getLastName() {
                return this.lastName;
            public int getCount() {
                return this.count;
        }Now I combine the previous report query code into an EJB 3.0 session bean method:
        @TransactionAttribute(TransactionAttributeType.SUPPORTS)
        public List<EmployeeNameCount> findEmployeeNamesWithCount() {
            Session session = getSessionFactory().acquireSession();
            ReportQuery rq = new ReportQuery(Employee.class, new ExpressionBuilder());
            rq.addAttribute("firstName");
            rq.addAttribute("lastName");
            rq.addCount();
            rq.addGrouping("firstName");
            rq.addGrouping("lastName");
            List<ReportQueryResult> results = (List<ReportQueryResult>)session.executeQuery(rq);
            session.release();
            List<EmployeeNameCount> empNameCounts = new ArrayList<EmployeeNameCount>(results.size());
            for (ReportQueryResult rqr: results) {
                String fname = (String)rqr.getByIndex(0);
                String lname = (String)rqr.getByIndex(1);
                int count = ((Number) rqr.getByIndex(2)).intValue();
                empNameCounts.add(new EmployeeNameCount(fname, lname, count));   
            return empNameCounts;
        }You will also need to make sure the method exists on your EJB 3.0 session bean's interface as well. Then regenerate the data control for your session bean and you should have access to drag and drop this query with its results into your JSF pages.
    As mentioned this use case will be much simpler and declarative in the next release.
    Doug

  • ADF Faces - indenting text in table column.

    Is there a way to indent text in an ADF Faces coreColumn component? I'm trying to represent a recursive tree structure in a CoreTable. I've tried inserting object spacers depending on the depth of each node in the tree, but Faces then wraps the text after the spacers, even when I specify no wrap for the column.
    Better yet, is there a way I could do this with a tree component? I've tried separating the different levels into different collections with separate custom methods, but I don't know how to specify the master/detail relationships between them.
    Any suggestions gratefully received.
    Brian Spear.

    Thanks, Frank. I don't think a tree table is the answer; it has the same requirements as the tree (or so I understand) with regards to populating each level from a different collection, and foreign key relationships. Not suitable for recursive relationships. Furthermore it only shows a small part of the tree at a time. I've got as far as returning a list of nodes within a structure, and I can display the structure, with icons for expanding and collapsing the nodes. All I need now is a way to indent the levels so the structure is more visible. The best I've managed so far is by inserting ". . ." in the text itself on each lower level, to make the left-justified text look indented. Obviously, I'd like a better way, that can be implemented in the view layer.
    Is there maybe a way of nesting objects within an outputText component so that it doesn't wrap? Must look into that.
    Thanks again.
    Brian Spear.

Maybe you are looking for

  • Office 2013 disable privacy option but no GPO

    Hello, I want to disable the following privacy options but cant find any GPO setting for it. Somebody know where the settings are located? Allow the Research task pane to check for and install new services Allow sending files to improve file validati

  • How do I add and delete music to my ipad via itunes?

    Some songs in my library is not highlighted and when I move them to the ipad it won't transfer. Deleting  songs is one big issue too. Mark a song and press del or backspace doesn't work either. If someone could tell me how to add movies to itunes fro

  • IPod wont turn on........or connect to iTunes

    i cant get the iPod to turn on, it wont do anything. i also cant get it to connect to my iTunes. i know that the iTunes works perfectly fine because i had the same exact iPod model connected to it yesterday (a different iPod though). any help please.

  • Oracle 8i Release 3 (8.1.7)

    All, We have released Oracle 8i R3 to OTN today. This release includes a few more features than our 8.1.6 release. You need a system with glibc 2.1.3! Distributions based on glibc 2.1.3 are: Red Hat 6.2 and Red Hat 6.2 Enterprise Edition (you can upd

  • Why does my mouse scroll wheel work upside down?

    I have a Logitech portable mouse attached to my Macbook Pro and the scroll wheel works backward so when I pull down on the wheel the page does up and vice versa.  Is it me or is there a setting in my Mac I need to reverse?