Dynamic Table setup (Infobus)

Hi,
I will first describe my environment application and then the problem.
I want to create an Infobus GridControl, without using the designer. To setup the Rowsetinfo to which the GridControl will be bound, I perform a "select * from TABLE", using a normal JDBC coneection and looking into the metadata. Thus I have the names and types of all attributes. Next I build an array of ColumnInfo objects, in which each object is an AttributeInfo, with the name and type previously obtained, and finally I use the Rowsetinfo.setAttributeInfo().
The next step is RowsetInfo.setQueryInfo(), in which I'm not sure if the parameters (AppModule and so on) are completely right, but it works.
Finally I publish the session, and my grid gets populated with the data. Perfect, isn't it?
My problem starts when I want to insert or delete a row. I can navigate, but not modify, and I get the error: JBO 01206: ViewDefImpl is Read only". How can I avoid this, and be able to insert a row? Deep inside the RowsetInfo, there is a member, mReadOnly, which belongs to another object of class ViewDefImpl, that is set to true. If I build the app using the designer, this property is false, but I do not know how to change it. Any ideas or workarounds will be much appreciated. if you need more information, please contact me.
By the way, where can I get more in-deep information about InfoSwing components?
Thank you very much
Alberto
null

Your question is too general. Please refer to the documentation.
Regards,
Robin Zimmermann
Forms Product Management

