Self re-rendering of a data table

hello !
i am using tomahawk data table which contain a <a4j:commandLink in one of its coloumn .
now this link's action listener delete data from the list that is used for this datatable
the problem is
this data table is not re-rendered even i have specified id of datatable in the reRender attrbute of <a4j:commandLink
note that
i have also specified other ids in the reRender attrbute of <a4j:commandLink And others work fine but the DATATABLE dont .
regards
Shakeel Abbas

sorry to disturb its working now
i have not written parantheses while calling the jsFunction
Although no one replied but thanks

Similar Messages

  • Get called back as the data table is being rendered

    Hello:
    I have a datatable, like this:
    <t:column>
    <f:facet name="header">
    <t:outputText value="Process" style="font-weight: bold" />
    </f:facet>
    <t:commandButton id="ProcessButton" styleClass="sbttnHeader"
    actionListener="#{ProcessQueueBBean.processAction}"
    value="#{ProcessQueueBBean.processButtonNames[dbRow.status]}" >
    </t:commandButton>
    </t:column>I need to get called when the data table rows are being rendered. The reason I need to get called is that some columns have conditional data depending on the other values in the same row
    Any ideas?
    Thanks for your help

    I don't know i've never tried this in the way you need it but let me know if it works.. in the <column tag render=> I know you can check infor
    so have render = "#{row.num+row.othernumber >0}"
    that probably will work .. like i said I never tried it in a table column.. Let me know if it works

  • JSP Data table - Rendering for command buttons.

    Hi All,
    We are designing a JSP page where results from table have to be thrown on a data table. (h:dataTable)
    Based on one column value on the data table, we need to render a command button for each row of data table.
    For example, I select the employees from a table and throw it on data table.
    Only for those employees where address is not present, I need to enable an "Update address" command button.
    (Command button "Update address" is also part of data table.)
    Is it possible to accomplish this on a data table?
    If so how should we code the "rendered" tag of the command button in data table.
    Any help would be greatly appreciated.
    Thanks.

    Sounds like the JSF forum would be a closer alignment, but in general
    - retrieve your information from the database into a list of Employee beans.
    - Have your h:dataTable use the list of Employee beans as a datasource
    - have the rendered attribute of your update button depend on the value of employee.address maybe #{empty employee.address}
    cheers,
    evnafets

  • A data table in one column of a dynamic data table

    Hi , I have to design a dynamic data table(with dynamic columns and data) which looks as the following
    DETAILS      NAME      ROLE NUMBER     CLASS     SECTION
    15     MATHS     SURESH     15     10     A
    20     SCIENCE                    
    25     ENGLISH     
    15     MATHS     SURESH     15     10     A
    20     SCIENCE                    
    25     ENGLISH          
    The data in the column 'DETAILS' should have inner table. The data in this inner table should have hyper links. If there is no inner table infor mation there shold be an image with hyperlink. This data table should also have pagination and sorting features. Please send me some example code for this. Please help me out as i have client demo on monday

    You may find this example useful: [http://balusc.blogspot.com/2006/06/using-datatables.html#NestingDatatables].
    To toggle between a nested datatable and a hyperlink with image just use the rendered attribute. E.g.
        <h:column>
            <h:dataTable rendered="#{!empty dataItem.innerList}">
            </h:dataTable>
            <h:commandLink rendered="#{empty dataItem.innerList}">
            </h:commandLink>
        </h:column>
    ...

  • Weird problem with mysql query and data table buttons !!!!

    Hi,
    I'm using jsc 2 update 1 on windows and mysql 4.1 . I have a page with a data table. One column of the data table contains "Details" buttons.
    Source query for the table is :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    AND tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    The tbl_tesserati.data_nascita is a mysql date field.
    The click event handler code for the "Details" Button is:
    public String btnModificaTesserato_action() {
            try{
                TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");
                getRequestBean1().setId_tesserato((Long)rowData.getValue("idTesserato"));          
            } catch(Exception ex) {
                log("errore nella query",ex);
            return "dettaglioTesseratoSocieta";
        }When i run the project and open the page the table is correctly rendered and populated with some rows. But when i click on details button nothing happens, the page is simply reloaded.
    If i set a breakpoint in the code line   TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");the debbuger does not stop the code execution ! As if the button was never clicked!
    I tried to modify the source query to :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    OR tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    Using this query everything works well !! The click handler works and the debugger too !!
    I changed only the AND in OR !!!
    I also tried to change mysql-x-x-connector driver but without solving my problem.
    Can someone help me ?
    Thanks
    Giorgio

    You'll find that it is more to do with the way MySql deals with dates than anything else! Depending on how your date field is setup, then try using a BETWEEN statement for those 2 lines in your first query e.g.
    AND ( tbl_tesserati.data_nascita BETWEEN ? AND ?)
    The date column needs to be in the ISO format to work. If you examine your second query output, you might discover that the output is only going to refer to one parameter (probably the OR one). Did you manage to view the output logs from the application server? You would have got an idea from there with a message like stating a conversion error'.
    Alternatively, you could try using the to_days() function and convert it directly to a number which would be a lot easier to deal with. For example:
    AND to_days(tbl_tesserati.data_nascita >= ? )
    AND to_days( tbl_tesserati.data_nascita<= ? )
    Or try the BETWEEN version with to_days() and see what you get.
    More info about date formatting (v5) here:
    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_to-days
    Before I forget, sometimes you may need to treat dates as Strings rather 'Long' as you did.
    As a matter of interest, did you try your query in a different piece of software?
    If my queries are a little more complicated, I tend to try MySql queries out in the free MySql query browser and also double check in another to verify certain issues. I found it easier to develop SQL in a seperate program then import the final version to JSC making the required modifications for parameters.
    Message was edited by:
    aerostra

  • How to link label with an input field in data table?

    I am curious if there is a nice way to link a label to input field in a data table directly in JSP? Data filling the table are dynamically bounded.
    Sample, simplified code below. Values of "label" property are unique in the collection binded to dataTable.
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:jsp="http://java.sun.com/JSP/Page">
         <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" />
         <f:view>
              <html>
              <body>
              <h:dataTable value="#{screen$monitoring$errorlog$CorrectHopper.dataset}" var="DATA_ROW">
                   <h:column>
                        <f:facet name="header">
                             <h:outputText value="Name" />
                        </f:facet>
                        <h:outputLabel value="#{DATA_ROW.label}" for="#{DATA_ROW.label}_id" />
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:outputText value="Value" />
                        </f:facet>
                        <h:inputText value="#{DATA_ROW.label}" id="#{DATA_ROW.label}_id" />
                   </h:column>
              </h:dataTable>
              </body>
              </html>
         </f:view>
    </jsp:root>
    returns:
    17:39:01,390 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.IllegalArgumentException: #{DATA_ROW.label}_id
    what is related to EL expression in h:inputText's "id" attribute.
    Is there any other way to bind label with dynamically created input field in JSP? Do I really have to bind input field directly to component objects with "binding" and set IDs manually with setId() (what is ugly solution because it moves View related logic to Model layer)?

    I've thought of using EL because I have to somehow
    link a label to an input field dynamically. Somehow? Dynamically? Just use plain text :)Well... just look at my code snippet (notice: we want to join the pairs of labels and text boxes placed in a datatable [or any other repeater-like component rendering properties of objects from a collection]):
    <h:dataTable value="#{screen$monitoring$errorlog$CorrectHopper.dataset}" var="DATA_ROW">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name" />
    </f:facet>
    <h:outputLabel value="#{DATA_ROW.label}" for="#{DATA_ROW.label}_id" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Value" />
    </f:facet>
    <h:inputText value="#{DATA_ROW.label}" id="#{DATA_ROW.label}_id" />
    </h:column>
    </h:dataTable>
    and what is your idea of using plain text as "id" attribute value in this case? :)
    Regards,
    Michal

  • Jsf data table component + print null cell

    I am using the jsf data table component and binding the column values to a backing bean.
    <h:dataTable binding="#{backing_showDifferences.dataTable2}"
    id="dataTable2">
    <h:column binding="#{backing_showDifferences.userColumn1}"/>
    <h:column binding="#{backing_showDifferences.userColumn2}"/>
    <h:column binding="#{backing_showDifferences.userColumn3}"/>
    </h:dataTable>
    - some code from my showDifferences.java
    HtmlOutputText column1Text = new HtmlOutputText();
    vb =
    FacesContext.getCurrentInstance().getApplication().createValueBinding("#{users.uclass}");
    column1Text.setValueBinding("value", vb);
    usercolumn1.getChildren().add(column1Text);
    HtmlOutputText column2Text = new HtmlOutputText();
    vb =
    FacesContext.getCurrentInstance().getApplication().createValueBinding("#{users.ue1}");
    column2Text.setValueBinding("value", vb);
    usercolumn2.getChildren().add(column2Text);
    HtmlOutputText column3Text = new HtmlOutputText();
    vb =
    FacesContext.getCurrentInstance().getApplication().createValueBinding("#{users.ue2}");
    column3Text.setValueBinding("value", vb);
    usercolumn3.getChildren().add(column3Text);
    ResultSetDataModel dataModel = new ResultSetDataModel();
    dataModel.setWrappedData(rs);
    dataTable2.setValue(dataModel);
    The raw HTML:
    <table id="form1:dataTable2" class="iuptable" border="1">
    <thead>
    <tr>
    <th scope="col">Heading 1</th>
    <th scope="col">Heading 2</th>
    <th scope="col">Heading3</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>some data in this column</td>
    <td>X</td>
    <td></td>
    </tr>
    <tr>
    <td>Some more data in this row</td>
    <td>X</td>
    <td></td>
    </tr>
    </tbody>
    </table>
    My problem is this...in the raw HTML the <td></td> tag is not formatted nicely on my table output. I have lines around my entire table and each cell within it. When the <td></td> prints there are no lines. I am new to the JSF table data component, but if I were writing some JSP or servlet code I would check that if value was null I would append an &nbsp to the <td> tag (ex. <td>&nbsp</td>) and the table would be formatted properly. The backing bean that I am binding to is pulling the data from a database table...so my sql looks like this:
    SELECT uclass, ue1, ue2 from table1; my problem is when ue1 or ue2 is a null value.
    Any ideas would be greatly appreciated!

    Hi,
    the h:dataTable belongs to the JSF Reference Implementation from Sun, not to Oracle ADF Faces. The rendering is within this component set and I suggest to report your issue on one of the SUN forums (http://forum.java.sun.com/forum.jspa?forumID=427) as we have no handle to e.g. fix an issue if it exists in the component set.
    Frank

  • Expand All and Collapse All with Data table

    Hi Guys,
         I have a data table as shown in code pasted . where the first and second column have row category which gives a categorization with a twisty.
         When i click on the twisty or item name the level beneath it expands. Eerything works fine.. but i need to have to links     Expand All and Collapse All which when clicked open the entire hierarchy or collapse it. Can anyone suggest a way of doing. Can it be done using javascript, I am not comfortable with java script .If someone has done this before please share the piece of code.Also please suggest the different ways of doing it. I am using RAD 7 and IBM JSF components.
         <hx:dataTableEx border="0" cellpadding="2" cellspacing="0"
         columnClasses="columnClass1" headerClass="headerClass"
         footerClass="footerClass" rowClasses="rowClass1, rowClass2" binding="#{masterPublList.tablebindData}"
         id="tableEx1" styleClass="dataTableEx" value="#{masterPublList.lst_publication}" var="varlst_publication">
              <hx:columnEx id="columnEx3">
                   <hx:panelRowCategory id="rowCategory2"
                        styleClass="panelRowCategory"
                        value="#{varlst_publication.publCategory}" collapsed="true">
                   </hx:panelRowCategory>
              </hx:columnEx>
              <hx:columnEx id="columnEx2">
                   <hx:panelRowCategory id="rowCategory1"
                        styleClass="panelRowCategory" value="#{varlst_publication.publSubCategory1}">
                        <h:outputText id="text5" styleClass="outputText"></h:outputText>
                   </hx:panelRowCategory>
              </hx:columnEx>
              <hx:columnEx id="column1">
                   <hx:outputLinkEx id="linkEx1" styleClass="outputLinkEx" value="#{varlst_publication.publUrl}" target="_blank">
                        <h:outputText id="text3" styleClass="outputText" value="#{varlst_publication.publName}"></h:outputText>
                   </hx:outputLinkEx>
              </hx:columnEx>
              <hx:columnEx id="columnEx1">
                   <h:selectManyCheckbox disabledClass="selectManyCheckbox_Disabled"
                        id="checkbox1" styleClass="selectManyCheckbox" value= "#{varlst_publication.publLang}">
                        <f:selectItems value= "#{masterPublList.lst_lang}"/>
                   </h:selectManyCheckbox>
              </hx:columnEx>
         </hx:dataTableEx>
                   Thanks in anticipation

    Hi Naamkeek,
    Per my understanding that you have added the Expand All and Collapse All button in an drill down report by adding the "Go to report" action, now you got the report always refresh and return to the first page, right?
    I have tested on my local environment and can reproduce the issue, no matter whether to add two buttons or using the parameter to do the Expand All and Collapse All, it is always return to the first page.
    Gernerally, SQL Server Reporting Services does a postback while clicking a expand/collapse icon. SSRS re-renders reports because it need to regenerate the pages to fit the defined width & Height. That is why SQL Server Reporting Services reloads
    the whole report.
    This is by design. And, currently, we are not able to turned it off.
    I would suggest you submitting a wish at
    http://connect.microsoft.com
    If the service requests frequently, we may include it in the next release.
    Appreciate your understanding, and if you have any more questions, please feel free to ask.
    Regards
    Vicky Liu

  • Granularity of data tables for analysis

    Hi Gurus,
    I have an understanding question when the data tables / data sources is self developed and no standard data sources are used.
    I have one data table (view) with primary keys and key figures:
    Primary key:
    ccar - credit control area.
    compc - company code.
    cust - customer.
    salorg - sales organization.
    salch - sales channel.
    saldiv - sales division.
    profc - profit center.
    busseg - business segment.
    busunt - business unit.
    Key figures:
    turn over
    payments
    open items
    etc.
    Those data sets are uploaded to data warehouse.
    Now my question is, with each data set it should be possible to analyze with BEx Analyzer, for example
    payments by customer.
    payments by company code.
    open items by customer and company code.
    open items by credit control area.
    One data set is available for the whole primary key combination (from fields ccar up to busunt).
    Is my understandig correct?
    Thank you in advance!!!

    laksh89 wrote:
    yes i guess so...., you can have reports based on turover per customers or turover per sale org,... like wise for others....
    > it all depends on what kind of report business need and relationship of data it wants to see in reports
    Thanks!
    The report requirements are do be able to analyze for any kind of combination for the mentioned fields in the primary key.
    That means the fields in primary key would be mapped to corresponding InfoObjects.
    And then it should be possible to do analysis for all InfoObjects (single InfoObject or combination of them) and key figures (like I mentioned in my first posting for example).

  • Image in data tables

    Hello,
    Maybe some body can help me here. I have a data table and the headers are links where I can sorted the data I have the sort working but what I like to do is besides the column header link inser a image like an arrow pointing up for sort ascending and pointing down for descending but I'm having problems I try DIV to hide and show the image but that does no work any suggestions
    Thanks

    Use the 'rendered' attribute.
    <h:graphicImage value="up.gif" rendered="#{!myBean.sortAscending}" />
    <h:graphicImage value="down.gif" rendered="#{myBean.sortAscending}" />

  • Adding custom column to a Data Table (bound to database table)

    Hello,
    I've added an additional "Output Text" column to an existing "Data Table" component, which is pulling a database table and rendering it. It's actually called "OutputText5". What I want to do, is set the value of the "OutputText5" dynamically, depending on a Date comparison between the system date, and one of the currentRow field values, which is actually an Oracle Date data type. basically I'm trying to use the Date.after() comparison and put different content in there depending on true or false evaluation.
    Seems simple enough .. but.. I'm trying to do this without using vim and JSP Beans (how I'd usually do this). I'm not experienced with JSF components and how this would be done using JSC - can I iterate over currentRow or something inside the "Page1.java" source? Is there an easy way to create dynamic value bindings like this in Data Table components in general? Maybe using expressions in "OutputText5" properties or something? I figure I should ask about doing this the easy way, before I spend lots of time and start teaching myself bad habbits.
    I apologise in advance if this is a repeat post. I spent some time searching ,but came up empty handed.
    Thanks in advance.
    David Basham

    Hi David,
    Here's some ideas to try on:
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=49459
    hth,
    v

  • ETA for a JavaFX Data Table / Grid

    Hi All,
    Some of the posts in the forum seem to suggest that there is a JavaFX Data Table component in the works , any word on when we'll see something ? I'm looking for the following features ..
    * Columns of different widths
    * Columns that the user can resize at runtime
    * Columns that the user can reorder at runtime
    * Columns that can be filtered(removed) at runtime
    * Customizable column headers
    * Ability to use a custom cell rendered for any column to display data other than text
    * Support for sorting the data by clicking on a column
    * Pagination
    * Runtime column selection
    * Background row highlighting
    Until a JavaFX data table arrives is it a recommended approach to use something like JXTable ?
    Thanks
    --gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
      I think this is because of memory overflow.
      You can create two screens for this, in on screen (Overview) screen, restrict the data selection.
      In detail screen display the data.
    With regards,
    Vamsi

  • Extra non bound Row in a data table

    We have the following question, which we believe is possible with creator:
    In a data table, whose data source is a database table or Object List or EJB, is it possible to have the fisrt row (the row that comes after the column titles row) not bound to any data and used for another purpose? We want to use this row as a Query By Example (QBE) row, so that an application user may enter arbitrary search criteria into textbox columns in this row, column by column. When they click on a find button, data that meets the criteria is returned. We want something similar to the following html dislpay:
    <table width="401" border="1">
    <tr>
    <th scope="col">Employee ID </th>
    <th scope="col">First Name </th>
    <th scope="col">Last Name </th>
    </tr>
    <tr>
    <td>Text Box here for ID criteria </td>
    <td>Text box here for First Name Criteria </td>
    <td>Text Box here for last name criteria </td>
    </tr>
    <tr>
    <td>101</td>
    <td>David</td>
    <td>Keen</td>
    </tr>
    <tr>
    <td>102</td>
    <td>Mary </td>
    <td>Linda</td>
    </tr>
    <tr>
    <td>103</td>
    <td>Kevin</td>
    <td>Lees</td>
    </tr>
    <tr>
    <td>104</td>
    <td>James </td>
    <td>Bent</td>
    </tr>
    </table>
    One possibility that we have considered is to dynamically create a table, using the following code. But this is not working as expected. First, the QBE row is not rendered( there is a message that says No Data Found). And second, the pagination controls do not display.
    public HtmlPanelGrid getGridPanel1() {
    //return gridPanel1;
    Table dynamicTable = createTable();
    gridPanel1.getChildren().add(dynamicTable);
    return gridPanel1;
    private Table createTable(){
    Table table = new Table();
    table.setId("table1");
    table.setTitle("Dynamically Created Table");
    table.setPaginateButton(true);
    table.setPaginationControls(true);
    // Create the Table Row group dynamically
    createRowGroupQBE(table);
    createRowGroupData(table);
    return table;
    private TableRowGroup createRowGroupQBE(Table tbe)
    TableRowGroup rowGroup = new TableRowGroup();
    rowGroup.setId("rowGroup1");
    //rowGroup.setPaginated(false);
    //rowGroup.setSourceVar("currentRow");
    //rowGroup.setValueBinding("sourceData", getApplication());
    //rowGroup.setRows(5);
    //rowGroup.setRows(1);
    // Add the table row group to the table as a child
    tbe.getChildren().add(rowGroup);
    // Create the first table Column
    TableColumn tableColumn1 = new TableColumn();
    tableColumn1.setId("tableColumn1");
    tableColumn1.setHeaderText("Data Item");
    // Add the first table Column to the table row group
    rowGroup.getChildren().add(tableColumn1);
    TextField staticText1 = new TextField();
    // Add the static text to the table column1
    tableColumn1.getChildren().add(staticText1);
    // Create the first table Column
    TableColumn tableColumn2 = new TableColumn();
    tableColumn2.setId("tableColumn2");
    tableColumn2.setHeaderText("Data Item Name");
    // Add the first table Column to the table row group
    rowGroup.getChildren().add(tableColumn2);
    StaticText staticText2 = new StaticText();
    // Add the static text to the table column2
    tableColumn2.getChildren().add(staticText2);
    // Create the first table Column
    TableColumn tableColumn3 = new TableColumn();
    tableColumn3.setId("tableColumn3");
    tableColumn3.setHeaderText("System Code");
    // Add the first table Column to the table row group
    rowGroup.getChildren().add(tableColumn3);
    StaticText staticText3 = new StaticText();
    // Add the static text to the table column3
    tableColumn3.getChildren().add(staticText3);
    // Create the first table Column
    TableColumn tableColumn4 = new TableColumn();
    tableColumn4.setId("tableColumn4");
    tableColumn4.setHeaderText("Description");
    // Add the first table Column to the table row group
    rowGroup.getChildren().add(tableColumn4);
    StaticText staticText4 = new StaticText();
    // Add the static text to the table column4
    tableColumn4.getChildren().add(staticText4);
    // Create the first table Column
    TableColumn tableColumn5 = new TableColumn();
    tableColumn5.setId("tableColumn5");
    tableColumn5.setHeaderText("Column Heading");
    // Add the first table Column to the table row group
    rowGroup.getChildren().add(tableColumn5);
    StaticText staticText5 = new StaticText();
    // Add the static text to the table column5
    tableColumn5.getChildren().add(staticText5);
    return rowGroup;
    private TableRowGroup createRowGroupData(Table tbe)
    // Create the Table Row group dynamically
    TableRowGroup dataRowGroup = new TableRowGroup();
    dataRowGroup.setId("rowGroup2");
    dataRowGroup.setSourceVar("currentRow");
    dataRowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{newPage.dictionarySessionRemoteGetAllDictionaries1}"));
    //dataRowGroup.setPaginated(true);
    dataRowGroup.setRows(5);
    // Add the table row group to the table as a child
    tbe.getChildren().add(dataRowGroup);
    // Create the first table Column
    TableColumn dataTableColumn1 = new TableColumn();
    dataTableColumn1.setId("dataTableColumn1");
    // Add the first table Column to the table row group
    dataRowGroup.getChildren().add(dataTableColumn1);
    StaticText dataStaticText1 = new StaticText();
    dataStaticText1.setValueBinding("text", getApplication().createValueBinding ("#{currentRow.value['dataItem']}"));
    // Add the static text to the table column1
    dataTableColumn1.getChildren().add(dataStaticText1);
    // Create the first table Column
    TableColumn dataTableColumn2 = new TableColumn();
    dataTableColumn2.setId("dataTableColumn2");
    // Add the first table Column to the table row group
    dataRowGroup.getChildren().add(dataTableColumn2);
    StaticText dataStaticText2 = new StaticText();
    dataStaticText2.setValueBinding("text", getApplication().createValueBinding ("#{currentRow.value['dataItemName']}"));
    // Add the static text to the table column2
    dataTableColumn2.getChildren().add(dataStaticText2);
    // Create the first table Column
    TableColumn dataTableColumn3 = new TableColumn();
    dataTableColumn3.setId("dataTableColumn3");
    // Add the first table Column to the table row group
    dataRowGroup.getChildren().add(dataTableColumn3);
    StaticText dataStaticText3 = new StaticText();
    dataStaticText3.setValueBinding("text", getApplication().createValueBinding ("#{currentRow.value['systemCode']}"));
    // Add the static text to the table column3
    dataTableColumn3.getChildren().add(dataStaticText3);
    // Create the first table Column
    TableColumn dataTableColumn4 = new TableColumn();
    dataTableColumn4.setId("dataTableColumn4");
    // Add the first table Column to the table row group
    dataRowGroup.getChildren().add(dataTableColumn4);
    StaticText dataStaticText4 = new StaticText();
    dataStaticText4.setValueBinding("text", getApplication().createValueBinding ("#{currentRow.value['description']}"));
    // Add the static text to the table column4
    dataTableColumn4.getChildren().add(dataStaticText4);
    // Create the first table Column
    TableColumn dataTableColumn5 = new TableColumn();
    dataTableColumn5.setId("dataTableColumn5");
    // Add the first table Column to the table row group
    dataRowGroup.getChildren().add(dataTableColumn5);
    StaticText dataStaticText5 = new StaticText();
    dataStaticText5.setValueBinding("text", getApplication().createValueBinding ("#{currentRow.value['columnHeading1']}"));
    // Add the static text to the table column5
    dataTableColumn5.getChildren().add(dataStaticText5);
    return dataRowGroup;
    Any ideas?

    Here is a suggestion. I have not tried it myself
    Add another method
        public void setSelected(RowKey rowkey, Object object) {
            if (rowKey != null) {
                tablePhaseListener.setSelected(rowKey, object);
        }

  • JSF 1.1 performance, especially UIData and Data Table

    Hi,
    Does anybody have any JSF 1.1 (Sun reference implementation) performance experiences to share? I am currently looking at the data table component and the use of UIData. Initial observations are an incredible amount of memory is churned during rendering the data table, with the following classes culprits:
    java.util.HashMap$KeyIterator
    javax.faces.component.UIComponentBase$ChildrenListIterator
    java.util.AbstractList$Itr
    char[]
    java.util.ArrayList
    javax.faces.component.UIComponentBase$FacetsMapKeySetIterator
    javax.faces.component.UIComponentBase$FacetsMapKeySet
    javax.faces.component.UIComponentBase$FacetsMapValues
    javax.faces.component.UIComponentBase$FacetsAndChildrenIterator
    To render 50 rows with 10 columns (each column only having a simple outputText component) I'm seeing 1.3Mb memory churned and 0.8 seconds processing time.
    To rener 100 rows with same columns and components I'm seeing nearly 2Mb churned and 2 seconds processing time.
    UIData.setRowIndex is a large culprit.
    I'm really after finding out your experiences on JSF performance and its scalability.
    Any help here is appreciated.
    Thanks - JJ

    Hi,
    Does anybody have any JSF 1.1 (Sun reference implementation) performance experiences to share? I am currently looking at the data table component and the use of UIData. Initial observations are an incredible amount of memory is churned during rendering the data table, with the following classes culprits:
    java.util.HashMap$KeyIterator
    javax.faces.component.UIComponentBase$ChildrenListIterator
    java.util.AbstractList$Itr
    char[]
    java.util.ArrayList
    javax.faces.component.UIComponentBase$FacetsMapKeySetIterator
    javax.faces.component.UIComponentBase$FacetsMapKeySet
    javax.faces.component.UIComponentBase$FacetsMapValues
    javax.faces.component.UIComponentBase$FacetsAndChildrenIterator
    To render 50 rows with 10 columns (each column only having a simple outputText component) I'm seeing 1.3Mb memory churned and 0.8 seconds processing time.
    To rener 100 rows with same columns and components I'm seeing nearly 2Mb churned and 2 seconds processing time.
    UIData.setRowIndex is a large culprit.
    I'm really after finding out your experiences on JSF performance and its scalability.
    Any help here is appreciated.
    Thanks - JJ

  • Ajax4JSF and Tomahawk data table, strange behaviour

    Hi,
    I use the tomahawk data table to display a list of objects in my page with the following code snippet
    <t:dataList value="#{userGallery.images}" var="image" layout="simple">
      <a4j:region>
        <t:htmlTag value="div" styleClass="imageEntry">
          <!-- This is the interesting part -->
          <h:outputLink value="gallery.faces">
            <f:param name="imageId" value="#{image.id}" />
            <t:div styleClass="imageWrapper image_#{image.id} #{image.inCart ? 'inCart' : ''}">
              <h:graphicImage value="#{ftp.apacheThumbnails}#{image.imageName}" alt="#{image.imageName}"/>
            </t:div>
          </h:outputLink>
          <!-- End of the interesting part -->
          <t:htmlTag value="div" styleClass="textWrapper">
            <t:htmlTag value="div" styleClass="actions">
              <a4j:commandLink reRender="imageList,shoppingChart" styleClass="addToCart" value="+#{msg.detailCart}" action="#{shoppingCart.addImageToCart}" rendered="#{!image.inCart}">
                <f:setPropertyActionListener target="#{shoppingCart.chosenImageId}" value="#{image.id}" />                                     
              </a4j:commandLink>
              <a4j:commandLink reRender="imageList,shoppingChart" styleClass="removeFromCart" value="-#{msg.detailCart}" action="#{shoppingCart.removeImageFromCart}" rendered="#{image.inCart}">
                <f:setPropertyActionListener target="#{shoppingCart.chosenImageId}" value="#{image.id}" />                                     
              </a4j:commandLink>     
            </t:htmlTag>
         </t:htmlTag>
       </t:htmlTag>
      </a4j:region>
    </t:dataList>I have marked the interesting part of the text.
    When i first access the page then everything is rendered as it should be.
    When i now klick on the a4j:commandLink then i got the following result: (only the interesting snippet)
    <div class="imageEntry">
      <a href="gallery.faces?imageId=2"/>
      <div class="imageWrapper image_2 inCart">
         ..... (output as it should be)
      </div>
      <div  class="textWrapper">
         .... (output as it should be)
      </div>
    </div>So you see the link tag is closed to early, it should wrapp the complete <div class="imageWrapper> object.
    Anybody know how to solve this?
    Edited by: heissm on 19.05.2008 16:26 - shifting of the html tags

    Hi,
    I use the tomahawk data table to display a list of objects in my page with the following code snippet
    <t:dataList value="#{userGallery.images}" var="image" layout="simple">
      <a4j:region>
        <t:htmlTag value="div" styleClass="imageEntry">
          <!-- This is the interesting part -->
          <h:outputLink value="gallery.faces">
            <f:param name="imageId" value="#{image.id}" />
            <t:div styleClass="imageWrapper image_#{image.id} #{image.inCart ? 'inCart' : ''}">
              <h:graphicImage value="#{ftp.apacheThumbnails}#{image.imageName}" alt="#{image.imageName}"/>
            </t:div>
          </h:outputLink>
          <!-- End of the interesting part -->
          <t:htmlTag value="div" styleClass="textWrapper">
            <t:htmlTag value="div" styleClass="actions">
              <a4j:commandLink reRender="imageList,shoppingChart" styleClass="addToCart" value="+#{msg.detailCart}" action="#{shoppingCart.addImageToCart}" rendered="#{!image.inCart}">
                <f:setPropertyActionListener target="#{shoppingCart.chosenImageId}" value="#{image.id}" />                                     
              </a4j:commandLink>
              <a4j:commandLink reRender="imageList,shoppingChart" styleClass="removeFromCart" value="-#{msg.detailCart}" action="#{shoppingCart.removeImageFromCart}" rendered="#{image.inCart}">
                <f:setPropertyActionListener target="#{shoppingCart.chosenImageId}" value="#{image.id}" />                                     
              </a4j:commandLink>     
            </t:htmlTag>
         </t:htmlTag>
       </t:htmlTag>
      </a4j:region>
    </t:dataList>I have marked the interesting part of the text.
    When i first access the page then everything is rendered as it should be.
    When i now klick on the a4j:commandLink then i got the following result: (only the interesting snippet)
    <div class="imageEntry">
      <a href="gallery.faces?imageId=2"/>
      <div class="imageWrapper image_2 inCart">
         ..... (output as it should be)
      </div>
      <div  class="textWrapper">
         .... (output as it should be)
      </div>
    </div>So you see the link tag is closed to early, it should wrapp the complete <div class="imageWrapper> object.
    Anybody know how to solve this?
    Edited by: heissm on 19.05.2008 16:26 - shifting of the html tags

Maybe you are looking for

  • I need to update from Mac OS 10.4.11 to Snow Leopard

    I need to update from Mac OS 10.4.11 to Snow Leopard, do I just buy Snow Leopard???

  • How to disable adobe reader in safari

    I am aware there is this thread on basically the same problem How can I regain Preview as my default PDF browser in Safari?. However my circumstances are a bit different. One of my content vendors uses FileOpen to lock their PDFs and that is why I ev

  • Plsql procedure containing select statement to fill page items

    I would like to fill items :P200_A and :P200_B and so on with the result of a SELECT which depends on the different values of many select lists. E.G. :P200_list_alpha with the list of values STATIC:less than 10;less,equal than 10;equal,above 10;above

  • Macbook Air Final Cut Pro X

    Will  Final Cut Pro X run reasonably well on new high-end Macbook Air--max CPU, RAM, and SSD?  Or with the demise of the 17", am I doomed to 15" with discrete graphic cards.  For my needs, 15" is worst of both worlds--not portable, not enough screen.

  • Bid Invitation always in approval - BUS2200

    Hello,  When publishing a Bid Invitation, always the document is falling in approval.  I am using SRM 5.0 with package 15.  In the transaction OOCU WS WS 14500026 (Automat. Approval of Bid Invitation) it is active.  To verify print enclosed:  [PRINT|