Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 605855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:11:29+00:00 2026-05-13T17:11:29+00:00

I have issue with RichFaces extended dataTable If the columns are more say 20,

  • 0

I have issue with RichFaces extended dataTable

If the columns are more say 20, instead of giving a horizontal scroll bar, the columns are getting compressed.

I tried giving column width in %, px .But no use.

Anyone familiar with this?

<rich:column label="Select" sortable="false" width="10%">
  <f:facet name="header"> 
    <h:selectBooleanCheckbox id="chk" align="center"
      value="#{bean.selectAll}" onclick="selectAll();"/>
  </f:facet>
  <input id="part_#{rowKey}" type="checkbox"
    name="selectedParts" value="#{listVar.id}" />
</rich:column>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:11:30+00:00Added an answer on May 13, 2026 at 5:11 pm

    <rich:extendedDataTable> really doesn’t handle horizontal scrolling very well. In fact, it seems like the developers set out to make horizontal scrolling next to impossible.

    You can put <rich:extendedDataTable> in a <div> with horizontal scrolling enabled, but it’s not going to work if you leave it at that. One of the nested <div>s in <rich:extendedDataTable> (div.extdt-innerdiv) is absolutely positioned, removing it from the flow of the document.

    For reference, this is the basic output structure of <rich:extendedDataTable>, assuming three <rich:column> elements with a width of 100px and two records:

    <div id="form_id:edt_id" class="extdt-maindiv rich-extdt-maindiv">
        <div id="form_id:edt_id:od" class="extdt-outerdiv">
            <div id="form_id:edt_id:innerd" class="extdt-innerdiv">
                <table id="form_id:edt_id:tu" class="extdt-table-layout">
                    <colgroup id="form_id:edt_id:colgroup:header">
                        <col width="100" />
                        <col width="100" />
                        <col width="100" />
                    </colgroup>
                    <thead id="form_id:edt_id:header" class="extdt-thead">
                        <tr class="extdt-subheader rich-extdt-subheader">
                            <th id="form_id:edt_id:column_1_id" class="extdt-menucell extdt-subheadercell rich-extdt-subheadercell">Column Header 1</th>
                            <th id="form_id:edt_id:column_2_id" class="extdt-menucell extdt-subheadercell rich-extdt-subheadercell">Column Header 2</th>
                            <th id="form_id:edt_id:column_3_id" class="extdt-menucell extdt-subheadercell rich-extdt-subheadercell">Column Header 3</th>
                        </tr>
                        <tr class="extdt-table-filterrow rich-extdt-subheader"> <!-- only if filtering is enabled -->
                            <th class="extdt-subheadercell rich-extdt-subheadercell"><!-- omitted for example purposes --></th>
                            <th class="extdt-subheadercell rich-extdt-subheadercell"><!-- omitted for example purposes --></th>
                            <th class="extdt-subheadercell rich-extdt-subheadercell"><!-- omitted for example purposes --></th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td colspan="3">
                                <div id="form_id:edt_id:sd" class="extdt-content">
                                    <table id="form_id:edt_id:n" class="extdt-table-layout">
                                        <colgroup id="form_id:edt_id:colgroup:body">
                                            <col width="100" />
                                            <col width="100" />
                                            <col width="100" />
                                        </colgroup>
                                        <tbody id="form_id:edt_id:tb">
                                            <tr id="form_id:edt_id:n:0" class="extdt-firstrow rich-extdt-firstrow">
                                                <td id="form_id:edt_id:0:column_1_id" class="extdt-cell rich-extdt-cell">
                                                    <div class="extdt-cell-div">Column 1, Row 1</div>
                                                </td>
                                                <td id="form_id:edt_id:0:column_2_id" class="extdt-cell rich-extdt-cell">
                                                    <div class="extdt-cell-div">Column 2, Row 1</div>
                                                </td>
                                                <td id="form_id:edt_id:0:column_3_id" class="extdt-cell rich-extdt-cell">
                                                    <div class="extdt-cell-div">Column 3, Row 1</div>
                                                </td>
                                            </tr>
                                            <tr id="form_id:edt_id:n:1" class="extdt-firstrow rich-extdt-firstrow">
                                                <td id="form_id:edt_id:1:column_1_id" class="extdt-cell rich-extdt-cell">
                                                    <div class="extdt-cell-div">Column 1, Row 2</div>
                                                </td>
                                                <td id="form_id:edt_id:1:column_2_id" class="extdt-cell rich-extdt-cell">
                                                    <div class="extdt-cell-div">Column 2, Row 2</div>
                                                </td>
                                                <td id="form_id:edt_id:1:column_3_id" class="extdt-cell rich-extdt-cell">
                                                    <div class="extdt-cell-div">Column 3, Row 2</div>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                    <tfoot id="form_id:edt_id:footer">
                        <tr class="extdt-footer rich-extdt-footer">
                            <td class="extdt-footercell rich-extdt-footercell" scope="colgroup" colspan="3">
                                <!-- table footer goes here if defined -->
                            </td>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </div>
        <div id="form_id:edt_id:column_1_idmenu">
            <script type="text/javascript">
                // context menu script snipped for example purposes
            </script>
        </div>
        <div id="form_id:edt_id:column_2_idmenu">
            <script type="text/javascript">
                // context menu script snipped for example purposes
            </script>
        </div>
        <div id="form_id:edt_id:column_3_idmenu">
            <script type="text/javascript">
                // context menu script snipped for example purposes
            </script>
        </div>
    </div>
    

    You could add horizontal scrolling to div.extdt-innerdiv, but <rich:extendedDataTable>‘s column auto-resizing functionality (ExtendedDataTable.DataTable_formId_edtId.calculateWidthsFromRatios()) essentially gets confused by this, resizing all columns that begin past the component’s maxWidth (derived from the initial width of div.extdt-maindiv) to 20px wide.

    I’ve tried…

    • Wrapping <rich:extendedDataTable> with a <div> element and setting the following:
      • position: relative;
      • width: 100%;
      • overflow-x: auto;
      • a desired height, otherwise you’ll just see scrollbars due to the next bullet point.
    • Making div.extdt-maindiv absolutely-positioned
    • Giving both div.extdt-outerdiv and div.extdt-innerdiv static positioning and auto widths

    …but that doesn’t seem to have any effect.

    I’m thinking it may be due to the fact that I’m making most of these changes in Firebug, and mainDiv.getWidth() (from calculateWidthsFromRatios()) is retrieving a cached value, mainDiv.element.boxWidth. This value is being set in ClientUI.common.box.Box.setWidth() (common-scrollable-data-table.js), and it’s only called once; it does not get called again if I resize the browser window (the <rich:extendedDataTable> in my case has 100% width).

    I will try making these changes in my CSS file to see if everything just magically works. The JavaScript for <rich:extendedDataTable> is pretty complex, though, and it’s not documented, so I could be missing something somewhere. I’ll follow up with my results.


    EDIT: After making the changes in my CSS, I still experienced the column-shortening problem.

    So, to avoid having to create a wrapper div, I added horizontal scrolling to div.extdt-innerdiv:

    .extdt-innerdiv { overflow-y: hidden; overflow-x: auto !important; }
    

    Then, in the footer of the <rich:extendedDataTable>, I disabled the calculateWidthsFromRatios() function:

    <rich:extendedDataTable id="edtId">
        <!-- rest of extended data table -->
        <f:facet name="footer">
            <script type="text/javascript">
                jQuery(function() {
                    // Disable ratio-based column resizing.
                    ExtendedDataTable.DataTable_formId_edtId.calculateWidthsFromRatios = function() {};
                });
            </script>
        </f:facet>
    </rich:extendedDataTable>
    

    I used the footer of the table in order to force this JavaScript to execute every time the component reRendered.

    Even with this solution, the user won’t be able to manually expand the widths of the columns, because the JavaScript in extended-data-table.js prevents columns from being resized wider than mainDiv.element.boxWidth. In order to enable resizing like this, one might as well just submit a patch to JBoss to fix <rich:extendedDataTable>, as there are currently no plans to modify its behavior in RichFaces 3.X (according to #RF-4871 in the JBoss Community JIRA).

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue with the MySQL SOURCE command. I am getting the following
i have issue with comparing NAN value in C++, Visualstudio. I need to handle
I have issue with table Reality which is not found, when I type db
i have issue regarding Paging using filterexpression. here's the piece of code for filtering
Have noticed issue while testing iphone app that if one quickly opens/dismisses a modal
I have similar issue with layers as described here html5 - canvas element -
I have an issue. 1. I have two threads: 'worker' and 'UI' thread. 2.
I have an issue here with filter_array. below is my code: $array = array(0,0,1);
I have a issue with my java code. i asked the same question yesterday.
I'm working on a web form which works in a following way. Read email

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.