Similar Messages

  • Database Query & Dynamic Table Question

    Greetings all. I am using Dreamweaver CS3 and working in PHP
    with a MySql database. I'm sure the recordset I'm trying to create
    is rather simple, but for the life of me I can't figure it out. I
    have a table with peoples' names and their grades in different
    subjects. For example:
    Name Subject 1 Subject 2 Subject 3
    John D. 85 72 73
    Jane D. 90 85 70
    John S. 70 92 85
    What I'm wanting is a page with a dynamic table for the
    person that logs on to see their grades in each subject if it's
    above an 80. I already know how to pass the username session
    variable, but I'm not sure how to say "show subject if value is
    greater than or equal to 80." So, for example, if John D. logged in
    the table would look like:
    Subject 1 80
    If Jane D logged in, her displayed dynamic table would look
    like:
    Subject 1 90
    Subject 2 85
    So, I want the table to show the header name (subject) and
    the grade if the grade >= 80. Any ideas on how to solve my
    dilemma would be greatly appreciated. Thank you in advance.

    Thank you for the reply. I was thinking about doing the
    separate table idea, but there are something like 50 subjects, and
    I already have the rest of the site built around my current table
    structure. I think it would be more trouble than it's worth to
    change everything. I'm rather new to PHP, so if you don't mind
    helping out, how would I setup the code to say "ok, here's a query
    with every subject and name, now pull only the subjects with a
    score >= 80 for person A (generated by a URL variable)?" What
    I'm envisioning is a repeating table with Subject (if >=80) on
    the left, and the actual score on the right. The query I'm using to
    pull the scores for the logged in person is
    SELECT Name, Subject 1, Subject 2...
    FROM Grades
    WHERE Name = colname
    colname = $_GET['Name'] (my url variable)
    This works just fine to pull ll grades for all subjects for
    just the person who logged in. I'm not sure how passed this point
    to a) filter the subjects by a value, and b) list those subjects
    and grades in a vertical repeating table. Thank you again for your
    help.

  • Page breaks with dynamic table

    Hi there!
    We've built a LiveCycle process in which we get data from an XML file and generate the PDF in LC Output.
    However, although the items are being correctly generated in the table, only the first 20 or so records are being included, generatin just one page.
    There are around 200 records in the XML - we just can't find how to set up the XDP in LC Designer so that we get a multipages PDF containing all 200 records instead of just 20.
    We are using a dynamic table with the following set up:
    Pagination: Following Previous
    In Binding tab, we checked Repeat Row for Each Data Item
    This table was inserted using the Insert Table option in main menu, using the wizard and it's inserted in a subform.
    All these setup options were applied to the table row element.
    Any ideas?
    Thank you!
    Marcos

    Hi Niall,
    Thank you for the input!
    However, there's something else we're missing here.
    After I tried your suggestion there were actually page breaks... we got 4 pages. However, only one of them had any content (the dynamic table with 30 records) and the other three were blank. The XML that populates the table includes 200 records.
    We're pulling our hair off here, trying to do this for days!...
    BR,
    Marcos

  • How to add a dynamic table to a Crystal ReportViewer?

    Hi All,
    I'm trying to create my first crystal report, but I want to create the data dynamically. I want to create my table on the fly then, just dump the table into the crystal report.
    1. I'm not sure how to setup the fieldnames in the report to point to my dynamic table.
    2. How do I add the columns name in my dynamic table to my report?
            DataTable m_tExample = new DataTable();
            // Add Column Names
            m_tExample.Columns.Add("firstname", typeof (string));
            m_tExample.Columns.Add("lastname", typeof( string));
            // Add Test Data
            m_tExample.Rows.Add("MT","Long");
            m_tExample.Rows.Add("D", "Chiat");
            m_tExample.Rows.Add("Matdt", "Sdmith");
            m_tExample.Rows.Add("Kevin", "Cloley");
            m_tExample.Rows.Add("Maitt", "Diurkee");
            m_tExample.Rows.Add("Paam", "Duurkee");
            m_tExample.Rows.Add("William", "Never");
            m_tExample.Rows.Add("Tang", "Hong");
            m_tExample.Rows.Add("Mike", "Lopez");
            m_tExample.Rows.Add("Bill", "Chao");
            m_tExample.Rows.Add("Az", "Mattizra");
            m_tExample.Rows.Add("Raja", "Crash");
            m_tExample.Rows.Add("Jimmy", "Compton");
            m_tExample.Rows.Add("Ray", "Johnson");
            m_tExample.Rows.Add("Janice", "Howard");
            m_tExample.Rows.Add("Tony", "Scott");
        // Add DataSet to Viewer?
            CrystalReportViewer1.ReportSource = m_tExample.DataSet;
            CrystalReportViewer1.DataBind();
    NOTE: When I'm in the designer, I only see a text object to place in the report detail for a fieldname.
    VS 2005, Crystal Report 2008
    Thanks.

    Hello,
    Once you get the Data Set create save it as XML and then create a new report off the XML file. Then you can set the data set to the report and the XML is not required any more.
    First, to be able add fields to a report you need to use RAS. Report.Engine doesn't have the ability.
    If you search in this forum you will find lots of examples on how to...
    If you want to create the report then see these RAS samples:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Don

  • Dynamic table driven menus

    Using jsf/adf bc I've been studying the 'dynamic' menu setup in the srdemo and have a decent understanding of how that works in a declarative way. However, that example assumes the menu items and their properties will be 'hard coded' into the faces-config. I have menu items and their properties (label, outcome, etc) stored in a table and I want to get rows from this table and essentially create an object of the MenuItem class for each row in the Menu table. I understand how to do this step programmatically. I'm left wondering then how to create the instance of MenuTreeModelAdapter and add each of these MenuItem instances to it and further how to create the instance of MenuModelAdapter and add the instance of MenuTreeModelAdapter to it?? Will this need to be a totally programmatic thing, or am i going to still be using some of the entries in the faces-config.xml? Thanks for any help on this.

    John, thanks for the reply. I did search first and didn't come up with anything. I took a look at the example from the link you gave me. It didn't provide a lot of help, but I think I've got something I can use for my purposes. My application menu will have two levels, a menu and submenu. Therefore, there exists two db tables to hold info for each menu level. The submenu table rows are children of the menu rows and so are related by fk. In my application, I just created master/detail view objects and link to retrieve all menu items along with their submenu items. I then iterate thru the rows programmatically and populate the menu model that way. Initially, it seems to be working. I'll post that code in case it might help someone else:
    public void buildMenuItems(){
    ViewObjectImpl menuVO = getTopLevelMenu();
    //iterate thru menu records
    menuVO.executeQuery();
    Row menuItemRow = null;
    List menuItemsList = new ArrayList();
    List submenuItemsList = new ArrayList();;
    while(menuVO.hasNext()){
    menuItemRow = menuVO.next();
    //convert the menu row into an instance of a MenuItem object.
    MenuItem menuItem = new MenuItem();
    menuItem.setLabel((String)menuItemRow.getAttribute("MenuLabel"));
    menuItem.setOutcome((String)menuItemRow.getAttribute("NavigationOutcome"));
    menuItem.setViewId((String)menuItemRow.getAttribute("ViewId"));
    RowSet sublevelMenuRows = (RowSet)menuItemRow.getAttribute("SublevelMenus");
    while(sublevelMenuRows.hasNext()){
    Row sublevelMenurow = sublevelMenuRows.next();
    MenuItem sublevelMenuItem = new MenuItem();
    sublevelMenuItem.setLabel((String)sublevelMenurow.getAttribute("SubmenuLabel"));
    sublevelMenuItem.setOutcome((String)sublevelMenurow.getAttribute("NavigationOutcome"));
    sublevelMenuItem.setViewId((String)sublevelMenurow.getAttribute("ViewId"));
    submenuItemsList.add(sublevelMenuItem);
    //if there were any sublevel menu items (children), add them to that menu item instance.
    if(submenuItemsList.size() > 0){
    //i'm basically making a copy of the submenu item list here so i can pass that to the setChildren method
    //of the MenuItem object. Then i'm safe to clear() the original list so it can be used again. Without using
    //a copy of the list to pass in, a subsequent call to clear() on that same list actually removes the children
    //that were just placed into MenuItem from that object.
    List submenuItemsListCopy = new ArrayList(submenuItemsList);
    menuItem.setChildren(submenuItemsListCopy);
    submenuItemsList.clear();
    //add the MenuItem instance to a list.
    menuItemsList.add(menuItem);
    MenuTreeModelAdapter treeModelAdapter = new MenuTreeModelAdapter();
    treeModelAdapter.setListInstance(menuItemsList);
    treeModelAdapter.setChildProperty("children");
    MenuModelAdapter modelAdapter = new MenuModelAdapter();
    modelAdapter.setViewIdProperty("viewId");
    try{
    modelAdapter.setInstance(treeModelAdapter.getModel());
    }catch(IntrospectionException ex){
    //do nothing here...
    FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("menuModel", modelAdapter);
    }

  • Dynamic table offline scenario

    Hi,
    I have the following scenario. An empty pdf document with some inputfields and 1 dynamic table should be filled by the customer. Initially the inputfields are all empty as well as the table where a button to add rows is foreseen. When the document is send via mail to sap (so no web dynpro is involved), I'll try to capture the data. For the input fields this is no problem, however i'm not able to capture the data from the table.
    Using <<node = document->find_from_name('TABLE')>>, i get an empty node. I think it has something to do with the setup of the table ,more specific with the option 'repeat table for each data item'. As i said earlier, i've created my form in sfp, no webdynpro involved...
    I've done it like this:
    TABLE (uncheck repeat table for each...)
      ROW (check repeat row for each data item, check min 1, uncheck max)
    Or has the above nothing to do with this bug... What have i done wrong?
    thx in advance
    regards

    Thanks Sandra, that was a very helpful hint.
    I was looking for "TABLE" because my element was named like that in the hierarchy. This element was referring to IT_TABLE in context, so of course i had to look for this. Afterwards it sounds very logic.

  • Error while insert data using execute immediate in dynamic table in oracle

    Error while insert data using execute immediate in dynamic table created in oracle 11g .
    first the dynamic nested table (op_sample) was created using the executed immediate...
    object is
    CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
    mark1 number,
    mark2 number
    t_sub_mark is a class of type sub_mark
    CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
    create table sam1(id number,name varchar2(30));
    nested table is created below:
    begin
    EXECUTE IMMEDIATE ' create table '||op_sample||'
    (id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
    end;
    now data from sam1 table and object (subject_obj) are inserted into the dynamic table
    declare
    subject_obj t_sub_mark;
    begin
    subject_obj:= t_sub_mark();
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
    end;
    and got the below error:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7
    then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
    execute immediate 'insert into '||dynam_table ||'
    (SELECT

    887684 wrote:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
    If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.

  • HR Logical database PNP. OO to fill table dynamic table  from PNP  ?

    Hi all
    I want to get some stuff from the HR logical database into a dynamic table
    Here's a real simple example that writes info out to a normal list.
    (report is based on using Logical DB PNP)
    tables: pernr.
    INFOTYPES: 0001,                     "Organizational Assignment
               0002.                     "Personal Data
    SELECT-OPTIONS: language FOR p0002-sprsl.
    INITIALIZATION.
      pnptimed = 'D'.
    GET pernr.
      PROVIDE * FROM p0002 BETWEEN pn-begda AND pn-endda.
        CHECK language.
        WRITE: / p0002-pernr,
                 sy-vline,
                 p0001-ename,
                 sy-vline,
                 p0002-sprsl,
                 sy-vline,
                 p0002-gbdat.
      ENDPROVIDE.
    endform.
    Now what I want to do is replace the write stuff by appending the entries into a dynamic table which I will display as an ALV Grid.
    so I add my structure in the data declarations
    types:  begin of s_elements,
       pernr  type  p0002-pernr,
       ename  type p0001-ename,
       sprsl  type p0002-sprsl,
       gbdat   type p0002-gbdat.
      drop_down_handle  type int4.
    types: end of    s_elements.
    include zz_jimbo_incl.
    build the dynamic table
    create data dref type s_elements.
      assign dref->* to <fs>.
      i_routine = 'POPULATE_DYNAMIC_ITAB'.*
    i_names   = 'NAME_COLUMNS'.
      i_gridtitle = 'HR  TEST'.
    invoker = sy-repid.
    i_zebra = 'X '.
    i_edit = '  '.
    call function 'ZZ_CALL_SCREEN'
         exporting
              invoker     = invoker
              my_line     = <fs>
              i_gridtitle = i_gridtitle
              i_edit      = i_edit
              i_zebra     = i_zebra
              i_names     = i_names
              i_routine   = i_routine
         importing
              z_object    = z_object
              dy_table    = dy_table.
    Now to populate the dynamic Itab the routine below is entered.
    form populate_dynamic_itab changing dy_table.
      assign dy_table->* to <dyn_table>.
      create data dy_line like line of <dyn_table>.
      assign dy_line->* to <dyn_wa>.
    However I can't use GET / PROVIDE / ENDPROVIDE in a Form.
    Anyway round this ---seems HR has an aversion to OO.
    Cheers
    jimbo

    Hi,
    well, GET_PERNR is a so called event_statement. It has nothing to do with ABAP 00.
    Normally it will be like this:
    START-OF-SELECTION.
    GET_PERNR.
    PROVIDE ....
    END-OF-SELECTION.
    -> and here the CALL SCREEN NNNN for ALV-Display.
    Provide-statements you can use in forms of course, and as many times you want during GET and END-OF-SELECTION.
    But as I understood : you just want to save the write-statements?
    I always develop a DDIC-Structure, declarate the data objects in the programm, read the data via Provide into the infotypes, and then make a move-corresponding to my structure. and display it.
    Normally no problem.
    kind regards
    maik

  • Regarding dynamic tables in interactive forms

    Hi All,
            I have designed a webdynpro view which contains a table,i have to generate a pdf format file which also contains
    a table as there in the webdynpro view.
            I  have designed a dynamic table in interactive form and binded the interactive form ui element with the datasource and pdfSource.
    In the interactive form i am getting only one row data of webdynpro view table.In the Object palette, I selected Repeat Row For Each Data Item.
           share with me if u have any idea or send any document regarding table binding(dynamic) in interactive form.
    Thanks & Regards,
    saleem

    Hi saleem..
    Check this link..
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0401535-f81c-2a10-0192-ffd41e8e8d59">Dynamic interactive forms an example</a>
    https://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#47
    Urs Gs

  • Use the value of a field as column-name of a dynamic table

    Hi All
    I have the following situation:
    a) Internal table TB_ORDER_CONDITION ==>  data: tb_order_condition type standard table of bapicond.
         sample of the internal table TB_ORDER_CONDITION:
    CONT_TYPE # CONDVALUE# CONDBASEVAL  
        ZR00         #    38.800000#  1.000000
        ZR30         #    2.800000  #  0.000000
        SKTO        #    0.000000  #  57.8500000
    b) dynamic-table  <L_TABLE_II> has the following columns:
    ZR00#ZR30#ICM3#IPS2  SKTO  
    c) I would like to move as below:
    ZR00#ZR30# ICM3#IPS2# SKTO 
    38.800000#2.800000#57.8500000
    Observation:
    I used this symbol just to show the separationfrom one column from another.
    Items a) and b) are OK. The problem is that I don't know how to make this move as showed in item c).
    Could you please advise?
    Thanks in advance.
    Gaia

    Hello,
    Check the code snippet below:
    FIELD-SYMBOLS: <wa_order_creation>  TYPE bapicond,
                   <l_table_ii>         TYPE STANDARD TABLE,
                   <l_wa_ii>            TYPE ANY,
                   <l_fieldval>         TYPE ANY.
    SORT tb_order_condition BY itm_number. "Sort by Item Number
    LOOP AT tb_order_condition ASSIGNING <wa_order_creation>.
    * Add a record to the dynamic table for each item
      AT NEW itm_number.
        APPEND INITIAL LINE TO <l_table_ii> ASSIGNING <l_wa_ii>.
      ENDAT.
      ASSIGN COMPONENT <wa_order_creation>-cond_type
      OF STRUCTURE <l_wa_ii> TO <l_fieldval>.
      IF sy-subrc = 0.
        <l_fieldval> = <wa_order_creation>-cond_value.
      ENDIF.
    ENDLOOP.
    BR,
    Suhas

  • Why dynamic table creation with struts working only for JDK1.3.1_02 version

    Row
    import java.util.Vector;
    public class Row
    private static int colsize;
    private Column[] columns;
    public void setColumns(Column[] columns)
    System.out.println("SetColumns");
    this.columns = columns;
    public void setColumn(int i, Column column)
         System.out.println("setting"+ i+"th column"+column);
    public Column[] getColumns()
    return null;
    public Column getColumns(int i)
    System.out.println("Column"+i);
    System.out.println("Colsize"+colsize);
    if(columns == null)
    columns= new Column[colsize];
    if(columns[i] == null)
    columns[i] = new Column();
    return columns;
    public int getColsize()
         return colsize;
    public static void setColsize(int size)
         colsize = size;
    Column:
    public class Column
    private String value;
    public void setValue(String value)
    System.out.println("Value="+value);
    this.value = value;
    public String getValue()
    return value;
    ApplicationResources:
    button.cancel=Cancel
    button.confirm=Confirm
    button.reset=Reset
    button.save=Save
    database.load=Cannot load database from {0}
    error.database.missing=<li>User database is missing, cannot validate logon credentials</li>
    error.fromAddress.format=<li>Invalid format for From Address</li>
    error.fromAddress.required=<li>From Address is required</li>
    error.fullName.required=<li>Full Name is required</li>
    error.host.required=<li>Mail Server is required</li>
    error.noSubscription=<li>No Subscription bean in user session</li>
    error.password.required=<li>Password is required</li>
    error.password2.required=<li>Confirmation password is required</li>
    error.password.match=<li>Password and confirmation password must match</li>
    error.password.mismatch=<li>Invalid username and/or password, please try again</li>
    error.replyToAddress.format=<li>Invalid format for Reply To Address</li>
    error.transaction.token=<li>Cannot submit this form out of order</li>
    error.type.invalid=<li>Server Type must be 'imap' or 'pop3'</li>
    error.type.required=<li>Server Type is required</li>
    error.username.required=<li>Username is required</li>
    error.username.unique=<li>That username is already in use - please select another</li>
    errors.footer=</ul><hr>
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    errors.ioException=I/O exception rendering error messages: {0}
    heading.autoConnect=Auto
    heading.subscriptions=Current Subscriptions
    heading.host=Host Name
    heading.user=User Name
    heading.type=Server Type
    heading.action=Action
    index.heading=MailReader Demonstration Application Options
    index.logon=Log on to the MailReader Demonstration Application
    index.registration=Register with the MailReader Demonstration Application
    index.title=MailReader Demonstration Application (Struts 1.0-b1)
    index.tour=A Walking Tour of the Example Application
    linkSubscription.io=I/O Error: {0}
    linkSubscription.noSubscription=No subscription under attribute {0}
    linkUser.io=I/O Error: {0}
    linkUser.noUser=No user under attribute {0}
    logon.title=MailReader Demonstration Application - Logon
    mainMenu.heading=Main Menu Options for
    mainMenu.logoff=Log off MailReader Demonstration Application
    mainMenu.registration=Edit your user registration profile
    mainMenu.title=MailReader Demonstration Application - Main Menu
    option.imap=IMAP Protocol
    option.pop3=POP3 Protocol
    prompt.autoConnect=Auto Connect:
    prompt.fromAddress=From Address:
    prompt.fullName=Full Name:
    prompt.mailHostname=Mail Server:
    prompt.mailPassword=Mail Password:
    prompt.mailServerType=Server Type:
    prompt.mailUsername=Mail Username:
    prompt.password=Password:
    prompt.password2=(Repeat) Password:
    prompt.replyToAddress=Reply To Address:
    prompt.username=Username:
    registration.addSubscription=Add
    registration.deleteSubscription=Delete
    registration.editSubscription=Edit
    registration.title.create=Register for the MailReader Demostration Application
    registration.title.edit=Edit Registration for the MailReader Demonstration Application
    subscription.title.create=Create New Mail Subscription
    subscription.title.delete=Delete Existing Mail Subscription
    subscription.title.edit=Edit Existing Mail Subscription
    LogonForm
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class LogonForm extends ActionForm
    private String username;
    private String password;
    private String errors;
    public String getUsername()
    return username;
    public void setUsername(String username)
    this.username = username;
    public void setPassword(String password)
    this.password = password;
    public String getPassword()
    return password;
    public String getErrors()
         return errors;
    public void setErrors(String errors)
         this.errors = errors;
    public ActionErrors validate(ActionMapping mapping,
    HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    if ((username == null) || (username.length() < 1))
    errors.add("username", new ActionError("error.username.required"));
    if ((password == null) || (password.length() < 1))
    errors.add("password", new ActionError("error.password.required"));
    return errors;
    TableForm
    import org.apache.struts.action.ActionForm;
    import java.util.Vector;
    public class TableForm extends ActionForm
    private static int rowsize;
    private Row[] rows;
    public Row getRows(int i)
    System.out.println("Row"+i);
    System.out.println("Rowsize"+rowsize);
    if(rows == null)
    rows = new Row[rowsize];
    if(rows[i] == null)
    rows[i] = new Row();
    return rows[i];
    public Row[] getRows()
         return null;
    public void setRows(Row[] rows)
         System.out.println("SetRows");
         // this.rows=rows;
    public static void setRowsize(int size)
         rowsize = size;
    public int getRowSize()
         return rowsize;
    LogonAction
    import java.io.IOException;
    import java.util.Hashtable;
    import java.util.Locale;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionServlet;
    import org.apache.struts.util.MessageResources;
    public class LogonAction extends Action
    public ActionForward execute(ActionMapping mapping,
                        ActionForm form,
                        HttpServletRequest request,
                        HttpServletResponse response)
         throws IOException, ServletException {
    LogonForm logonForm = (LogonForm) form;
    System.out.println(logonForm);
    System.out.println(logonForm.getUsername());
    System.out.println(logonForm.getPassword());
    if(logonForm.getUsername().equals("test") && logonForm.getPassword().equals("test"))
    //TableForm tform = new TableForm();
    //tform.setRowsize(2);
    //tform.getRows(0).setColsize(2);
    //tform.getRows(1).setColsize(2);
    //request.getSession().setAttribute("tableForm",tform);
         System.out.println("Table Form setRowSize");
    TableForm.setRowsize(2);
         System.out.println("Table Form set ColSize");
    Row.setColsize(2);
         System.out.println("Returning success");
    return mapping.findForward("success");
    else
              ActionErrors errors = new ActionErrors();
              errors.add("password",
    new ActionError("error.password.mismatch"));
    saveErrors(request, errors);
    //logonForm.setErrors("LoginError");
    return mapping.findForward("failure");
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
    <!--
    This is the Struts configuration file for the example application,
    using the proposed new syntax.
    NOTE: You would only flesh out the details in the "form-bean"
    declarations if you had a generator tool that used them to create
    the corresponding Java classes for you. Otherwise, you would
    need only the "form-bean" element itself, with the corresponding
    "name" and "type" attributes.
    -->
    <struts-config>
    <form-beans>
    <!-- Logon form bean -->
    <form-bean name="logonForm"
    type="LogonForm"/>
    <form-bean name="tableForm"
    type="TableForm"/>
    <form-bean name="profileForm"
    type="ProfileForm"/>
    </form-beans>
    <global-forwards>
    <forward name="success" path="/Profile.jsp"/>
    </global-forwards>
    <!-- ========== Action Mapping Definitions ============================== -->
    <action-mappings>
    <!-- Edit user registration -->
    <action path="/logon"
    type="LogonAction"
    name="logonForm"
    scope="request"
    validate="false"
    input="/Test.jsp">
    <forward name="success" path="/Table.jsp"/>
    <forward name="failure" path="/Test.jsp"/>
    </action>
    <action path="/table"
    type="TableAction"
    name="tableForm"
    scope="request"
    validate="false">
    <forward name="success" path="/Bean.jsp"/>
    <forward name="failure" path="/Table.jsp"/>
    </action>
    <action path="/profile"
    type="ProfileAction"
    name="profileForm"
    scope="request"
    validate="false"
    parameter="method">
    <forward name="edit" path="/EditProfile.jsp"/>
    <forward name="show" path="/Profile.jsp"/>
    </action>
    </action-mappings>
    </struts-config>
    Test.jsp
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html locale="true">
    <html:form action="/logon" >
    <center>
    <table>
    <tr>
    <td> Username </td>
    <td> <html:text property="username" size="16" maxlength="16"/> </td>
    <td> <html:errors property="username" /> </td>
    </tr>
    <tr>
    <td> Password </td>
    <td> <html:password property="password" size="16" maxlength="16"
    redisplay="false"/> </td>
    <td><html:errors property="password" /> </td>
    </tr>
    </table>
    </center>
    <center> <html:submit property="submit" value="Submit"/> </center>
    </html:form>
    </html:html>
    Table.jsp
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html locale="true">
    <html:form action="/table" >
    <center>
    <table>
    <tr>
    <td> <html:text property="rows[0].columns[0].value" /> </td>
    <td> <html:text property="rows[0].columns[1].value" /></td>
    </tr>
    <tr>
    <td> <html:text property="rows[1].columns[0].value" /> </td>
    <td> <html:text property="rows[1].columns[1].value" /></td>
    </tr>
    </table>
    </center>
    <center> <html:submit property="submit" value="Submit"/> </center>
    </html:form>
    </html:html>

    The above application runs only with JDK1.3.1_02 and not with any other version. This application is creating dynamic table using struts.
    Can anybody help me on the same
    also appending web.xml contents:
    <?xml version="1.0" ?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <!-- Action Servlet Configuration -->
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>application</param-name>
    <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!--Welcome file list starts here -->
    <welcome-file-list>
    <welcome-file>
    /test.jsp
    </welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    </web-app>
    validate-rules.xml
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
    This file contains the default Struts Validator pluggable validator
    definitions. It should be placed somewhere under /WEB-INF and
    referenced in the struts-config.xml under the plug-in element
    for the ValidatorPlugIn.
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    These are the default error messages associated with
    each validator defined in this file. They should be
    added to your projects ApplicationResources.properties
    file or you can associate new ones by modifying the
    pluggable validators msg attributes in this file.
    # Struts Validator Error Messages
    errors.required={0} is required.
    errors.minlength={0} can not be less than {1} characters.
    errors.maxlength={0} can not be greater than {1} characters.
    errors.invalid={0} is invalid.
    errors.byte={0} must be a byte.
    errors.short={0} must be a short.
    errors.integer={0} must be an integer.
    errors.long={0} must be a long.
    errors.float={0} must be a float.
    errors.double={0} must be a double.
    errors.date={0} is not a date.
    errors.range={0} is not in the range {1} through {2}.
    errors.creditcard={0} is an invalid credit card number.
    errors.email={0} is an invalid e-mail address.
    -->
    <form-validation>
    <global>
    <validator name="required"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequired"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    <javascript><![CDATA[
    function validateRequired(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oRequired = new required();
    for (x in oRequired) {
         var field = form[oRequired[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'file' ||
    field.type == 'select-one' ||
    field.type == 'radio' ||
    field.type == 'password') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (trim(value).length == 0) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oRequired[x][1];
         isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    // Trim whitespace from left and right sides of s.
    function trim(s) {
    return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
    ]]>
    </javascript>
    </validator>
    <validator name="requiredif"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequiredIf"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    org.apache.commons.validator.Validator,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    </validator>
    <validator name="minlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMinLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.minlength">
    <javascript><![CDATA[
    function validateMinLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMinLength = new minlength();
    for (x in oMinLength) {
    var field = form[oMinLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMin = parseInt(oMinLength[x][2]("minlength"));
    if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMinLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="maxlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMaxLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.maxlength">
    <javascript><![CDATA[
    function validateMaxLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMaxLength = new maxlength();
    for (x in oMaxLength) {
    var field = form[oMaxLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMax = parseInt(oMaxLength[x][2]("maxlength"));
    if (field.value.length > iMax) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMaxLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="mask"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMask"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.invalid">
    <javascript><![CDATA[
    function validateMask(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMasked = new mask();
    for (x in oMasked) {
    var field = form[oMasked[x][0]];
    if ((field.type == 'text' ||
    field.type == 'textarea') &&
    (field.value.length > 0)) {
    if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMasked[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    function matchPattern(value, mask) {
    return mask.exec(value);
    }]]>
    </javascript>
    </validator>
    <validator name="byte"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateByte"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.byte"
    jsFunctionName="ByteValidations">
    <javascript><![CDATA[
    function validateByte(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oByte = new ByteValidations();
    for (x in oByte) {
         var field = form[oByte[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
                                  field.type == 'radio') {
                                  var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oByte[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oByte[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="short"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateShort"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.short"
    jsFunctionName="ShortValidations">
    <javascript><![CDATA[
    function validateShort(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oShort = new ShortValidations();
    for (x in oShort) {
         var field = form[oShort[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oShort[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oShort[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="integer"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateInteger"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.integer"
    jsFunctionName="IntegerValidations">
    <javascript><![CDATA[
    function validateInteger(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oInteger = new IntegerValidations();
    for (x in oInteger) {
         var field = form[oInteger[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                  if (si >= 0) {
                                       value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
         focusField = field;
                                  fields[i++] = oInteger[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oInteger[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    function isAllDigits(argvalue) {
    argvalue = argvalue.toString();
    var validChars = "0123456789";
    var startFrom = 0;
    if (argvalue.substring(0, 2) == "0x") {
    validChars = "0123456789abcdefABCDEF";
    startFrom = 2;
    } else if (argvalue.charAt(0) == "0") {
    validChars = "01234567";
    startFrom = 1;
    } else if (argvalue.charAt(0) == "-") {
    startFrom = 1;
    for (var n = startFrom; n < argvalue.length; n++) {
    if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
    return true;
    }]]>
    </javascript>
    </validator>
    <validator name="long"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateLong"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.long"/>
    <validator name="float"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateFloat"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.float"
    jsFunctionName="FloatValidations">
    <javascript><![CDATA[
    function validateFloat(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oFloat = new FloatValidations();
    for (x in oFloat) {
         var field = form[oFloat[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
         var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                       value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    // remove '.' before checking digits
    var tempArray = value.split('.');
    var joinedString= tempArray.join('');
    if (!isAllDigits(joinedString)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oFloat[x][1];
    } else {
         var iValue = parseFloat(value);
         if (isNaN(iValue)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oFloat[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="double"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDouble"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.double"/>
    <validator name="date"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDate"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.date"
    jsFunctionName="DateValidations">
    <javascript><![CDATA[
    function validateDate(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oDate = new DateValidations();
    for (x in oDate) {
    var value = form[oDate[x][0]].value;
    var datePattern = oDate[x][2]("datePatternStrict");
    if ((form[oDate[x][0]].type == 'text' ||
    form[oDate[x][0]].type == 'textarea') &&
    (value.length > 0) &&
    (datePattern.length > 0)) {
    var MONTH = "MM";
    var DAY = "dd";
    var YEAR = "yyyy";
    var orderMonth = datePattern.indexOf(MONTH);
    var orderDay = datePattern.indexOf(DAY);
    var orderYear = datePattern.indexOf(YEAR);
    if ((orderDay < orderYear && orderDay > orderMonth)) {
    var iDelim1 = orderMonth + MONTH.length;
    var iDelim2 = orderDay + DAY.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderDay && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderDay) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[2], matched[1], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
    var iDelim1 = orderDay + DAY.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[1], matched[2], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
    var iDelim1 = orderYear + YEAR.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderDay) {
    dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
    } else if (iDelim2 == orderDay) {
    dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
    } else {
    dateRegexp = new Reg

  • Sum of Values from previous rows in a dynamic table

    Hello,
    I have a dynamic table has multiple rows (added dynamically via a button).  One column in the table is a Quantity column.  Another is a Total column.  We do not want to keep a running total, but only wish to display a total when the rest of the cells in that row are emty and the previous row(s) has/have values in the Quantity column.  The Total is the sum on the Quatnities up to a blank row.  Below is a sample.  How do I get teh value of the Quantities in the previous rows?
    Quantity
    Total
    5
    8
    12
    25
    7
    27
    34
    22
    22
    Another option might be to put the Total in the last row with data as opposed to the row below the data.
    Any ideas?
    Regards,
    Karl

    The script is written to achive your requirement (i.e. the second approach you have mentioned)
    You can either contact me at [email protected] to get the sample form created.
    Or the following is the XML Source of the form. Copy the entire content in XML source view of your form and see the result.
    <?xml version="1.0" encoding="UTF-8"?>
    <?xfa generator="AdobeLiveCycleDesignerES_V9.0.0.0.20091029.1.612548" APIVersion="3.1.9277.0"?>
    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2012-02-28T14:04:54Z" uuid="2c561cdf-3377-4e84-9a89-51e740bb2fea">
    <template xmlns="http://www.xfa.org/schema/xfa-template/2.8/">
    <?formServer defaultPDFRenderFormat acrobat9.0dynamic?>
    <subform name="form1" layout="tb" locale="en_US" restoreState="auto">
    <pageSet>
    <pageArea name="Page1" id="Page1">
    <contentArea x="0.25in" y="0.25in" w="197.3mm" h="284.3mm"/>
    <medium stock="a4" short="210mm" long="297mm"/>
    <?templateDesigner expand 1?></pageArea>
    <?templateDesigner expand 1?></pageSet>
    <subform w="197.3mm" layout="tb">
    <subform name="Subform1" w="190.5mm" h="25.4mm">
    <field name="Button1" y="15.875mm" x="60.325mm" w="28.575mm" h="6mm">
    <ui>
    <button highlight="inverted"/>
    </ui>
    <font typeface="Myriad Pro"/>
    <caption>
    <value>
    <text>Add Row</text>
    </value>
    <para vAlign="middle" hAlign="center"/>
    </caption>
    <border hand="right">
    <?templateDesigner StyleID apbx2?>
    <edge stroke="raised"/>
    <fill/>
    </border>
    <bind match="none"/>
    <event activity="click" name="event__click">
    <script contentType="application/x-javascript">
    try
    Subform2.Table1._Row1.addInstance(1);
    //for(var i=0;i&lt;Subform2.Table1._Row1.count;i++)
    //xfa.resolveNode("Subform2.Table1.Row1["+i+"].Total").execEvent("exit");
    }catch(e)
    app.alert(e)
    </script>
    </event>
    </field>
    <?templateDesigner expand 1?></subform>
    <subform name="Subform2" w="196.85mm">
    <subform name="Table1" layout="table" columnWidths="55.916mm 44.47mm" x="38.1mm" y="12.7mm">
    <border>
    <edge/>
    </border>
    <subform layout="row" name="HeaderRow" id="HeaderRow_ID">
    <assist role="TH"/>
    <draw h="10mm" name="Cell1">
    <border>
    <edge/>
    <corner thickness="0.1778mm"/>
    </border>
    <ui>
    <textEdit/>
    </ui>
    <value>
    <text>Quantity</text>
    </value>
    <font typeface="Myriad Pro"/>
    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
    <para vAlign="middle" hAlign="center"/>
    </draw>
    <draw h="10mm" name="Cell2">
    <border>
    <edge/>
    <corner thickness="0.1778mm"/>
    </border>
    <ui>
    <textEdit/>
    </ui>
    <value>
    <text>Total</text>
    </value>
    <font typeface="Myriad Pro"/>
    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
    <para vAlign="middle" hAlign="center"/>
    </draw>
    <border>
    <edge presence="hidden"/>
    </border>
    <occur max="-1"/>
    <?templateDesigner expand 1?></subform>
    <subform layout="row" name="Row1">
    <assist role="TR"/>
    <field name="Quantity" w="55.916mm" h="9.317mm">
    <ui>
    <numericEdit>
    <border presence="hidden">
    <?templateDesigner StyleID aped0?></border>
    <margin/>
    </numericEdit>
    </ui
    ><
    font typeface="Myriad Pro"/><
    margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/><
    para vAlign="middle"/><
    border><
    edge/><
    corner thickness="0.1778mm"/></
    border></
    field><
    field name="Total" w="44.47mm" h="9.317mm" access="readOnly"><
    ui><
    numericEdit><
    border presence="hidden"> 
    <?templateDesigner StyleID aped0?>
    </border><
    margin/></
    numericEdit></
    ui><
    font typeface="Myriad Pro"/><
    margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/><para vAlign="middle"/>
    <border>
    <edge/>
    <corner thickness="0.1778mm"/>
    </border>
    <calculate>
    <script contentType="application/x-javascript">
    try
    var nextRow = xfa.resolveNode("Subform2.Table1.Row1["+(this.parent.instanceIndex+1)+"]"); // Next row of the table
    if((nextRow==null || nextRow.Quantity.rawValue == null || nextRow.Quantity.rawValue=="") &amp;&amp; Quantity.rawValue!=null) // If there is no more rows OR the next row don't contain any Quantity value
    var subTotal = 0;
    for(var j=this.parent.instanceIndex;j&gt;=0;j--) // Loop until the previous row has empty value OR reach start of row Index (i.e. 0)
    var prevObj = xfa.resolveNode("Subform2.Table1.Row1["+j+"].Quantity"); // locate the previous row's Quantity object
    if(prevObj.rawValue == null || prevObj.rawValue=="")
    break; // if blank value found, skip the loop
    subTotal+= prevObj.rawValue;
    this.rawValue = subTotal; // Update the Total value
    }else
    this.rawValue = null; // Clear the total value
    }catch(e)
    app.alert(e)
    </script>
    </calculate>
    </field>
    <border>
    <edge presence="hidden"/>
    </border>
    <occur max="-1"/>
    <?templateDesigner expand 1?></subform>
    <keep intact="contentArea"/>
    <?templateDesigner rowpattern first:1, next:1, firstcolor:f0f0f0, nextcolor:ffffff, apply:0?>
    <overflow leader="HeaderRow"/>
    <?templateDesigner expand 1?></subform>
    <?templateDesigner expand 1?></subform>
    <?templateDesigner expand 1?></subform>
    <proto/>
    <desc>
    <text name="version">9.0.0.0.20091029.1.612548.606130</text>
    </desc>
    <?templateDesigner expand 1?></subform>
    <?templateDesigner DefaultPreviewDynamic 1?>
    <?templateDesigner DefaultRunAt client?>
    <?templateDesigner Grid show:1, snap:1, units:0, color:ff8080, origin:(0,0), interval:(125000,125000)?>
    <?templateDesigner FormTargetVersion 28?>
    <?templateDesigner DefaultLanguage JavaScript?>
    <?acrobat JavaScript strictScoping?>
    <?templateDesigner Zoom 62?>
    <?templateDesigner Rulers horizontal:1, vertical:1, guidelines:1, crosshairs:0?>
    <?templateDesigner SaveTaggedPDF 1?>
    <?templateDesigner SavePDFWithEmbeddedFonts 1?></template>
    <config xmlns="http://www.xfa.org/schema/xci/2.8/">
    <agent name="designer">
    <!-- [0..n] -->
    <destination>pdf</destination>
    <pdf>
    <!-- [0..n] -->
    <fontInfo/>
    </pdf>
    </agent>
    <present>
    <!-- [0..n] -->
    <pdf>
    <!-- [0..n] -->
    <fontInfo/>
    <version>1.7</version>
    <adobeExtensionLevel>3</adobeExtensionLevel>
    </pdf>
    <xdp>
    <packets>*</packets>
    </xdp>
    </present>
    </config>
    <localeSet xmlns="http://www.xfa.org/schema/xfa-locale-set/2.7/">
    <locale name="en_US" desc="English (United States)">
    <calendarSymbols name="gregorian">
    <monthNames>
    <month>January</month>
    <month>February</month>
    <month>March</month>
    <month>April</month>
    <month>May</month>
    <month>June</month>
    <month>July</month>
    <month>August</month>
    <month>September</month>
    <month>October</month>
    <month>November</month>
    <month>December</month>
    </monthNames>
    <monthNames abbr="1">
    <month>Jan</month>
    <month>Feb</month>
    <month>Mar</month>
    <month>Apr</month>
    <month>May</month>
    <month>Jun</month>
    <month>Jul</month>
    <month>Aug</month>
    <month>Sep</month>
    <month>Oct</month>
    <month>Nov</month>
    <month>Dec</month>
    </monthNames>
    <dayNames>
    <day>Sunday</day>
    <day>Monday</day>
    <day>Tuesday</day>
    <day>Wednesday</day>
    <day>Thursday</day>
    <day>Friday</day>
    <day>Saturday</day>
    </dayNames>
    <dayNames abbr="1">
    <day>Sun</day>
    <day>Mon</day>
    <day>Tue</day>
    <day>Wed</day>
    <day>Thu</day>
    <day>Fri</day>
    <day>Sat</day>
    </dayNames>
    <meridiemNames>
    <meridiem>AM</meridiem>
    <meridiem>PM</meridiem>
    </meridiemNames>
    <eraNames>
    <era>BC</era>
    <era>AD</era>
    </eraNames>
    </calendarSymbols>
    <datePatterns>
    <datePattern name="full">EEEE, MMMM D, YYYY</datePattern>
    <datePattern name="long">MMMM D, YYYY</datePattern>
    <datePattern name="med">MMM D, YYYY</datePattern>
    <datePattern name="short">M/D/YY</datePattern>
    </datePatterns>
    <timePatterns>
    <timePattern name="full">h:MM:SS A Z</timePattern>
    <timePattern name="long">h:MM:SS A Z</timePattern>
    <timePattern name="med">h:MM:SS A</timePattern>
    <timePattern name="short">h:MM A</timePattern>
    </timePatterns>
    <dateTimeSymbols>GyMdkHmsSEDFwWahKzZ</dateTimeSymbols>
    <numberPatterns>
    <numberPattern name="numeric">z,zz9.zzz</numberPattern>
    <numberPattern name="currency">$z,zz9.99|($z,zz9.99)</numberPattern>
    <numberPattern name="percent">z,zz9%</numberPattern>
    </numberPatterns>
    <numberSymbols>
    <numberSymbol name="decimal">.</numberSymbol>
    <numberSymbol name="grouping">,</numberSymbol>
    <numberSymbol name="percent">%</numberSymbol>
    <numberSymbol name="minus">-</numberSymbol>
    <numberSymbol name="zero">0</numberSymbol>
    </numberSymbols>
    <currencySymbols>
    <currencySymbol name="symbol">$</currencySymbol>
    <currencySymbol name="isoname">USD</currencySymbol>
    <currencySymbol name="decimal">.</currencySymbol>
    </currencySymbols>
    <typefaces>
    <typeface name="Myriad Pro"/>
    <typeface name="Minion Pro"/>
    <typeface name="Courier Std"/>
    <typeface name="Adobe Pi Std"/>
    <typeface name="Adobe Hebrew"/>
    <typeface name="Adobe Arabic"/>
    <typeface name="Adobe Thai"/>
    <typeface name="Kozuka Gothic Pro-VI M"/>
    <typeface name="Kozuka Mincho Pro-VI R"/>
    <typeface name="Adobe Ming Std L"/>
    <typeface name="Adobe Song Std L"/>
    <typeface name="Adobe Myungjo Std M"/>
    </typefaces>
    </locale>
    </localeSet>
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2.1-c043 52.398682, 2009/08/10-13:00:47 ">
    <
    rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><
    rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about=""><
    xmp:MetadataDate>2012-02-28T14:04:54Z</xmp:MetadataDate><
    xmp:CreatorTool>Adobe LiveCycle Designer ES 9.0</xmp:CreatorTool></
    rdf:Description><
    rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about=""><
    pdf:Producer>Adobe LiveCycle Designer ES 9.0</pdf:Producer></
    rdf:Description><
    rdf:Description xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" rdf:about=""><
    xmpMM:DocumentID>uuid:2c561cdf-3377-4e84-9a89-51e740bb2fea</xmpMM:DocumentID></
    rdf:Description><
    rdf:Description xmlns:desc="http://ns.adobe.com/xfa/promoted-desc/" rdf:about=""><
    desc:version rdf:parseType="Resource"><
    rdf:value>9.0.0.0.20091029.1.612548.606130</rdf:value><
    desc:ref>/template/subform[1]</desc:ref></
    desc:version></
    rdf:Description></
    rdf:RDF></
    x:xmpmeta></xdp:xdp>

  • Dynamic table - some fields of different rows in one column

    Hey guys,
    i have the following problem:
    i habe a itab with some data like:
    name | id | date | number
    pete  | 1 | 27.07 |    2
    pete  | 1 | 28.07 |    2
    pete  | 1 | 30.07 |    2
    ann   | 1 | 28.07 |    3
    ann   | 2 | 30.07 |    2
    the user can define a period of time, e.g. 28-29.07
    so my dynamic table will consist of the "hard" columns name and id and the dynamic added columns for every day:
    name | id | 28.07 | 29.07
    that's what i already have!
    so my problem is, that i have to read the data from the itab into the new dynamic table (field-symbol) like:
    name | id | 28.07 | 29.07
    pete   |  1 |    2     |    2
    ann    |  1 |    3     |    -
    i hope you can understand what i want! please give me code sample or a example report!
    many thanks in adance!
    best regards,
    ludwig

    hey Asik, you have understand what i want!
    here is my table:
    http://img181.imageshack.us/my.php?image=wh20080916113004ym8.png
    after the loop, the 4 rows should be in my field-symbol only one row (no sum)!
    but after the loop, there are to many rows! only one row is needed!
    Look at the screenshot:
    http://img185.imageshack.us/my.php?image=wh20080916113547wl0.png
    So the second row at column "tag20080801" should be initial and with the next loop, the next day "tag20080730" should be filled with the number!
    LOOP AT LT_OUT INTO LS_OUT.
      ASSIGN COMPONENT 'RESSOURCEN' OF STRUCTURE <FS_LINE> TO <fs_field>.
      <fs_field> = 'Ressource'.
      ASSIGN COMPONENT 'NAME' OF STRUCTURE <FS_LINE> TO <fs_field>.
      <fs_field> = LS_OUT-name.
      ASSIGN COMPONENT 'PROJEKT' OF STRUCTURE <FS_LINE> TO <fs_field>.
      <fs_field> = LS_OUT-PROJECTID.
      CONCATENATE 'DATE' LS_OUT-DATE INTO LF_DATE_COL.
      ASSIGN COMPONENT LF_DATE_COL OF STRUCTURE <FS_LINE> TO <fs_field>.
      <fs_field> = LS_OUT-COUNT.
      COLLECT <FS_LINE> INTO <FS_TABLE>.
    ENDLOOP.
    the right output data should look like this:
    Ressourcen | Ludwig Heinz | 20080702LHZ  | 4 | 4 | 4 | 1

  • How to create dynamic View Object and Dynamic Table

    Dear ll
    I want to create a dynamic view object and display the output in a dynamic table on the page.
    I am using Jdeveloper 12c "Studio Edition Version 12.1.2.0.0"
    This what I did:
    1- I created a read only view object with this query "Select sysdate from dual"
    2- I added this View object to the application module
    3- I created a new method that change the query of this View object at runtime
        public void changeVoQuery(String dbViewName) {
            String sqlstm = "Select * From " + dbViewName;
            ViewObject dynamicVo = this.findViewObject("DynamicVo");
            if (dynamicVo != null) {
                dynamicVo.remove();
            dynamicVo = this.createViewObjectFromQueryStmt("DynamicVo", sqlstm);
            dynamicVo.executeQuery();
    4- I run the application module for testing the method and I passed "Scott.Emp" as a parameter and the result was Success
    5- Now I want to show the result of the view on the page, so I draged and dropped the method from the data control as a parameter form
    6- I dragged and dropped the view Object "DynamicVo" as a table and I choose "generate Column Dynamically at runtime". This is the page source
    <af:panelHeader text="#{viewcontrollerBundle.SELECT_DOCUMTN_TYPE}" id="ph1">
            <af:panelFormLayout id="pfl1">
                <af:inputText value="#{bindings.dbViewName.inputValue}" label="#{bindings.dbViewName.hints.label}"
                              required="#{bindings.dbViewName.hints.mandatory}"
                              columns="#{bindings.dbViewName.hints.displayWidth}"
                              maximumLength="#{bindings.dbViewName.hints.precision}"
                              shortDesc="#{bindings.dbViewName.hints.tooltip}" id="it1">
                    <f:validator binding="#{bindings.dbViewName.validator}"/>
                </af:inputText>
                <af:button actionListener="#{bindings.changeVoQuery.execute}" text="changeVoQuery"
                           disabled="#{!bindings.changeVoQuery.enabled}" id="b1"/>
            </af:panelFormLayout>
        </af:panelHeader>
        <af:table value="#{bindings.DynamicVo.collectionModel}" var="row" rows="#{bindings.DynamicVo.rangeSize}"
                  emptyText="#{bindings.DynamicVo.viewable ? 'No data to display.' : 'Access Denied.'}"
                  rowBandingInterval="0" selectedRowKeys="#{bindings.DynamicVo.collectionModel.selectedRow}"
                  selectionListener="#{bindings.DynamicVo.collectionModel.makeCurrent}" rowSelection="single"
                  fetchSize="#{bindings.DynamicVo.rangeSize}" filterModel="#{bindings.DynamicVoQuery.queryDescriptor}"
                  queryListener="#{bindings.DynamicVoQuery.processQuery}" filterVisible="true" varStatus="vs" id="t1"
                  partialTriggers="::b1">
            <af:iterator id="i1" value="#{bindings.DynamicVo.attributesModel.attributes}" var="column">
                <af:column headerText="#{column.label}" sortProperty="#{column.name}" sortable="true" filterable="true"
                           id="c1">
                    <af:dynamicComponent id="d1" attributeModel="#{column}"
                                         value="#{row.bindings[column.name].inputValue}"/>
                </af:column>
            </af:iterator>
        </af:table>
    when I run the page this error is occured
    <Nov 13, 2013 2:51:58 PM AST> <Error> <oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
    Caused By: java.lang.NullPointerException
    Can any body help me please
    thanks

    Have you seen Shay's video https://blogs.oracle.com/shay/entry/adf_faces_dynamic_tags_-_for_a
    All you have to do is to use the dynamic table to get your result.
    Timo

  • Questions on: 1) Last Update; 2) Max String Length; 3) dynamic table keys

    Hi:
    - I am currently prototyping a plug-in but I have some questions:
    - 1) At the 'All Metrics' table, what is the intent of the 'Last Upload' field,
    and how is this field updated?
    - I have created some metrics but for some metrics the 'Last Upload' field
    has a timestamp but for other metrics there is no data.
    As far as I know, the metrics are similar but I do not know why the behaviour is different.
    - 2) Is there a maximum string length that the Oracle agent can accept?
    - I have a script which just returns all the environment variables into one cell.
    In emagent.trc, the Oracle agent issues the following warning:
    2009-08-27 12:38:47 Thread-76336 WARN upload: Truncating value of "STRING_VALUE" from "AGENT_HOME=
    - Is the truncation an issue?
    - 3) I have created some dynamic tables from performing an snmp walk, but the key that I use
    is the index of the SNMP table. The data is collected correctly, but I am not sure that using
    the table index as the key for OEM is a good idea because the metrics are stored according to the SNMP table index.
    Should the OEM key be the something like 'object name' instead of the index number from performing an SNMP walk ?
    For example, when I click a metric, the metric name is: Sensor Index 1.
    But should it not be something like 'Fan #1' ?
    Thanks John

    Metrics are collected at certain intervals, the Last Upload field indicates the date and time of the last time a metric collection was uploaded. The quicker the interval, the more recent that date should be. If you don't specify a CollectionItem in your default collection file for your metrics, they won't be collected or uploaded.
    If your metric column is a STRING type, it is stored in a VARCHAR2(4000)
    I'm not sure I understand your last problem... You have a table metric with a set of columns. The column you use as the key is just some tracking index which doesn't really mean anything. As long as your key column(s) make the row unique, the agent will be satisfied. If you want something more meaningful as your key, then it's something you will have to inject into your dataset if it isn't already there.

Maybe you are looking for

  • Questions on Installing SAP BPC NW 7 SP2

    Hi Friends, My company is Installing SAP BPC NW 7 SP2 and I am heading the project starting from 1st June. I have downloaded the Installation guide and still have few questions 1) On which client we deploy BPC server component, I mean on 000 or any o

  • Can I share my iPod with other devices using a USB *Switch*?

    Hello I'm trying to design a set up that will allow me to share my iPod with my PS3, Xbox 360, and G4 Powerbook. I only need to use one sharing device at a time. As of now I plan to have my 30Gb iPod Video, a USB Keyboard, and USB Mouse, running thro

  • How to add a line between the two text fields  in JTabbed Pane

    Hi Friends, I would like to add a Line between some text fields to seperate them.. I added those text Fields to a tabbed Pane.. Please help me to create a line between the TextFields......

  • How do I save changes to Transitions?

    I have searched the Forum, but can not find the answer. If I change a setting in Transitions (e.g. change the font in text scrolling) how do I make that change permanent, so that when I use that same Transition again, the 'new' font is used? Thanks f

  • OC4J 9.0.3: JAAS Compliant LoginModule support !

    Hi, I have a requirement where I need to migrate my JAAS Compliant LoginModule(implements LoginModule interface) from Weblogic to OC4J. I want to use my Custom LoginModule to perform authentication at the Web Tier and Ejb Tier and let the containers