How to create a dynamic table were the JTable columns keep varying

How to create a dynamic table were the JTable columns keep varying based on the input to the jtable

Oooh, I lied. DefaultTableModel has an API for adding and
removing columns. I didn't know that. You should have read
the API.
As for preferring to extend AbstractTableModel rather than
DefaultTableModel, I think it's more correct. DefaultTableModel
is a simple implementation of Abstract for basic cases. It isn't
intended to be extended. I figure most people extending
DefaultTableModel are also extending JFrame, JPanel, and Thread
instead of encapsulating the first two and implementing
Runnable for the third.

Similar Messages

  • How to create a temp table in the memory, not in disk?

    in sql server, you can create a temp table in the memory instead of disk,
    then you can do the insert, delete,update and select on it.
    after finishing, just release it.
    in Oracle,
    I am wonderfing how to create a temp table in the memory, not in disk?
    thanks,

    Thanks for rectifying me Howard.
    I just read your full article on this too and its very well explained here:
    http://www.dizwell.com/prod/node/357
    Few lines from your article
    It is true, of course, that since Version 8.0 Oracle has provided the ability to create a Keep Pool in the Buffer Cache, which certainly sounds like it can do the job... especially since that word 'keep' is used again. But a keep pool is merely a segregated part of the buffer cache, into which you direct blocks from particular tables (by creating them, or altering them, with the BUFFER POOL KEEP clause). So you can tuck the blocks from such tables out of the way, into their own part of the buffer cache... but that is not the same thing as guaranteeing they'll stay there. If you over-populate the Keep Pool, then its LRU mechanism will kick in and age its contents out just as efficiently as an unsegregated buffer cache would.
    Functionally, therefore, there can be no guarantees. The best you can do is create a sufficiently large Keep Pool, and then choose the tables that will use it with care such that they don’t swamp themselves, and start causing each other to age out back to disk.
    Thanks and Regards

  • How to create a Dynamic table without knowing fieldcat size

    Hi all, i'm trying to insert a (Jointer) of 3 selections form diffrent tables in an other dynamic table but i dont know the size of my final table, so i dont know how to create a fieldcatalog.
    Can we create an internal table with those caractiristics ????

    Hi,
    If you know which fields (ABAP Dictionary) you're selecting then you know their size; use the following FM call: DD_NAMETAB_TO_DDFIELDS
    Then you can use the following method to create your dynamic table: cl_alv_table_create=>create_dynamic_table
    Arash

  • How to create a dynamic table region with dynamic VO

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi

  • How to create a dynamic table region with dynamic VO in processFormRequest

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi
    Edited by: Myvizhi Selvi on May 20, 2013 6:21 PM

    Hi,
    You can use following sample code to create advance table columns dynamically with colum groups as well.
    It assumes that you have already created advance table with ID EmpTblRN.
    Below code returns column heading dynamically and if you keep your VO column names and attributes
    same in all the cases (COL1, COL2.....) then you can easily use a loop to create advance table columns.
    It is attaching VO attributes to OAMessageStyledText bean in the last.
    Hope it helps.
    OAAdvancedTableBean advTable = (OAAdvancedTableBean)webBean.findChildRecursive("EmpTblRN");
    Serializable [] param = {currentWindowSeq.toString()};
    Datum[] colHeadingArray = (Datum[])am.invokeMethod("getColumnHeading", param);
    String oldGrpName = null;
    String newGrpName = null;
    OAColumnGroupBean columnGroup = null;
    DictionaryData columnFormat = new DictionaryData();
    columnFormat.put(WIDTH_KEY, "4%");
    for (int i = 0; i < colHeadingArray.length; i++)
    try
    oracle.sql.STRUCT os = (oracle.sql.STRUCT)colHeadingArray;
    Object[] colHeadAttr = os.getAttributes();
    newGrpName = (String)colHeadAttr[0];
    if(newGrpName!=null)
    if(!newGrpName.equals(oldGrpName))
    // Create a column group, create the set the column header,
    // and add the column group under the advanced table
    columnGroup = (OAColumnGroupBean)createWebBean(pageContext, COLUMN_GROUP_BEAN, null, "ColGroup"+i);
    OASortableHeaderBean columnGroupHeader = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "ColGroupHeader"+i);
    columnGroupHeader.setText(newGrpName);
    // Retrieve from message dictionary
    columnGroup.setColumnHeader(columnGroupHeader);
    advTable.addIndexedChild(columnGroup);
    oldGrpName = newGrpName;
    // Create a column, create the set the column header, and add the column
    // under the column group
    OAColumnBean column1 = (OAColumnBean)createWebBean(pageContext, COLUMN_BEAN, null, "Column"+i);
    OASortableHeaderBean column1Header = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "Column1Header"+i);
    column1Header.setText(colHeadAttr[1].toString());
    column1.setColumnHeader(column1Header);
    column1.setColumnFormat(columnFormat);
    columnGroup.addIndexedChild(column1);
    // Create the actual leaf item under the first column
    OAMessageStyledTextBean leaf1 = (OAMessageStyledTextBean)createWebBean(pageContext, MESSAGE_STYLED_TEXT_BEAN, null, "Leaf"+i);
    //OARawTextBean leaf1 = (OARawTextBean)createWebBean(pageContext, RAW_TEXT_BEAN, null, "Leaf"+i);
    leaf1.setViewAttributeName("Week"+(i+1));
    String destination = "OA.jsp?page=/xxqc/oracle/apps/per/leaveadvance/webui/EmployeeLeaveDetailPG&personId={@PersonId}";
    destination = destination + "&startDate="+colHeadAttr[1].toString()+"-"+(String)colHeadAttr[0];
    destination = destination + "&addBreadCrumb=Y&retainAM=Y";
    leaf1.setDestination(destination);
    OADataBoundValueViewObject cssjob = new OADataBoundValueViewObject(leaf1,"Color"+(i+1));
    //leaf1.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, cssjob);
    leaf1.setAttributeValue(UIConstants.RENDERED_ATTR, cssjob);
    column1.addIndexedChild(leaf1);
    catch(Exception e)
    System.out.println("e"+e);

  • How do I create a dynamic table in the form for auto field detection?

    I am new to Acrobat. We need to create a form template that contains dynamic table control so that it can be populated using auto field detection.
    Our dynamic table contains reimbusement information, the rows vary from one claim to another.
    Please help. We are having Acrobat 9 Pro.
    Thanks
    Prasadh

    A lot is possible. There is a scripting language which should fill the gaps of missing features. There is data merge, there is XML, there is InCopy. Read everything about it and you will surely find what you need.

  • How to create a partition table on the basis of substring of column val

    Hi All,
    I have table
    Create table Mytable
    ( Col1 number,
    Col2 number,
    Col3 varchar2(20)
    insert into mytable values(11,2,'20110901');
    insert into mytable values(12,2,'20110902');
    insert into mytable values(13,2,'20110903');
    insert into mytable values(14,2,'20110904');
    insert into mytable values(15,2,'20110905');
    insert into mytable values(16,2,'20110906');
    Col3 data have the date value in the form of yyyymmdd format.
    I want to create a 30 partitions on the basis of day on col3.
    how can i achive this. i tried range partition but how can i get day of col3?
    any help appriciated.
    Edited by: P:) on Sep 28, 2011 5:56 PM

    Hi,
    the first point would be to use the correct data type for col3 and make it a date. Then I can see no reason why you couldn't range partition based on the date.
    Andre

  • How to create a custom table in the below format

    Dear Friends
              can any one please let me know hot to create a custom table as below
    outpatient
    |employeeno | class | startdate | enddate | spouse |1stchild | 2nchild|  Rate | amount|
    My FO wants to enter in the SM30 as above ......i.e he wants to have spouse ,1st child and 2nd child under one group........so he asking me to make as one group
    and give a heading as outpatient.........similary i have to give for in patient.
    Please could any one tell is it possible.
    regards
    syamala...

    Under the SAP forums section, there is ABAP development and in That there is ABAP General.
    SAP forums > ABAP development > ABAP General.
    Post in that forum.
    Regards
    AK
    Please reward if helpful

  • How to create a dynamic table (repeating) with static header?

    Hello
    My purpose is to create a table which should be dynamically filled at runtime depending on the number of elements in the datasource($record.list). If the list is empty, the table shouldn't be displayed at all.
    I created a subform which holds a table, ticking "Repeat Subform for each data item" and I set the binding of the table elements to $record.list[*].myelement. This works fine so far.
    For the table header I created a second subform with a table having exactly the same size like the other table with text fields that contain the table header texts.
    My problem now is that I would like to control the display of the subform which serves as table header row depending on whether $record.list is empty or not.
    What's the best way to do this? How can I have access to the datasource for a form?
    Thank you very much for your help!!!
    Best regards
    Bettina Hepp

    Hi,
    Instead of creating the header row outside the table.
    Create it inside the same table as header row.
    So when you create a condition then automatically applicable for the header row also.
    This is the best option.
    Regards,
    sasi

  • How to create a dynamic table?

    Hello experts!
    I would be very grateful for assistance with a complicated requirement I have gotten.
    I am working within a user exit in BI-IP and one of the parameter in the method is a table (whose structure is dynamic):
    C_TH_DATA     Changing     Type     HASHED TABLE     Transaction Data
    Due to the requirements I have I need to create a table based on the C_TH_DATA table BUT with a few additional fields.
    I have posted my first attempt below (it is syntactically correct).
    Does my approach make sense???
    Grateful for any suggestions.
    Greetings,
    Martin
    method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE.
      field-symbols:
        <f_ref_data>        type  any,
        <f_interim_data>    type  any,
        <f_new_data>        type  any,
        <f_itab>            type  any table,
        <f_infoprov>        type  RSINFOPROV,
        <f_infoprov_ref>    type  RSINFOPROV,
        <f_ref_data_BCCMP07>  type  any,
        <f_ref_data_BCCMC02>  type  any,
        <f_spc>             type  /bic/oiBHSPC0,
        <f_spc_ref>         type  /bic/oiBHSPC0,
        <f_blcopem1>        type  /bic/oiblcopem1,
        <f_blcopem1_ref>    type  /bic/oiblcopem1,
        <f_blcalpo0>        type  /bic/oiblcalpo0,
        <f_blcalpo0_ref>    type  /bic/oiblcalpo0.
      data:
        l_r_data1            type  ref to data,
        l_r_data2            type  ref to data,
        l_d_sumcostpo        type  f,
        l_d_deltacostpo      type  f,
        l_d_sumdeltacostpo   type  f.
    Generate new (empty record)
      create data l_r_data1 like line of c_th_data.
      assign l_r_data1->* to <f_new_data>.
      TYPES:
        BEGIN OF l_modif_c_th_data,
          l_r_itab    type  ref to data,
          thiscostpo  type  /bic/oiblcopem1,
          thiscostto  type  /bic/oiblcopem2,
          thiscostcm  type  /bic/oiblcopem3,
          thismanpo   type  /bic/oiblmansec1,
          thismanto   type  /bic/oiblmansec2,
          thismancm   type  /bic/oiblmansec3,
        END OF l_modif_c_th_data.
      data:
        l_r_itab    type  ref to data.
      create data l_r_itab type table of l_modif_c_th_data.
      assign l_r_itab->* to <f_itab>.
    Generate new (empty record)
      create data l_r_data2 type l_modif_c_th_data.
      assign l_r_data2->* to <f_interim_data>.

    Hi marcin,
    thanks for your answer.
    Im trying your examples ( /people/marcin.pciak/blog/2010/09/09/do-you-really-know-everything-about-typing--part-2 ) but your example dumps.
    DATA gr_elemdescr_p   TYPE REF TO cl_abap_elemdescr.
    DATA gr_elemdescr_i   TYPE REF TO cl_abap_elemdescr.
    DATA: gt_components   TYPE cl_abap_structdescr=>component_table,
            wa_component    LIKE LINE OF gt_components.
      DATA: gr_structdescr  TYPE REF TO cl_abap_structdescr.
      wa_component-name = 'HEADCOUNT'.
      wa_component-type = gr_elemdescr_i.
      APPEND wa_component TO gt_components.
      wa_component-name = 'CAPACITY'.
      wa_component-type = gr_elemdescr_p.
      APPEND wa_component TO gt_components.
      gr_structdescr = cl_abap_structdescr=>create( gt_components ).  <= causes error CX_SY_STRUCT_COMP_TYPE
    DATA gr_data TYPE REF TO data.
      CREATE DATA gr_data TYPE HANDLE gr_structdescr.
    I suspect Im doin something wrong.

  • How to create a dynamic fields in the Adobe Interactive form ?....urgent...

    Hi Experts,
    I'm working on Adobe Interactive form developed in WDP ABAP.( I have successfully config the ADS in my server.)
    Action:
    1. Create two view -
    first_view and second_view in the WDP ABAP..
    2. In the first_view, there are a input field( named "elements_number") and  a button(named "create_button") .
    3. In the second_view, there is Adobe Interactive form ( named "adobe_form" ).
    4. Run the WDP ABAP: first_view is opened. Type a number ex."3" in the "elements_number", click the "create_button".
    5. The second_view is opened.
    6. The "adobe_form" is occured.
    7. There are 3 text_fields in the "adobe_form".
    Steps (1) ~ (6), I have completed, but I don't know how to implement the step (7).
    Please give me some hint on this. I try to use the CL_WD_ADOBE_SERVICE, but I didn't found any examples.  Do you give me some ways to implement the function? Thanks a lot.
    Thank you very much.
    Thanks,
    Tao

    Hi Philippe,
    Thank you very much in advance.
    Do you tell me how to hide elements in the "adobe_form" in the WDP ABAP? How can I get the elements attributes in the "adobe_form" from the method WDDOMODIFY of the second_view  in the WDP ABAP.
    Please give me some hints on this. Do you give me some ways to implement functions( hide elements and  get elements's attributes)? Thanks a lot.
    Thank you very much.
    Thanks,
    Tao

  • How to create a dynamic mapping of columnar at the Runtime using ADF or JSF

    How to create a dynamic GUI at the Runtime using ADF or JSF in JDeveloper 11g.
    What I am trying to build is to allow the user to map one column to another at the run time.
    Say the column A has rows 1 to 10, and column B has rows 1 to 15.
    1. Allow the user to map rows of the two tables
    2. An dhte rows of the two columns are dynamically generated at the run time.
    Any help wil be appreciated.....
    Thnaks

    Oracle supports feedback form metalink was; "What you exactly want to approach is not possible in Htmldb"
    I can guess that it is not
    exactly possible since I looked at the forums and documantation etc. but
    couldnt find anything similar than this link; "http://www.oracle.com/technology/products/database/htmldb/howtos/tabular_form.h
    t". But this is a very common need and I thought that there must be at least a workaround?
    How can I talk or write to Html Db development team about this since any ideas, this is very important item in a critial project?
    I will be able to satisfy the need in a functional way if I could make the
    select lists in the tabular form dynamic with the noz_id;
    SELECT vozellik "Özellik",
    htmldb_item.select_list_from_query(2, t2.nozellik_deger, 'select vdeger
    a,vdeger b from tozellik_deger where noz_id = 10') "Select List",
    htmldb_item.text(3, NULL, t2.vcihaz_oz_deger) "Free Text"
    FROM vcihaz_grup_ozellik t1, tcihaz_oz t2
    WHERE t1.noz_id = t2.noz_id
    AND t2.ncihaz_id = 191
    AND t1.ngrup_id = 5
    But what I exactly need i something like this dynamic query;
    SELECT
    vozellik "Özellik",
    CASE
    WHEN (t2.nozellik_deger IS NULL AND t2.vcihaz_oz_deger IS NOT NULL) THEN
    'HTMLDB_ITEM.freetext(' || rownum || ', NULL) ' || vozellik
    WHEN (t2.nozellik_deger IS NOT NULL AND t2.vcihaz_oz_deger IS NULL) THEN
    'HTMLDB_ITEM.select_list_from_query(' || rownum ||
    ', NULL, ''select vdeger a,vdeger b from tozellik_deger where noz_id = ' ||
    t1.noz_id || ''' ) ' || vozellik
    END AS "Değer"
    FROM vcihaz_grup_ozellik t1, tcihaz_oz t2
    WHERE t1.noz_id = t2.noz_id
    AND t2.ncihaz_id = 191
    AND t1.ngrup_id = 5
    Thank you very much,
    Best regards.
    H.Tonguc

  • Drop down in dynamic table in the Adobe Interactive Form (Web dynpro ABAP)

    Hi All,
    I have scenario use drop down in dynamic table in the adobe interactive form (Using the button the dynamic table row will be increasing and decreasing).
    Assume I Add five rows dynamically in the dynamic table. The Last column contains Drop down.
    I have button in the adobe form.
    Button Name = u201CSAVEu201D
    Button type    = SAP Submit button (Native type u2013 I am Using ZCI).
    While clicking save button, I need to store the dynamic table datau2019s to back end system. I can able to store the data to back end system. After form data getting saved those particular values need to display in the adobe form. 
    Here I am facing a problem.
    I cannot able to view as a default value in the drop down, which I have selected some values after save operation I am not getting any values in the drop down as a default.
    Example:
    The dynamic table contains 5 rows (Each and every row Drop down contains one to ten values).
    1)     I have selected second value in the Drop down (ROW1)
    2)     I have selected fourth value in the Drop down (ROW2)
    3)     I have selected fifth value in the Drop down (ROW3)
    4)     I have selected seventh value in the Drop down (ROW4)
    5)     I have selected third value in the Drop down (ROW5)
    I press the save button that particular Drop down value gets saved in back end system and that particular values want display in the Drop down as a default value.
    How to resolve this problem.
    Regards,
    Boopathi M

    Hi,
    Solve the problem .
    I have created the New node for dropdown. also i have one node already for table.
    The new node i bind to dropdown, the table same for table.
    Its working fine
    Boopathi M

  • Javascript error occurred when create a dynamic table

    Hi all,
    I try to create a dynamic table using the created recordset,
    but I get the javascript error message "While executing insertObject in DynamicTable.htm, a Javascript error occurred."
    How to fix it? I tried to delete the cache file in Configuration folder but it is not work..
    Any idea? Thanks a lot!

    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html
    Try 12 & 4 and then go through the rest.

  • Creating a Dynamic table

    Could anyone please help me,
    how to create a dynamic table. That is a table where the user can insert his own text.
    thanks

    Well quicly you can create a jtable whose fields in each columns are editable.
    I use sun's forte to do that.

Maybe you are looking for

  • How can I customize E-mail in SSM?

    Hi, I´m new person in SAP and this is my first project. I'm with a problem to customize the e-mail in SSM (Sap Strategic Management). Every time that I try to send an e-mail a message box appear with this message: "To e-mail this document, select Ema

  • Downloaded new version fails to start

    I have just downloaded the latest iTunes release and restarted the computer. Now, when I try to launch the application, I get the message 'The folder "iTunes" cannot be found or created, and is required. The default location for this folder is inside

  • ISE 1.3 Anyconnect deployement

    We need to deploy and apply Anyconnect 4.0 with ISE 1.3 as posture client , Anybody have document that describe configuration in details.

  • Export and import problems

    i have 2 major problems importing my application from htmldb.oracle.com to my serevr at home. 1. i export my application and thems from htmldb.oracle.com. when i opened the sql export file i saw that all hebrew chracters was "jibrish". how can i expo

  • How to create feild catalog using Tcode MC18

    Hi firends,             I want to create a field catalog using the Tcode MC18 as well as i have to add some fields other then the fields provided in the characteristics stuctures. Can u please give the step by step help to how to do it. thanks and re