Current position:  Home > Default > JSP - Dynamic Table Data

JSP - Dynamic Table Data

Time:October 11
Advertisement
Hi all.
I have this problem for some time now. I need to show data as soon as I retrieve it from database. The code I'm using is as follows:
private boolean constructUiDynamically() {
        Table table                  = null;
        TableRowGroup rowGroup       = null;
        TableColumn tableColumn1     = null; String column1Header = "ISSUER ID";
        Label aLabel                 = new Label(); aLabel.setVisible(true);
        aLabel.setStyle("heigth: 100%; width: 100%");
        TableColumn tableColumn2     = null; String column2Header = "ISSUER BIN";
        TextField aTextField         = new TextField(); aTextField.setVisible(true);
        aTextField.setStyle("heigth: 100%; width: 100%");
        IssuerTableDataProvider itdp = null;
        Button commitButton          = null;
        Button undoButton            = null;
        Bank   bank       = null;       
        String bid        = null;
        String bname      = null;
        Vector issuers    = null;
        String iid        = null;
        String ibins      = null;
        String tableTitle = null;
        int numOfIssuers  = -1;
        int numOfBanks    = this.bankInstances.size();       
        for(int i=0; i<numOfBanks; i++) {
            // data
            bank = (Bank) this.bankInstances.elementAt(i);
            bid = bank.getBankId();
            bname = bank.getBankName();
            issuers = bank.getVIssuers();
            // objects
            table        = new Table();         table.setTitle("Bank ID: " + bid + " Bank Name: " + bname); table.setVisible(true);
            rowGroup     = new TableRowGroup();                                                             rowGroup.setVisible(true);
            tableColumn1 = new TableColumn();   tableColumn1.setHeaderText(column1Header);                  tableColumn1.setVisible(true);
            tableColumn1.setStyle("height: 20px; width: 3px");                       
            tableColumn2 = new TableColumn();   tableColumn2.setHeaderText(column2Header);                  tableColumn2.setVisible(true);
            tableColumn2.setStyle("height: 20px; width: 150px");
            commitButton = new Button();        commitButton.setText("Commit");                             commitButton.setVisible(true);
            undoButton   = new Button();        undoButton.setText("Undo");                                 undoButton.setVisible(true);
            // connect objects
            rowGroup.getChildren().add(tableColumn1);
            rowGroup.getChildren().add(tableColumn2);
            table.getChildren().add(rowGroup);
            tableColumn1.getChildren().add(aLabel);
            tableColumn2.getChildren().add(aTextField);
            this.getLayoutPanel1().getChildren().add(table);
            this.getLayoutPanel1().getChildren().add(commitButton);
            this.getLayoutPanel1().getChildren().add(undoButton);
            this.getVColumn1().add(tableColumn1);
            this.getVColumn2().add(tableColumn2);
            this.getVRowGroups().add(rowGroup);
            this.getVDataProvider().add(itdp);
            this.getVTable().add(table);
            this.getVCommitButtons().add(commitButton);
            this.getVUndoButtons().add(undoButton);
            // data provider fill up
            numOfIssuers = issuers.size();
            itdp = new IssuerTableDataProvider(numOfIssuers);
            for(int j=0; j<numOfIssuers; j++) {
                iid   = ((Issuer) issuers.elementAt(j)).getISSUER_ID();
                ibins = ((Issuer) issuers.elementAt(j)).getLineOfBins();
                itdp.setValue(j, iid, ibins);
            rowGroup.setSourceData(itdp);
        return true;
    }My data source object is a custom class that extends the ObjectArrayDataProvider. Everything seems to work perfectly except that no data are shown in the table. If I use my data source to manually request the data every thing is ok, but no data actually are printed in the table.
First of all, can I do this, or I must follow another approach?
Any help, please?
Advertisement
I'm using JSF 1.1.
Classes I currently use are these:
import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Button;
import com.sun.rave.web.ui.component.Form;
import com.sun.rave.web.ui.component.Head;
import com.sun.rave.web.ui.component.Html;
import com.sun.rave.web.ui.component.Label;
import com.sun.rave.web.ui.component.Link;
import com.sun.rave.web.ui.component.Page;
import com.sun.rave.web.ui.component.PanelLayout;
import com.sun.rave.web.ui.component.StaticText;
import com.sun.rave.web.ui.component.Table;
import com.sun.rave.web.ui.component.TableColumn;
import com.sun.rave.web.ui.component.TableRowGroup;
import com.sun.rave.web.ui.component.TextField;The project is built by the netbeans IDE using the web visual plugin and other tools provided by that IDE.

Dynamic table data isn't transfered to the context, with webdynpro for java

2015-10-11

Hi, I'm using LifeCycle designer 7.1 and Adobe reader 7.0.5. I'm trying to make a dynamic table in a PDF form, that will be related to a table in the context. I've designed the context like it says here: Dynamic Table -  same data repeating in all ro

Dynamic table data not transfered to context WD4ABAP

2015-10-11

Hello Guys, Currently I have a urgent problem with Adobe Forms and WD4Abap. We are using AdobeReader 8.1.1 und Designer 7.1. Me problem is: 1) I have an interactive form with dynamic table and simple fields... 2) Data within textfields can be updated

