Modifying based columns headers in JSP frames

Using JDeveloper 3.1, I' have generated a JSP project based on a data module. However, I haven' t found how to change the column headers, in the generated frames. Is it possible to do this?

Thanks to myself, I' ve found a way:
1/ if you use the DataWebBean "RowSetBrowser"
you can use the method "setAttributeTitle(attributeName, theTitle_you_want);"
2/ if you use "ViewCurrentRecord"(=VCR here) you can
-a) create a new webbean,
-b)copy the source from the VCR in your new bean
-c) add the setAttributeTitle method from the
"RowSetBrowser" bean with the class and attribute(variables) required (the compiler will tell you this !!!)
-d) invoke the "setattributetitle" method in the "Render" method of your new bean by adding the following code:
if ( colTitles.get(sHeader) != null )
sHeader =(String)colTitles.get(sHeader);
after these lines:
for(int attrNo = 0; attrNo < attrs.length ; attrNo++)
if(!shouldDisplayAttribute(attrs[attrNo]))
continue;
sHeader = attrs[attrNo].getName();
Then, when you use the JSP element Wizard
add the "xxx.setAttributeTitle(defaultTitle, yourTitle)
where xxx is your bean Id
That's it
null

Similar Messages

  • Dates in column headers based on passed-in parameters

    I am trying to display a query that views performance data for a specified time range, with one day per column and the day's notation ('MON-DD') in the column header. Instead of giving myself a nightmarish query with a variable number of columns, I am starting with just 2 weeks worth and using DATE, DATE-1, DATE-2, etc. to derive the column data.
    I can get everything to display just fine if I use SYSDATE, or just DATE, but I can't seem to figure out how to use DATE -1, etc. in the column headers. I have even tried creating hidden page items to calculate DATE -1 and referencing those in the column headers, but while the references work fine, the calculations error out. Again, the data is fine, it is just the column headers I am struggling with.
    Thanks for any ideas.

    The SYSDATE - 1, SYDATE -2 works great in the report I have that goes back two weeks from the current day. The one I am stuck on is an alternate version of the report where I need it to go back 2 weeks from a date I let the user supply. This is the part that is killing me. SYSDATE -1 etc, processes just fine, but I can't figure out the syntax, etc. for using a page item instead of a constant/predefined SQL query.
    The posted idea is also what I currently use in the working report and is brilliant. What I can't seem to get figured out is how to populate the hidden items with calculated values based on a page item (the passed in date).

  • Create column headers in report based on data entered in Form

    Hi,
    I have a form with following fields being entered into a table: -- a start date for a project and then projected hours required on a monthly basis for X months
    Start Date mnth1_resource mnth2_resource mnth3_resource ...
    2/12/2011 30 20 80 ...
    6/3/2011 80 30 70
    3/12/2011 50 70 60
    4/10/2011 40 120 90
    I would like to create a report (interactive or otherwise) that will provide headers for the actual months of the calendar showing the full range of months to cover the dates included in the data: e.g. if the above data was the only data entered then:
    Feb Mar Apr May Jun Jul Aug Sept
    30 20 80
    50 70 60
    40 120 90
    80 30 70
    Where mnth1 is the month of the start of the project--
    Would appreciate any hints on how to accomplish this.
    Thanks,
    Pat

    Hi,
    Thanks for the response. I see how a crosstab type report works great for data that is static and all in the table, however, in my case the issue is that the columns will vary depending on the start date of the project. So even though the user is only entering 12 months of projection, the total number of columns will depend on the start date of the latest project. For example, if a project does not start till June of 2011 and goes out 12 months, the actual column headers will need to go out to May 2012. Likewise the first column will be dependent on the earliest start date month-- like Feb 2011 in the sample data.
    Pat

  • Unable to turn column headers bold in Word table using VB Script

    I have created a table in Microsoft Word 2010 using VB Script (this is via the script engine that forms part of HP Quality Centre functionality).  The table itself is OK, 2 columns with centred headers.  However, I am unable to make the column
    headers bold.  I have spent hours searching the net and trying various options to no avail can somebody please help me.
    Set objWord = CreateObject("Word.Application")
    Set objDocument = objword.Documents.Open(Src_Dir & template_file
    Const wdAlignParagraphCenter = 1'var to control justification of the table columns
    Const NUMBER_OF_ROWS = 1 'number of rows in intial table
    Const NUMBER_OF_COLUMNS = 2 'number of colums in the intitial table
    'search for the "TAA_TABLE" bookmark embedded in the document template, this is where the table will be created
    Set objRange=objDocument.Bookmarks("TAA_TABLE").Range
    'create the table
    objDocument.Tables.Add objRange, NUMBER_OF_ROWS, NUMBER_OF_COLUMNS
    Set objTable = objDocument.Tables(2)
    'populate column headers
    objTable.Cell(1, 1).Range.Font.Bold = True
    objTable.Cell(1, 1).Range.Text = "Sub Contractor"
    objTable.Cell(1, 2).Range.text = "TAA Number"
    'centre the column headers
    objDocument.Tables(2).Rows(1).Select
    Set objSelection = objWord.Selection
    objSelection.ParagraphFormat.Alignment = wdAlignParagraphCenter
    'format the table with plain grid lines
    objTable.AutoFormat(16)
    'set the column widths
    objTable.Columns(1).Setwidth 230,0
    objTable.Columns(2).Setwidth 230,0
    Any help is graetfully appreciated, as this is driving me wild.
    Cheers,

    Hi Citronax,
    I haved noticed that you used objTable.AutoFormat to format the table. Based on my understanding, this fuction will applie a predefined look to a table.
    After I move the code which bolder the text behind this line of code, it works well for me.
    'format the table with plain grid lines
    objTable.AutoFormat (16)
    objTable.Cell(1, 1).Range.Font.Bold = True
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Change column headers in ALV report

    Hi experts,
    I have created a new simple ALV report (it uses only internal tables, no structures). I would like to change the names of column headers in the ALV report. Is this possible? How can I do it?
    Thanks in advanced.

    Thanks for your reply,
    I am trying to use the code mentioned in the link but I think that something
    is missing, probably a CASE statement before WHEN in the LOOP.
    Can you help me? What do I have to put before WHEN statement?
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = <program name>
          i_structure_name       = <DDIC structure>
          i_bypassing_buffer     = 'X'
        CHANGING
          ct_fieldcat            = gi_fieldcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.                           "#EC *
      LOOP AT gi_fieldcat INTO wa_fieldcat.
          WHEN 'XXXX'.
            wa_fieldcat-seltext_s    = 'Fac'.
            wa_fieldcat-seltext_m    = 'Factory'.
            wa_fieldcat-seltext_l    = 'Factory'.
            wa_fieldcat-reptext_ddic = 'Factory'.
        MODIFY gi_fieldcat FROM wa_fieldcat.
      ENDLOOP.

  • Assigning Column Headers Dynamically in ALV output

    Hello Experts,
    I have to create dynamic column headers based on the user input on the selection-screen. Basically users enter the period and the ALV output has to create the column headers dynamically for that along with some standard columns.
    For eg, The selection screen is like this:
    From:  'Q4' '2009'
    To      'Q2'  '2011'.
    Then I have to create 12 columns for the months and rest for the Quarters.
    Then the output will be like this:
    Material, Description,10/09, 11/09, 12/09, 01/10, 02/10, 03/10, 04/10, 05/10, 06/10, 07/10, 08/10, 09/10, Q4/10, Q1/11, Q2/11
    I have built the logic to determine the number of colums for the periods based on input.
    By reading other posts, I have learnt that I have to use call method cl_alv_table_create=>create_dynamic_table to get the functionality.
    I have also looked at program BCALV_TABLE_CREATE for some help. It only has column headers in increasing order. But I am not able to understand How to pass the Column Header Label (for eg 10/09 or Q1/10) to the fieldcat dynamically.
    Is there any blog/sample prog close to my req? Can anybody please please help me. I grealy appreciate it.
    Thanks.

    Hi Lope,
    You need to filll column heading based on dynamic internal table column names.
    In your final internal table, you will have some column names like '1009, 1109, 1209' .
    While filling fieldcatalog you need to put your logic for column heading text.
    If column name is 1009, concatenate '10 '  '/'   '09', or calculate the quarter 10 falls into ,and display Q4/09.
    Regards,
    Nisha Vengal.

  • Column Headers of Masterdata Query

    Hello experts,
    in a Masterdata Query based on an InfoObject there are many Attributes.
    These Attributes are now listed in the Rows of the Query:
    InfoObject
    Attribut 1
    Attribut 2
    Attribut 3
    Therefore the Query will look like this:
    InfoObject        Attribut 1      Attribut 2     Attribut 3    
    Company A     New York     USA            Industry
    Company B     Toronto         Canada       Healthcare
    Company C     Mexico City   Mexico        Industry
    Now the problem is, that the real column headers are very long (60 chars) and therefore the column with is too wide so that the report shown in Web Reporting is far too wide.
    Question: How can the column header be separated into 2 or more lines so that each column will not be so wide?
    I know that this can be done with Keyfigure-Column-Headers .... unfortunately the report is based on Attributes (chars) of the InfoObject and not on Keyfiugres.
    Thank you for your help!
    Angie

    The following did the trick for the header lines only:
    Note 1292696 - Analysis modification: Fixed column width and line break
                                <bi:MOD_SELECT type="CHOICE" value="MOD_GENERIC_MODULE" >
                                    <bi:MOD_GENERIC_MODULE type="COMPOSITE" >
                                        <bi:MOD_REFERENCE value="com.sap.ip.bi.rig.ColumnWidth" />
                                        <bi:MOD_PARAMETER_LIST type="ORDEREDLIST" >
                                            <bi:MOD_PARAMETER type="COMPOSITE" index="1" >
                                                <bi:MOD_PARAM_NAME value="COLUMN_DEFAULT" />
                                                <bi:MOD_PARAM_VALUE type="CHOICE" value="INTEGER" >
                                                    <bi:INTEGER value="75" />
                                                </bi:MOD_PARAM_VALUE>
                                                &lt;
                                            </bi:MOD_PARAMETER>
                                            <bi:MOD_PARAMETER type="COMPOSITE" index="2" >
                                                <bi:MOD_PARAM_NAME value="WRAPPING" />
                                                <bi:MOD_PARAM_VALUE type="CHOICE" value="BOOLEAN" >
                                                    <bi:BOOLEAN value="X" />
                                                </bi:MOD_PARAM_VALUE>
                                            </bi:MOD_PARAMETER>
                                        </bi:MOD_PARAMETER_LIST>
                                    </bi:MOD_GENERIC_MODULE>
                                </bi:MOD_SELECT>
                            </bi:MOD_SINGLE_MODULE>
                        </bi:MODIFICATION>

  • Crystal 11.5 truncating column headers on export to excel

    Hi,
    We are currently (or finally as the case may be) upgrading our reports from Crystal 8.5 to Crystal 11.5 (which I know is a few versions behind but unfortunately the software that we integrate with is only compatible to 11.5).
    However, I've been having a problem exporting to excel.
    The column headers (which can be in a range of report header/page header/group header) are truncating to the the length that they display on the screen before the export.  When I view them in crystal viewer I can see that the entire text field is available.  However this does not flow through to export to excel.
    I have utilised the "Can grow" formatting option however this then creates a merged field up 3 rows high in excel and the report then has problems using excel functions like sort etc. 
    I also attempted to use the data only option which does export the full text in the column names but then I lose the rest of my formatting.
    There were no issues exporting from v8.5
    I have snapped to grid.
    The actual data exports without issue it is only the column headers (text) which pose a problem.
    I am unable to reduce the amount of data that we include in our report to free up space to display the entire text.
    I would prefer to not reduce to a 4pt text size to ensure that it exports correctly as this will have significant impacts for those people who actually export the reports.
    Is anyone able to shed some light on how to resolve this issue?   I've googled and searched these forums extensively but can't quite find a resolution to the issue and would really appreciate any assistance that anyone can offer me. 
    Kind regards
    Janne

    Ian
    It works for me whether my headers are text fields or field headers. Once I export them I expand the columns and set the cells to wrap, and I get the complete contents. Ditto for the fields themselved, and text fields containing data fields.
    I always export excel(97-2003)data only with Column width based on objects in the details & checking   Export object formating, Maintain relative object position, Maintain column alignment, export page header and page footer, Simplify page headers.
    Allow fields to grow is off on everything during exports.
    Note: nearly all my reports are designed in Crystal 2008 without any SQL commands and all exports are done manually. Perhaps it is a XI.5 issue?
    Edited by: Debi Herbert on Oct 5, 2011 10:07 AM

  • Freeze column headers in WAD

    Hi,
    I developed a web layout in the WAD.
    For my analysis grid, I want to freeze my column headers so when I scroll down, I still can see my column headers.
    We can't work with XHTML-frames because the width of our first column changes...
    Anybody an idea?
    (BW 7.0, GUI 7.10, SP3)
    Ciao
    Joke

    Hi,
    there is a similar thread which may help you..
    Freeze Panes in web reports
    Regards,
    Aparna

  • Getting column headers dynamically from input parameters in alv.

    Hi all,
    I am new to abap, can any one help me in getting column header dynamically through parameters in alv ?
    Eg:-
    i Have parametars for days field ,
    user inputs days as 10 20 30 40.
    Now I want to display in alv column headers as:-
    1st column-  'FROM 0 TO 10'
    2nd column- 'FROM 10 TO 20 '
    3rd column- 'FROM 20 TO 30'
    4th column- 'FROM 30 TO 40'
    5th column- 'FROM 40 TO 50'
    6th column- 'FROM 50 TO 60'
    thanks in advance........

    Check this code snippet:
    Step 1: Create a dynamic table based on the input in the selection screen.
    TYPE-POOLS: abap.
    DATA:
      lr_structdescr    TYPE REF TO cl_abap_structdescr,
      lr_tabledescr     TYPE REF TO cl_abap_tabledescr,
      lr_datadescr      TYPE REF TO cl_abap_datadescr,
      lt_components     TYPE abap_component_tab,
      ls_component      TYPE abap_componentdescr,
      lr_wa             TYPE REF TO data,
      lr_tab            TYPE REF TO data.
    DATA: lv_index TYPE sy-index.
    DATA: lv_index_num(5) TYPE n.
    DATA: lv_index_char(5) TYPE c,
          lv_iter TYPE i,
          lv_low TYPE numc2 VALUE 0,
          lv_high TYPE numc2 VALUE 10.
    DATA: lr_alv TYPE REF TO cl_salv_table.
    FIELD-SYMBOLS: <fs_field> TYPE ANY.
    FIELD-SYMBOLS: <fs_wa> TYPE ANY.
    FIELD-SYMBOLS: <fs_tab> TYPE table.
    PARAMETERS p_numcol(2) TYPE n DEFAULT 50.
    START-OF-SELECTION.
      lv_iter = p_numcol DIV 10.
      DO lv_iter TIMES.
        IF sy-index > 1.
          lv_low = lv_low + 10.
          lv_high = lv_high + 10.
        ENDIF.
        lv_index_num = sy-index.
        lv_index_char = lv_index_num.
        CONCATENATE 'FROM' lv_low 'TO' lv_high INTO ls_component-name
        SEPARATED BY '_'.
        ls_component-type =
        cl_abap_elemdescr=>get_p( p_length = 10 p_decimals = 2 ).
        INSERT ls_component INTO TABLE lt_components.
      ENDDO.
    * get structure descriptor -> lr_STRUCTDESCR
      lr_structdescr
      = cl_abap_structdescr=>create( p_components = lt_components
                                     p_strict = space ).
    * create work area of structure lr_STRUCTDESCR -> lr_WA
      CREATE DATA lr_wa TYPE HANDLE lr_structdescr.
      ASSIGN lr_wa->* TO <fs_wa>.
      lr_datadescr = lr_structdescr.
      lr_tabledescr
      = cl_abap_tabledescr=>create( lr_datadescr ).
    * Create dynamic internal table
      CREATE DATA lr_tab TYPE HANDLE lr_tabledescr.
      ASSIGN lr_tab->* TO <fs_tab>.
    * Populate the internal table
      DO 10 TIMES.
        DO.
          lv_index = sy-index.
          ASSIGN COMPONENT  lv_index  OF STRUCTURE <fs_wa> TO <fs_field>.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          <fs_field> = sy-index.
        ENDDO.
        APPEND <fs_wa> TO <fs_tab>.
      ENDDO.

  • Unable to Insert record In forms: error -ORA-01779 :cannot modify a column

    Hi,
    I have created one form with two block.
    Block-1 : Based on View
    Block-2 : Based on table
    There is is relationship between Block-1 and Block-2.
    Block-1 is populating from LOV.
    I just need to insert /update record Block-2 based on data from Block-1
    So Block-1 I have made read only at runtime (Inser/update all properties are false).
    Now when I insert record in Block-2 based on record from block-1, and getting below error.
    "ORA-01779: cannot modify a column which maps to a non key-preserved table"
    It is not allowing to insert record.
    Please help me.
    Subir

    The error states that there is some operation on a view, not an a table.
    Now when I insert record in Block-2 based on record from block-1What does that mean? How do you insert records in block 2?
    When exactly occurs the error?

  • Remove Column Headers in FlexUi Layout

    HI,
    I am displaying a Km folder using flexui layout....I am using the following components,
    Layout Controller:GridListLayoutController
    and the modifed versions of ConsumerFileListRenderer and ConsumerResourceRenderer.
    The resources are getting displayed as list items, but I want to remove the column headers.
    Please help me!
    Regards,
    Sandip

    Hi Sandip,
    You should try to use 'noTitle' modifier for displayed properties of your resources on the list. Column header will be not shown for properties with this modifier. Here is na example:
    description(noTitle),
    Column with description property will be shown without header.
    Regards,
    Michal

  • JTable: Easy groupable column headers with hideable columns

    Hi All,
    I have a requirement to make a JTable which displays
    columns with 2 values - a current value and an old one.
    The old value can be hidden or shown by user preference.
    The values are not editable. The 2 values have a single
    heading.
    I've been mucking about with GroupableTableHeader and
    HideableTableColumnModel and all that. This way of
    solving the problem requires siginificant coding.
    Then I had an idea - just use the TableCellRenderer to
    make it look like 2 columns ! This fits my requirements
    and is much simpler.
    So for anyone who has the same requirement, here is
    some sample code. I think you'll all agree that in my
    specific case it is a very good way of providing the needed
    functionality.
    Here is the sample code:
    import javax.swing.*;
    import javax.swing.border.AbstractBorder;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.DefaultTableCellRenderer;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    public class DoubleColumnTable extends JTable {
        private boolean secondValueVisible = true;
        public DoubleColumnTable() {
            super();
            setModel(new AbstractTableModel() {
                public String getColumnName(int column) {
                    return column + "";
                public int getColumnCount() {
                    return 5;
                public int getRowCount() {
                    return 5;
                public Object getValueAt(int rowIndex, int columnIndex) {
                    return new Integer[]{new Integer(rowIndex), new Integer(columnIndex + 10)};
            setDefaultRenderer(Object.class, new DefaultTableCellRenderer() {
                public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                    Integer[] twoValues = (Integer[])value;
                    JPanel panel = new JPanel();
                    if (secondValueVisible) {
                        panel.setLayout(new GridLayout(0, 2));
                        JLabel firstLabel = new JLabel(twoValues[0].toString(), JLabel.CENTER);
                        JLabel secondLabel = new JLabel(twoValues[1].toString(), JLabel.CENTER);
                        secondLabel.setBackground(Color.lightGray);
                        secondLabel.setOpaque(true);
                        secondLabel.setBorder(new LeftBorder());
                        panel.add(firstLabel);
                        panel.add(secondLabel);
                    } else {
                        panel.setLayout(new GridLayout(0, 1));
                        JLabel firstLabel = new JLabel(twoValues[0].toString(), JLabel.CENTER);
                        panel.add(firstLabel);
                    return panel;
        private void toggle() {
            secondValueVisible = !secondValueVisible;
            repaint();
        class LeftBorder extends AbstractBorder {
            public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
                g.setColor(Color.gray);
                g.drawLine(x, y, x, height);
        public static void main(String[] args) {
            JFrame frame = new JFrame();
            frame.setSize(300, 300);
            frame.setLocation(300, 200);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            Container contentPane = frame.getContentPane();
            final DoubleColumnTable table = new DoubleColumnTable();
            contentPane.add("North", new JButton(new AbstractAction("Toggle") {
                public void actionPerformed(ActionEvent e) {
                    table.toggle();
            contentPane.add("Center", new JScrollPane(table));
            frame.setVisible(true);
    }Message was edited by:
    NY_Consultant
    Message was edited by:
    NY_Consultant
    Message was edited by:
    NY_Consultant

    This should read
    "I have a table with column headers and a row headers using a single column from a second table."

  • JTable update, column headers

    I am trying to write my own tablemodel which does not change the specified
    column widths when updating. So far everthing works fine, only the column
    headers are not repainted. Does anybody know what is missing?
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class UpdateTable
    { static String headers[]= {"Baum", "Blatt", "Frucht","H�usigkeit"};;
      static String data[][]= {
         {"Eiche", "gez�hnt","Eichel","ein"},
         {"Buche", "glatt", "Buchecker","ein"},
         {"Tanne", "Nadel", "Zapfen","ein"},
         {"Pappel", "wechselst�ndig","Kapsel","zwei"},
      static MyTableModel tblModel;
      static JTable table;
      public UpdateTable()
      { JFrame frame = new JFrame("UpdateTable");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container contentPane = frame.getContentPane();
        tblModel = new MyTableModel(data, headers)
        { // Make read-only
          public boolean isCellEditable(int x, int y)
          { return false;
        table = new JTable(tblModel);
        table.getColumnModel().getColumn(1).setPreferredWidth(200);
        table.getColumnModel().getColumn(3).setPreferredWidth(20);
          // Set selection to first row
        ListSelectionModel selectionModel = table.getSelectionModel();
        selectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        selectionModel.addListSelectionListener (new ListSelectionListener()
        { public void valueChanged(javax.swing.event.ListSelectionEvent e)
            if (e.getValueIsAdjusting()) return;
                System.out.println(table.getSelectedRow());
          // Add to screen so scrollable
        JScrollPane scrollPane = new JScrollPane (table);
        contentPane.add(scrollPane, BorderLayout.CENTER);
        frame.setSize(500, 100);
        frame.setVisible(true);
      public static void main(String args[])
      { new UpdateTable();
        try
        { Thread.sleep(3000);
        catch (InterruptedException e)
        { System.out.println ("Fehler: "+ e.toString());
        String headers_neu[] = {"Arbre", "Feuille", "Fruit", "Maisonette"};
        headers = headers_neu;
        data[0][0]= "Eberesche";
        tblModel.setDataVector(data, headers);
    //    table.revalidate(); // is of no use.
        table.repaint();
    // The table model
    class MyTableModel extends AbstractTableModel
      private int cols, rows;
      private String[] columnNames;
      private String[][] data;
      public MyTableModel(int cols, int rows)
      { this.cols = cols;
        this.rows = rows;
      public MyTableModel(String[][] data, String[] columnNames)
      { setDataVector(data, columnNames);
      public String getColumnName(int col)
      { return columnNames[col].toString();
      public int getColumnCount()
      { return cols;
      public int getRowCount()
      { return rows;
      public Object getValueAt(int row, int col)
      { return data[row][col];
      public void setDataVector(String[][] data, String[] columnNames)
      { this.cols = data[0].length;
        this.rows = data.length;
        this.data= data;
        this.columnNames= columnNames;
    //    Firing the event will change column widths as usual.
    //    fireTableChanged(new TableModelEvent(this,TableModelEvent.HEADER_ROW););
    }

    // fireTableChanged(new TableModelEvent(this,TableModelEvent.HEADER_ROW););
    You have to fire a table changed event.
    The table neverasks the model if things have changed. The model always notifys the table of changes.
    No event fired no table repaint.
    Instead of fireTableChanged(...) you have the option of fireTableDataChanged() (if only the data has changed, not the nomber of columns or the type of columns) and fireTableStructureChanged() (if there have been columns changed).
    If fireTableStructureChanged happens (and HEADER_ROW event is the same thing), the table removes the columns and creates new onew. That's why column sizes are lost.
    If you really want the table not to manage columns, you have to do it yourself:
    Implement your own TableColumnModel and pass it to the table constructor. When adding/removing columns you can ask what was the size of the previous columns where and set the new columns to that size.
    Call setAutoCreateColumnsFromModel(false) in your table constructor so that the table will not remove/create new columns itself when a tableStructureChanged event happens.

  • Fixing column headers in JSF

    How do I fix column headers when displaying tablular data using JSF? Currently, when I scroll down the column header disappear.

    The articles under the Table Component section will help you
    http://developers.sun.com/prodtech/javatools/jscreator/reference/index.jsp
    also see winston's blogs for all tweaks with tables
    http://blogs.sun.com/winston/
    Thanks
    K

Maybe you are looking for

  • Im on Mac OS 10.4.11, powerbook 4.21, CPU power PC750 Memory 256 MB - is this ok for firefox 3.6.24?

    Im on firefox 3.6.23 - can I upgrade to 3.6.24?

  • Blank pics in iphoto, what do i do??!

    hi- all my pictures in my iphoto library after 2005 are blank gray squares, but still in the library. when i try and access these pics in another part of my computer, they are still blank. has anyone had this problem? what can i do? Emac   Mac OS X (

  • How to use mass replace it??

    i need to replace a bunch of code cuz im updating my site (republishing) and i downloaded massreplaceit... It seems however that i have to find something to replace... for example...for google analytics i must put the coode before </body? or somethin

  • Video FX won't render

    Hi, I'm new to using imovie, and hope to get some help on adding video FX. I have both imovie '08 and imovie HD. To add effects, I've made videos in imovie '08, then exported dv files. I imported the dv files to imovie HD, and added the clips to my p

  • Print subcontracting challan

    Dear friends, I have created a 57F4 challan using T code J1if01. How to take the print ? I am trying  T Code J1if02...but no such T code exists...what is the T code for print ?