Table with two headers

i have a designed a table with 2 headers(say H1 AND H2), and  dynamic body rows (with three columns)
the issue is when the table is oveflowing in to next page only one of the header is showing on the next page,
i have noticed that the option 
" INCLUDE HEADER ROW IN SUBSEQUENT PAGES" would not check for both the header rows , if i check it for say H1 then that option for H2 gets deselected. How do i resolve it..?
Thanks in advance

Hi Paul,
Thanks for your suggestion
so,
now i am looking in to combining two headers together , but i am not sure how to do,
right now i had wrapped the whole table in to  a subform , say S5
and there are now two header rows
Header row[0]
header row[1]
and
body row
i am trying to wrap the two headers as you suggested , but not sure how to proceed on. i have attached the pdf, can you please suggest me the changes. The table :"Table2"  is  Page 3 of the form.
Thank you

Similar Messages

  • Dynamic Table with two columns

    Hi!
    i have to create a Dynamic Table with two columns having 5-5 links each with some text...... three links r based on certain conditions....they r visible only if condition is true...
    if the links r not visible in this case another links take it's place & fill the cell.
    links/text is coming from database.
    i am using Struts with JSP IDE netbeans
    Please help me
    BuntyIndia

    i wanna do something like this
    <div class="box_d box_margin_right">
              <ul class="anchor-bullet">
              <c:forEach items="${data.faqList}" var="item" varStatus="status"
                        begin="0" end="${data.faqListSize/2-1}">
                        <li>${item}</li>
                   </c:forEach>
              </ul>
              </div>
              <div class="box_d">
              <ul class="anchor-bullet">
              <c:forEach items="${data.faqList}" var="item" varStatus="status"
                        begin="${data.faqListSize/2}" end="${data.faqListSize}">
                        <li>${item}</li>
                   </c:forEach>
              </ul>
              </div>
    wanna divide table in two columns....if one link got off due to condition other one take it's position...
    I have created a textorderedlist
    Bunty

  • Table with two header rows

    Hello, i have a table in that table i have a header row which has another table with two header rows
    When form spans more then one page on page2 the color and border are showing up outside of table see example below.
    Anyone have any ideas how I can fix this?
    I am using Livecycle designer ES2 9.***
    THanks

    Hi,
    If the table spans to Next page then if you want to move whole table to other page then uncheck the allow page breaks with content option which is under Object Tab.
    Thanks
    Vjay.

  • Populating a table with two columns using a custom bean

    hello,
    Can someone provide me or give me a link to an example of populating a table (with two columns) with a custom bean?
    thank you
    fwu

    1)create a java class
    2)have a list as a class variable
    3) populate the list in the constructor..
    4) map the values in the af:table
    //Employee pojo
    public class Employee {
        public Employee() {
            super();
        private String empName;
        private String empManager;
        private String job;
        public void setEmpName(String empName) {
            this.empName = empName;
        public String getEmpName() {
            return empName;
        public void setEmpManager(String empManager) {
            this.empManager = empManager;
        public String getEmpManager() {
            return empManager;
        public void setJob(String job) {
            this.job = job;
        public String getJob() {
            return job;
    //maanged bean
    public class Bean {
    private List<Employee> employee;
        public Bean() {
            super();
            employee = new ArrayList<Employee>();
          Employee e1 = new Employee();
          e1.setEmpName("xxxxx");
          e1.setEmpManager("xxxxxxxx");
          e1.setJob("xxxxxxx");
          Employee e2 = new Employee();
          e2.setEmpName("yyyyyyy");
          e2.setEmpManager("yyyyyyy");
          e2.setJob("yyyyyyt");
          Employee e3 = new Employee();
          e3.setEmpName("zzzzzz");
          e3.setEmpManager("zzzzzzz");
          e3.setJob("zzzzzzzz");
          employee.add(e1);
          employee.add(e2);
          employee.add(e3);
          employee.add(e4);
        public void setEmployee(List<Employee> employee) {
            this.employee = employee;
        public List<Employee> getEmployee() {
            return employee;
        }in the table map like
    <af:table value="#{Bean.employee}" var="row" rowBandingInterval="0"
                        id="t1">
    <af:column headerText="Employee Name" id="c1">
                  <af:inputText value="#{row.empName}" id="it5"/>
                </af:column>
                <af:column headerText="Employee Manager" id="c2">
                  <af:inputText value="#{row.empManager}" id="it2"/>
                </af:column>
    </af:table>

  • Master table with two child tables in ADF Framework

    Hi,
    I'm trying to implement single master with two detail tables using oracle adf framework of Jdev 11.1.1.4.0. I'm able to do single master-detail by using view link but unable to achieve nested details block i.e., master with nested child blocks.
    I created Query based view object of Master and two query based view objects as details. Then I created two view link for master with first child and another view link for master with second child. Even then in my data controls I see as two different components which is incorrect.
    Please let me know how to create a data control for an example shown below:
    Fruits [MASTER]
    --- Details of Fruits as adf table
    -- Apples [FIRST CHILD]
    ---- Details of Apples as adf table
    -- Oranges [SECOND CHILD]
    ---- Details of Oranges as adf table
    Regards,
    Amar.

    You need two viewLinks
    Fruits->Apples
    Fruits->Oranges
    Then in the data model you pick the Fruits entry that has:
    Fruits
    |--->Apples
    You stand on Fruits and you shuttle the Oranges to be under it from the left.
    If you'll use the default HR schema you'll see this type of relation for Employees:
    https://blogs.oracle.com/shay/entry/master_with_two_details_on_the

  • How to build a table with two For Loop

    Hi,
    I have two Loop For and I want to build a table with N columm (N = a loop + b loop)
    You can see my example.
    Thank's a lot
    Attachments:
    help_table.zip ‏10 KB

    I think this is the solution that you are going for.
    -Jim
    Attachments:
    help_table.vi ‏26 KB

  • How can i build table with two user name columne  ?

    How can I build view with two columns for user name ( one create and the other
    Can change also ) 
    And to display full name ( the user name is the key but not display  ) ?

    Hi,
    Creating View
    •     From initial screen of data dictionary(T.Code: SE11), enter the name of object i.e. view.
    •     Select view radio button and click on the push button.
    •     Dialog box is displayed for types of views.
    •     Select the view type.
    •     On the next screen, you have to pass following parameters.
    •     Short text
    •     In the table box you need to enter the table names, which are to be related.
    •     In join table box you need to join the two tables.
    •     Click on the TABFIELD. System displays the dialog box for all the table fields and user can select the fields from this screen. These fields are displayed in the view fields box.
    •     Save and Activate: When the view is activated, view is automatically created in the underlying database system. As long as the table exists in the database, the view also exists (Unless you delete it).
    Regards,
    Bhaskar

  • How to define form within a table with two columns?

    Hallo,
    i want to design a form with two columns side by side.
    My way is to define a table within the form:
    <af:panelForm>
    <afh:tableLayout width="100%">
    <afh:rowLayout halign="left">
    <af:inputText value="#{bindings.StsNr.inputValue}"
    label="#{bindings.StsNr.label}"
    required="#{bindings.StsNr.mandatory}"
    columns="#{bindings.StsNr.displayWidth}"
    readOnly="true">
    <af:validator binding="#{bindings.StsNr.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.StsNr.format}"/>
    </af:inputText>
    <af:selectOneChoice value="#{bindings.StammsaetzeStsEmpfangsart.inputValue}"
    label="#{bindings.StammsaetzeStsEmpfangsart.label}"
    tip="Brief, Fax, Mail">
    <f:selectItems value="#{bindings.StammsaetzeStsEmpfangsart.items}"/>
    </af:selectOneChoice>
    </afh:rowLayout>
    </afh:tableLayout>
    </af:panelForm>
    Is there a better way to do it?

    Hi reiasmus ,
    Try <af:panelForm row="X">, that specifies the number of fields by columns. If you have ten fields and you fix row="5", you will obtain two columns with 5 rows on each.
    Regards,
    Tif

  • Filling temporary table with two other tables.

    Hi everyone,
    In an start routine, I would like to do the following :
    read values in an internal table, save it in temporary table tab1.
    read values in an internal table (the same with a different request) and save it in temporary table tab2.
    save with no duplicate keys and in a sorted table tab3 the result of the two tables.
    I have coded like this, but it doesn't work, since the final table is empty.
    Indeed, the system says it is tried to insert a duplicate key. How is it possible using instruction INSERT ?
        DATA : t_agence_1 TYPE SORTED TABLE OF ty_agence
                       WITH UNIQUE KEY /BIC/C_AGENCE2
                       WITH HEADER LINE.
        DATA : t_agence_2 TYPE SORTED TABLE OF ty_agence
                       WITH UNIQUE KEY /BIC/C_AGENCE2
                       WITH HEADER LINE.
        DATA : t_agence TYPE SORTED TABLE OF ty_agence
                       WITH UNIQUE KEY /BIC/C_AGENCE2
                       WITH HEADER LINE.
    SELECT * FROM /BIC/PC_AGENCE2
          INTO CORRESPONDING FIELDS OF TABLE t_agence_1
          FOR ALL ENTRIES IN DATA_PACKAGE
               WHERE CALMONTH = DATA_PACKAGE-CALMONTH
               AND /BIC/C_AGENCE2 = DATA_PACKAGE-/BIC/C_AG1
               AND objvers = 'A'.
         IF sy-subrc = 0.
           INSERT LINES OF t_agence_1 INTO TABLE t_agence.
         endif.
       SELECT * FROM /BIC/PC_AGENCE2
          INTO CORRESPONDING FIELDS OF TABLE t_agence_2
          FOR ALL ENTRIES IN DATA_PACKAGE
               WHERE CALMONTH = DATA_PACKAGE-CALMONTH
               AND /BIC/C_AGENCE2 = DATA_PACKAGE-/BIC/C_AG2
               AND objvers = 'A'.
       IF sy-subrc = 0.
              INSERT LINES OF t_agence_2 INTO TABLE t_agence.
       endif.
    Thanks if you can help !
    regards
    fred
    Edited by: Christophe BELIN on Dec 5, 2008 3:43 PM

    Shanon,
    You would handle the parent with two child tables exactly the same way you would a parent with one child.
    1) Bring in all 3 tables through the Database Expert.
    2) On the Links Tab, place the parent table on the left of the window and the two child tables to the right (yes there is a reason for doing this).
    3) Delete any CR generated links between the tables.
    4) "Draw" a link that starts from the parent table to the 1st child table and then again, from the parent to the 2nd child.
    a. I'm assuming that you know which fields to link on.
    b. No links between children.
    5) Once you have both links in place right click them and change the "Link Type" to "Left Outer Join"
    a. The reason for doing this: It allows ALL of the parent records to come through, even if they do not have any matching records in
    one or both of the child tables.
    Hope this helps,
    Jason

  • Sort a table with two columns based on the first

    I have a powershell table with the columns 'Used Perc' and 'ID'.
    This was formed from the following 
    $a = @{Expression={[System.Math]::Round(($_.nUsed_Avg/$_.nSize)*100,1)};Label="Used Perc";width=25}, @{Expression={$_.nStatisticalDiskIdentificationID};Label="ID";width=15}
    $GLOBAL:CSV2 = Import-CSV $STATDISKOUT | Format-Table $a
    Before this, the file $STATDISKOUT had the columns 'nUsed_Avg', 'nSize', and 'nStatisticalIdentificationID'.
    My question is, how would I sort the new table based on 'Used Perc' but keeping the corresponding 'ID' column lined up to the right value?

    We use a select statement to reorder columns and recalculate,  The formatters just go at the end to adjust the display.
    Import-Csv <file> | select <column order format> | Format-Table
    or you can do it in the table:
    Import-Csv <file | Format-Table -Properties ,f1.,f2.,,f3....Here is how to inset a sort inline:
    $a=@{
    L='ID';
    E={$_.nStatisticalDiskIdentificationID};
    L='Used Perc';
    E={[System.Math]::Round(($_.nUsed_Avg/$_.nSize)*100,1)}
    Import-CSV $STATDISKOUT | Select $a | Sort 'Used Perc' | Format-Table -Auto
    ¯\_(ツ)_/¯

  • Master advance table with two detail advanced tables

    Hi All,
    I have this in mind..please let me know if that is possible.
    I want to have two detail advanced tables within a master advance table.
    The two detail advance tables will be wrapped in a subtab layout.
    My questions are:
    Can a master table have two details tables?
    Can a advance table have two inner advance tables?
    Your help or ideas would be valuable to me.
    Thank you,
    Arun

    Hi OAF Gurus
    I just want to know whether this is possible or not.
    I have created two view links and three view objects
    Table in Table in Table
    Table1--> Table2 --> Table3
    One problem i am facing when i click on Show link of Table1,it displays details of Table2 and when i click Show link of Table2,it displays details of Table3.
    but when i click on Hide of Table1, it says
    oracle.jbo.NoDefException: JBO-25002: Definition <Table3 View Object> of type Attribute not found
    Could you please anybody throw some pointers on this?
    Thanks
    Hitesh

  • My final version of a table with row headers and column footers

    This version is superior to the one I posted yesterday
    as it is better designed and responds to changes in
    size correctly. You can also have a header/footer with
    multiple columns/rows.
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.JTableHeader;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableColumnModel;
    import java.awt.*;
    import java.awt.event.AdjustmentListener;
    import java.awt.event.AdjustmentEvent;
    import java.awt.event.ComponentListener;
    import java.awt.event.ComponentEvent;
    public class HeaderFooterTablePanel extends JPanel {
        static abstract class AbstractHeaderFooterTableModel extends AbstractTableModel {
            public abstract int getRowHeaderColumnCount();
            public abstract Object getRowHeaderValueAt(int rowIndex,
                                                       int columnIndex);
            public abstract int getFooterRowCount();
            public abstract Object getFooterValueAt(int rowIndex,
                                                    int columnIndex);
        static class RowHeaderTableModel extends AbstractTableModel {
            private AbstractHeaderFooterTableModel abstractHeaderFooterTableModel;
            public RowHeaderTableModel(AbstractHeaderFooterTableModel abstractHeaderFooterTableModel) {
                super();
                this.abstractHeaderFooterTableModel = abstractHeaderFooterTableModel;
            public String getColumnName(int column) {
                return "";
            public int getColumnCount() {
                return abstractHeaderFooterTableModel.getRowHeaderColumnCount();
            public int getRowCount() {
                return abstractHeaderFooterTableModel.getRowCount();
            public Object getValueAt(int rowIndex, int columnIndex) {
                return abstractHeaderFooterTableModel.getRowHeaderValueAt(rowIndex, columnIndex);
        static class ColumnFooterTableModel extends AbstractTableModel {
            private AbstractHeaderFooterTableModel abstractHeaderFooterTableModel;
            public ColumnFooterTableModel(AbstractHeaderFooterTableModel abstractHeaderFooterTableModel) {
                super();
                this.abstractHeaderFooterTableModel = abstractHeaderFooterTableModel;
            public String getColumnName(int column) {
                return "";
            public int getColumnCount() {
                return abstractHeaderFooterTableModel.getColumnCount();
            public int getRowCount() {
                return abstractHeaderFooterTableModel.getFooterRowCount();
            public Object getValueAt(int rowIndex, int columnIndex) {
                return abstractHeaderFooterTableModel.getFooterValueAt(rowIndex, columnIndex);
        static class SyncColumnWidths implements TableColumnModelListener {
            private final JTable centerTable;
            private final JTable footerTable;
            public SyncColumnWidths(JTable centerTable,
                                    JTable footerTable) {
                this.centerTable = centerTable;
                this.footerTable = footerTable;
            // Change the column widths of the footer table when the column widths
            // of the center table change.
            public void columnMarginChanged(ChangeEvent e) {
                TableColumnModel centerTableColumnModel = centerTable.getColumnModel();
                TableColumnModel footerTableColumnModel = footerTable.getColumnModel();
                for (int i = 0; i < centerTableColumnModel.getColumnCount(); i++) {
                    int width = centerTableColumnModel.getColumn(i).getPreferredWidth();
                    footerTableColumnModel.getColumn(i).setPreferredWidth(width);
            public void columnSelectionChanged(ListSelectionEvent e) {
            public void columnAdded(TableColumnModelEvent e) {
            public void columnMoved(TableColumnModelEvent e) {
            public void columnRemoved(TableColumnModelEvent e) {
        private JTable centerTable;
        private JTable rowHeaderTable;
        private JTable columnFooterTable;
        public HeaderFooterTablePanel(AbstractHeaderFooterTableModel abstractHeaderFooterTableModel) {
            super();
            // Create the center, rowHeader and columnFooter tables
            centerTable = new JTable(abstractHeaderFooterTableModel);
            rowHeaderTable = new JTable(new RowHeaderTableModel(abstractHeaderFooterTableModel));
            columnFooterTable = new JTable(new ColumnFooterTableModel(abstractHeaderFooterTableModel));
            // Disabled column re-ordering
            centerTable.getTableHeader().setReorderingAllowed(false);
            columnFooterTable.getTableHeader().setReorderingAllowed(false);
            // We are using scroll panes, so no auto resizing of table.
            centerTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            columnFooterTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            // Only allow the user to change the column widths from the center table, not the
            // columnFooter.
            columnFooterTable.getTableHeader().setResizingAllowed(false);
            // When the center table column widths change, change those in the columnFooter table.
            SyncColumnWidths syncColumnWidths = new SyncColumnWidths(centerTable, columnFooterTable);
            centerTable.getColumnModel().addColumnModelListener(syncColumnWidths);
            // Set the width of the row header before adding it to the center scroll pane
            // as the row header.
            Dimension rowHeaderSize = rowHeaderTable.getPreferredScrollableViewportSize();
            rowHeaderSize.width = rowHeaderTable.getPreferredSize().width;
            rowHeaderTable.setPreferredScrollableViewportSize(rowHeaderSize);
            rowHeaderTable.setRowHeight(centerTable.getRowHeight());
            // Create the center scroll pane and set the row header table as the row header.
            final JScrollPane centerScrollPane = new JScrollPane(centerTable);
            centerScrollPane.setRowHeaderView(rowHeaderTable);
            // We will handle horizontal scrolling with our own scrollbar.
            centerScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            // Now we create the panel to hold the columnFooter table and the horizontal
            // scrollbar.
            final JPanel columnFooterPanel = new JPanel(new BorderLayout());
            // Keep the space below the row header empty.
            Component westGlue = Box.createHorizontalStrut(rowHeaderSize.width);
            // Set height of the columnFooterTable before adding it to the columnFooter scroll pane
            // as the view.
            Dimension columnFooterSize = columnFooterTable.getPreferredScrollableViewportSize();
            columnFooterSize.height = columnFooterTable.getPreferredSize().height;
            columnFooterTable.setPreferredScrollableViewportSize(columnFooterSize);
            columnFooterTable.setRowHeight(centerTable.getRowHeight());
            // The scroll pane which holds the columnFooterTable.
            final JScrollPane columnFooterScrollPane = new JScrollPane(columnFooterTable);
            // We do our own horizontal scrolling and the columnFooterScrollPane never scrolls vertically.
            columnFooterScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            columnFooterScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
            // The scrollbar we use to scroll horizontally.
            final JScrollBar horizontalScrollBar = new JScrollBar(JScrollBar.HORIZONTAL);
            // Sync up all the scrolling. See the method for details.
            syncScrolling(centerScrollPane, horizontalScrollBar, columnFooterScrollPane);
            // Keep the space below the vertical scrollbar empty.
            final JScrollBar verticalScrollBar = centerScrollPane.getVerticalScrollBar();
            int verticalScrollBarWidth = verticalScrollBar.getPreferredSize().width;
            final Component eastGlue = Box.createHorizontalStrut(verticalScrollBarWidth);
            // Set the center viewport size to match to table size
            Dimension centerTablePreferredsize = centerTable.getPreferredSize();
            centerTable.setPreferredScrollableViewportSize(centerTablePreferredsize);
            centerScrollPane.getViewport().setSize(centerTablePreferredsize);
            // The panel that holds the columnFooterTable and the horizontal scrollbar below it.
            final JPanel footerPanel = new JPanel(new BorderLayout());
            footerPanel.add("North", columnFooterScrollPane);
            footerPanel.add("South", horizontalScrollBar);
            footerPanel.setMinimumSize(footerPanel.getPreferredSize());
            // Assemble our columnFooterPanel.
            columnFooterPanel.add("West", westGlue);
            columnFooterPanel.add("Center", footerPanel);
            columnFooterPanel.add("East", eastGlue);
            // This keeps the columnFooterPanel at its minimum height
            JPanel northPanel = new JPanel(new BorderLayout());
            northPanel.add("North", columnFooterPanel);
            // Assemble the center scroll pane, below it the panel containing the column
            // footer panel, and then vertical glue to eat up any available vertical space.
            Box box = Box.createVerticalBox();
            box.add(centerScrollPane);
            box.add(northPanel);
            box.add(Box.createVerticalGlue());
            // Hide/show the eastGlue and the horizontalScrollBar, and recalculate the
            // minimum size of the footerPanel in response to size and visibility changes.
            syncScrollBarVisibility(centerScrollPane, eastGlue, horizontalScrollBar, footerPanel);
            setLayout(new BorderLayout());
            add("Center", box);
        private void syncScrollBarVisibility(final JScrollPane centerScrollPane,
                                             final Component eastGlue,
                                             final JScrollBar horizontalScrollBar,
                                             final JPanel footerPanel) {
            // Hide/show the eastGlue accoring to whether or not the vertical scrollbar
            // is visible.
            centerScrollPane.getVerticalScrollBar().addComponentListener(new ComponentListener() {
                private void checkVisibleStatus(boolean b) {
                    if (eastGlue.isVisible() != b) {
                        eastGlue.setVisible(b);
                public void componentHidden(ComponentEvent e) {
                    checkVisibleStatus(false);
                public void componentMoved(ComponentEvent e) {
                public void componentResized(ComponentEvent e) {
                public void componentShown(ComponentEvent e) {
                    checkVisibleStatus(true);
            // Hide/show the horizontal scrollbar according to whether or not it's needed.
            centerScrollPane.getViewport().addComponentListener(new ComponentListener() {
                public void componentHidden(ComponentEvent e) {
                public void componentMoved(ComponentEvent e) {
                public void componentResized(ComponentEvent e) {
                    int centerScrollPaneWidth = centerScrollPane.getViewport().getSize().width;
                    int centerTablePreferredWidth = centerTable.getPreferredSize().width;
                    if (centerScrollPaneWidth >= centerTablePreferredWidth) {
                        horizontalScrollBar.setVisible(false);
                    } else {
                        horizontalScrollBar.setVisible(true);
                public void componentShown(ComponentEvent e) {
            // Set the minimum size of the footerPanel according to whether or not the
            // horizontalScrollBar is visible.
            horizontalScrollBar.addComponentListener(new ComponentListener() {
                public void componentHidden(ComponentEvent e) {
                    footerPanel.setMinimumSize(footerPanel.getPreferredSize());
                public void componentMoved(ComponentEvent e) {
                public void componentResized(ComponentEvent e) {
                public void componentShown(ComponentEvent e) {
                    footerPanel.setMinimumSize(footerPanel.getPreferredSize());
        private void syncScrolling(final JScrollPane centerScrollPane,
                                   final JScrollBar columnFooterScrollBar,
                                   final JScrollPane columnFooterScrollPane) {
            // When the view of the center scroll pane changes position,
            // change the value of the columnFooterScrollBar to match.
            centerScrollPane.getViewport().addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent e) {
                    int x = ((Component) e.getSource()).getLocation().x * -1;
                    JViewport viewport = (JViewport) e.getSource();
                    int extentWidth = viewport.getExtentSize().width;
                    int viewWidth = viewport.getViewSize().width;
                    int value = Math.max(0, Math.min(viewport.getViewPosition().x, viewWidth - extentWidth));
                    columnFooterScrollBar.setValues(value, extentWidth, 0, viewWidth);
            // When the columnFooterScrollBar (horizontal scroll bar) value changes,
            // change the position of the view in the center scroll pane to match.
            columnFooterScrollBar.addAdjustmentListener(new AdjustmentListener() {
                public void adjustmentValueChanged(AdjustmentEvent e) {
                    JViewport viewport = centerScrollPane.getViewport();
                    viewport.setViewPosition(new Point(e.getValue(), viewport.getViewPosition().y));
                    viewport = columnFooterScrollPane.getViewport();
                    viewport.setViewPosition(new Point(e.getValue(), viewport.getViewPosition().y));
            // When the view of the row header changes position,
            // change the value of the vertical scrollbar of the center
            // scroll pane to match.
            centerScrollPane.getRowHeader().addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent e) {
                    JViewport viewport = (JViewport) e.getSource();
                    int extentHeight = viewport.getExtentSize().height;
                    int viewHeight = viewport.getViewSize().height;
                    int value = Math.max(0, Math.min(viewport.getViewPosition().y, viewHeight - extentHeight));
                    centerScrollPane.getVerticalScrollBar().setValues(value, extentHeight, 0, viewHeight);
        public JTable getCenterTable() {
            return centerTable;
        public JTable getRowHeaderTable() {
            return rowHeaderTable;
        private JTable getColumnFooterTable() {
            return columnFooterTable;
        public static void main(String[] args) {
            AbstractHeaderFooterTableModel tableModel = new AbstractHeaderFooterTableModel() {
                public int getRowCount() {
                    return 25;
                public int getColumnCount() {
                    return 10;
                public Object getValueAt(int rowIndex, int columnIndex) {
                    return "Cell " + rowIndex + ":" + columnIndex;
                public String getColumnName(int column) {
                    return "Column #" + column;
                public Object getRowHeaderValueAt(int rowIndex, int columnIndex) {
                    return "Header " + rowIndex + ":" + columnIndex;
                public int getRowHeaderColumnCount() {
                    return 2;
                public Object getFooterValueAt(int rowIndex, int columnIndex) {
                    return "Footer " + rowIndex + ":" + columnIndex;
                public int getFooterRowCount() {
                    return 3;
            JFrame frame = new JFrame();
            HeaderFooterTablePanel tablePanel = new HeaderFooterTablePanel(tableModel);
            // Render the cells in the row header and footer like the center table column headers.
            TableCellRenderer columnRenderer = tablePanel.getCenterTable().getTableHeader().getDefaultRenderer();
            tablePanel.getRowHeaderTable().setDefaultRenderer(Object.class, columnRenderer);
            tablePanel.getColumnFooterTable().setDefaultRenderer(Object.class, columnRenderer);
            frame.getContentPane().add("Center", tablePanel);
            frame.setSize(300, 300);
            frame.setLocation(300, 200);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
    }

    i was wondering why this topic has NO replies! and then i realized that there is NO question??? so do you have a question, or are you just starting a new thread cuz you feel like it???
    just trying to work out why you didnt post this is the old thread???
    http://forum.java.sun.com/thread.jspa?threadID=5130131&messageID=9466400#9466400

  • ALV table with two dimensions and a link in each cell to a document

    Hi,
    I want to create an ALV output for a 2-dimension table. The table should look like:
    ---  |  Col1  |  Col2  | ...
    L1 | Cell11 | Cell12 | ...
    L2 | Cell21 | Cell22 | ...
    Do you have any hints how I could implement such a two dimensional ALV with different links when clicking on Cell11, Cell12, Cell21, ....
    Thanks for your help!
    Caroline

    if u use OO ALV,
    1.on clicking CELL1, CELL2 etc, to get different links,
    u can put hotspot for the fields in fieldcat
    and u can handle method
    button_click event of cl_gui_alv_grid.
          CLASS LCL_EVENT_RECEIVER DEFINITION
    CLASS LCL_EVENT_RECEIVER DEFINITION.
      PUBLIC SECTION.
        METHODS HANDLE_CLICK_ROW_COL
        FOR EVENT CLICK_ROW_COL OF CL_GUI_ALV_GRID
        IMPORTING ROW_ID COL_ID.
    ENDCLASS.                    "cl_event_receiver DEFINITION
          CLASS CL_EVENT_RECEIVER IMPLEMENTATION
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
      METHOD HANDLE_BUTTON_CLICK.
        perform button_click using ROW_ID COL_ID.
      ENDMETHOD .                    "handle_top_of_page
    ENDCLASS .                    "cl_event_receiver
    2.
    FOR GETTING TWO DIMENSIONS, HANDLE PRINT_TOP_OF_PAGE
    and using write statements, build a row at the top of grid.
    or else
    IN THE LAYOUT , U CAN PLACE BUTTONS JUST ABOVE THE CUSTOM CONTAINER

  • How can I save a table with column headers?

    Hi
    I want to save the content in table to a text file. I used Write file.vi for doing that but the column headers didn't be saved. My column headers are changed depends on my testing result so that the column number is not fixed. Any suggestions?
    Bill.

    You can retrieve column headers with the ColHdrs[] table property and save them to disk before the table contents.
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to create tree table with column headers

    hi,
    when i drag and drop a view object onto my .jspx page as a af: tree table ,
    am not able to get the column header of each column. all the columns in the table are just clubbed together not separated as in af:table.
    can anyone say how the column headers are created for the columns when we drop a view object as a tree table?

    Hi,
    this is not an option with the treeTable as it gets rendered by default when dragging and dropping the collection to the page. I haven't tried it, but I think you will have to check which node is getting rendered and based on this information add your own row layout . Sounds like a bit of coding work
    Frank

Maybe you are looking for