Dynamic table data by adding or delting not transfered to context

2015-10-11

Hello Guys, Currently I have a urgent problem with Adobe Forms and WD4Abap. We are using AdobeReader 8.1.1 und Designer 7.1. Me problem is: 1) I have an interactive form with dynamic table and simple fields... 2) Data within textfields can be updated

Dynamic table data

2015-10-11

Hi guys first of all sorry if my English is not so good. And now here is my problem.. On my page a have one combo box with several SQL query s in it. Below that i have table in i want to put result from query selected above...but the problem is that

Dynamic Table data cannot be Read.

-0001-11-30

Hello,        I have an Adobe Interactive form and I am trying to read the data from the Dynamic Table I have in the Form. The Problem is when I try to read the data using the below code, the data which is entered by user data cannot be read for some

Retreival of Dynamic Table Datas from Adobe to WebDynpro- ABAP

-0001-11-30

Dear Friends, I have Developed an application in Webdynpro-ABAP, where i have integrated Adobe form in the webdynpro. In the adobe form, dynamic table is there where we can add and delete the rows at runtime. I am trying to retreive the table datas a

Create a edit link from a dynamic table data to the correct record

-0001-11-30

ok i have made a dynamic table with the correct information from the MySql database to populate it but i want to add an edit button to take me to the correct information i want to edit / delete. what is happening is no matter what record i want to ed

Problem during Download of Dynamic Table Data

-0001-11-30

Hello All, I have data in a dynamic internal table. When I'm trying to download the content onto my Presentation Server and Application Server, the data corresponding to the CURRENCY and QUANTITY fields are getting ROUNDED to the nearest whole number

Create graph based on dynamic table data

-0001-11-30

Hi experts ; i have JDeve Version 11.1.2.2.0 , i'm create dynamic table based on dynamic SQL query this query return by function in database by based on passing parameter . My question :- 1- How create graph based on dynamic table and contral it at r

How to decrease the dynamic table data loading time

-0001-11-30

hi i have problem with dynamic table. when i execute the the table with passing a query , getting lot of time for loading the table data.( it takes 30sec for every 100 rows.) pls help me how to overcome this problem. thanks advance.Yes, This is oracl

How to download dynamic table data into CSV format

-0001-11-30

Hi, I have data in dynamic table <it_data>, and I want to download that into CSV format. so I tried to use FM SAP_CONVERT_TO_CSV_FORMAT but how to use this FM with dynamic table? here <it_data> type standard table, we can pass this to I_TAB_SA

SPlit Dynamic Table data (FIeldsymbol) ?

-0001-11-30

Hello All, I have a dynamic internal Table in the form of a Field Symbol. Now I need to split the fields of this fieddsymbols data at each field separated by a '  ; '. and then pass the content to a character type variable. Can anyone tell me how to

Repeating dynamic table data in another table in the same document

2015-10-11

Greetings one and all: I created a dynamic table (for input) at the beginning of my form. I created a dynamic table (for display and printing) later in the same form. I wish to populate the second dynamic table with the contents of the first dynamic

How to get Dynamic table data  in table

-0001-11-30

Actually i want to generate a table by a query . now i m able to get the data in java class but i don't know that how to present that data in a table form in UIX page.HI using this methods u can create dynamic internal tables,   CALL METHOD CL_ALV_TA

Dynamic table & data binding

-0001-11-30

Hi all, I am trying to create an interactive form in WebDynpro ABAP (using Livecycle Designer 8.0). This application consists of two screens. I have a selection screen which populates an internal table in a context node. The next screen has the inter

JSP : Dynamic Table creation

-0001-11-30

HI Frds I am looking for solution for my following problem ... I want to create dyanmic table i.e rows & column on the basis of user input Thanks Ashishok if you want a sample here it is; <%@ page contentType="text/html;charset=windows-1252&qu

SOM Error while using Dynamic Tables

2015-10-11

Hi Gurus,     I have created a Adobe form with Dynamic tables and integrated in Webdynpro ABAP. When I test the form, while opening the form the following error occurs .. " The SOM Expression '$record.BP_DETAILS' for the dataRef specified on field 'B

Dynamic table with field type table

2015-10-11

Hi, I´m using "cl_alv_table_create=>create_dynamic_table" to create a dynamic table for ALV Grid. But...I need to use colors in ALV, then I need to declare a field type LVC_S_SCOL in dynamic table from "cl_alv_table_create=>create_dyn

How to create a structure which can hold a dynamic table as a field in DDIC

2015-10-11

Hi ,        I am designing a solution for a problem and have a unique requirement.  I need to create a structure which can hold a field where dynamic table data can be stored.  Let me illustrate with an example : My structure  ( say  Z_output_struc )