Datatable Header Freeze

I am using JSF 2.0 .I need provide the vertical scrollbar and horizontal for the datatable.
I achieved using stylesheet.
But the header of the datatable is also scrolling
Is there any build in method to freeze the header of datatable.
or can u plz provide me the solution to freeze the header of the datatable

With pure JSF: no way.
However richfaces has a scrollableDataTable that does what you need.
http://livedemo.exadel.com/richfaces-demo/richfaces/scrollableDataTable.jsf
The trouble is that for JSF 2.0 you'll want Richfaces 4.0, which is still in development. I have read that Richfaces 3.3.3 can work with JSF 2.0, but I never tried that.

Similar Messages

  • Problem with buttons in datatable header

    Hi
    I have command buttons in the datatable header .When I display the data in columns there is a gap between buttons .I want the buttons should be stretched automatically along with column data there should not be no gap between buttons regardless how big the data is in each column.
    Can anybody help me asap.
    Thanks.

    This issue is that the second header is an instance of the first, so all unmanaged relative code breaks. I would hazzard a guess to say that your add code looks like "$.parent.row1.instanceManager.addInstance(1)." This will break, as the "second" header row no longer sees the 'table' element as it's parent.
    Changing to code to a static reference will fix it... i.e. xfa.form.form1.table1.row1.instanceManager.addInstance(1).
    This should solve it for you... if not, let me know.
    - Scott

  • Datatable header display issue

    Hi,
    I need to display more then one component in the header of a datatable. Currently, we are able to display the table along with the header values using datatable. Next to the header we want to display 2 icons, one to denote sorted by descending and another to denote that
    table values are sorted by ascending. We tried some thing like as show below
    <h:dataTable styleClass="dataTable" value="#{list}" var="plist">
    <h:column>
    <f:facet name="header">
    <h:commandLink action="#{form.sortDescending}">
         <h:graphicImage value="/descending.jpg"/>
    </h:commandLink>
    <h:outputText value="HeaderDisplayName" ></h:outputText>
    <h:commandLink action="#{form.sortAscending}">
         <h:graphicImage value="/ascending.jpg"/>
    </h:commandLink>
    </f:facet>
    <h:outputText id="value" value="#{list.value}" />
    </h:column>
    when I execute the above code, I get to see only the descending image.
    The header name and ascending image are not visible. Could you please help me resolve this issue?
    Thank you,
    DargonHorse

    you should use one component inside a facet.. So, you can solve your problem by encapsulating all that command links and outputtext inside a jsppanel component.. like;
    <f:facet name="header">
    <jsppanel>
    <h:commandLink descending...>
    <h:outputText header >
    <h:commandLink ascending... >
    <jsppanel />
    </f:facet>

  • Link Action in datatable header not working!!!

    hi all
    i want to sort the datatable rows when link in the header of a column in datatable is clicked. I am using Sun Creator but it doesnot provide functinality to directly add link action in header. So i changed the jsp page to add the following code
    <h:dataTable binding="#{SearchResults.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd" style="left: 24px; top: 24px; position: absolute" value="#{SearchPage.searchResultsDataModel}" var="currentRow">
    <h:column binding="#{SearchResults.column1}" id="column1">
    <f:facet name="header">
    <h:commandLink action="#SearchResults.linkActionApplicantIDHeader_action}"
    binding="#{SearchResults.linkActionApplicantIDHeader}" id="linkActionApplicantIDHeader">
    <h:outputText binding="#{SearchResults.linkActionApplicantIDHeaderText}" id="linkActionApplicantIDHeaderText" value="Applicant ID"/>
    </h:commandLink>
    </f:facet>
    </h:column>................... other columns of table(bold is what i added )
    if i check through the IDE application outline window that which action handler is associated with my header link action, it takes me to proper method. but while running it doesnot go to the proper method and hence doennot fire the event.
    what should i do??
    plz help
    thanks

    hi all
    i want to sort the datatable rows when link in the
    header of a column in datatable is clicked. I am
    using Sun Creator but it doesnot provide functinality
    to directly add link action in header. So i changed
    the jsp page to add the following code
    <h:dataTable binding="#{SearchResults.dataTable1}"
    " headerClass="list-header" id="dataTable1"
    rowClasses="list-row-even,list-row-odd" style="left:
    24px; top: 24px; position: absolute"
    value="#{SearchPage.searchResultsDataModel}"
    var="currentRow">
    <h:column binding="#{SearchResults.column1}"
    id="column1">
    <f:facet name="header">
    <h:commandLink
    action="#SearchResults.linkActionApplicantIDHeader_act
    ion}"
    binding="#{SearchResults.linkActionApplicantIDHeader}
    " id="linkActionApplicantIDHeader">
    <h:outputText
    binding="#{SearchResults.linkActionApplicantIDHeaderTe
    xt}" id="linkActionApplicantIDHeaderText"
    value="Applicant ID"/>
    </h:commandLink>
    </f:facet>
    </h:column>................... other columns of table(bold is
    what i added )
    if i check through the IDE application outline window
    that which action handler is associated with my
    header link action, it takes me to proper method. but
    while running it doesnot go to the proper method and
    hence doennot fire the event.
    what should i do??
    plz help
    thanksI had a similar problem w/ links in a datatable that didn't work. I had to do two things:
    1. Initialize the SearchPage.searchResultsDataModel property in the constructor of the bean (this is because I use request scope).
    2. Remove the rendered property from the surround h:panelGroup tag that I have around my table. I haven't been able to get the rendered property to work with the datatable links.
    Hope this helps!

  • Datatable header with a lot of columns

    I have a problem: I want to create a datable like Microsoft Excel, and in a <h:column> of datatable, I want to split this column to 3 child columns. So header of this column has 1 merged row, and 1 row with 3 columns.
    This is my simulated header:
    | Merged row |
    | Child row 1 | Child row 2 | Child row 3 |
    How to create this header? Please help me. Thanks
    TNTVN

    use <f:facet name="header" />
    example
    <h:panelGrid columns="3">
    <f:facet name="header">
    <h:outputText value="Merged row" />
    </f:facet>
    <h:outputText value="Child row 1" />
    <h:outputText value="Child row 2" />
    <h:outputText value="Child row 3" />
    </h:panelGrid>

  • Image on Datatable header

    Hi all.
    We need to include an image (<img>) in the header of a table. Is it possible? So far we could only add text to the headers.
    Thanks in advance

    JSF table - column width are set in the styleclasses available through the h:dataTable itself.
    There is a property - columnClasses where you can specify the column width of each column (you will have to specify a styleclass for each column though)
    For example if you have 3 columns in the dataTable and you want to give
    5% width to the first column, 5% to the second and 90% for the last, you can create the following css stylesheet classes (watch the width field down here):
    .AdminSectionSelector {
    border-bottom-color: #c4c4f9;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    text-align: center;
    width: 5%
    .AdminSectionPublish {
    border-bottom-color: #c4c4f9;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    text-align: center;
    width: 5%
    .AdminSectionData {
    border-bottom-color: #c4c4f9;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    width: 90%
    Now in your h:datatable columnclasses, you specify like this:
    columnclasses=AdminSectionSelector,AdminSectionPublish,AdminSectionData
    Hope it helps,
    BB

  • Google fonts reference in header freeze dreamweaver

    Our organization has been using google fonts with success for about 6 mo. now. However, today we ran into an issue with google fonts relating to Adobe Dreamweaver CS4 on multiple computers. It seems when opening a Header include page w/ google fonts reference on them in the form of
    <link href='//fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'>
    Dreamweaver freezes and then crashes after about 5 min.  We then moved the references to the css import method like "@import url(https://fonts.googleapis.com/css?family=Didact+Gothic);", the same issue occurred w/ the css file . I looked in google for support forums for this issue and found none. Do you have any insight?

    I was having this exact same issue, it would repeatedly hang although I always shut it down before it crashed. Finally after trying the css include it saved the file after about 2 minutes, now magically it seems to be working. It's very frustrating and now every time I save the file with the link in it I'm worried it's going to hang and I'll lose my work.

  • Making datatable header fixed

    I am trying to create a JSF DataTable with a
    Scroll Bar Option (instead of Pagination Control). If i place the datatable in between div tag for example
    <DIV style="overflow:auto; width:100%; height:200px">
    <datatable></datatable>
    </div>
    tags it supports scrolling. But I am unable to fix the table header and scroll only the data rows in the table.
    I have tried to use CSS style for table header, but it has not worked
    either.
    I have made sure that an html table can scroll such that it s header stays fixed. It can be done through setting style attribute of tbody element (style="overflow:auto; width:100%; height:200px"). But how would it work with datatable is unclear.
    Using the scroll bar is critical user requirement for me Anyhelp would be highly appreciated.

    Hello,
    Has anyone come up with some example code for this?
    I can't set the outer panelGrid height to a fixed value. I've got height set in my styleClass for the panelGrid but the height still varies with the number of elements in the dataTable. I'm assuming that the scroll bar will activate once the length of the dataTable goes beyond the height of the panelGrid, assuming the panelGrid height is static. Is this the case?
    Thanks,
    Joe

  • Work center capacity header freezed

    Dear Gurus,
    we're  not able to edit the work center capacity header. not able to edit the start and finish times.
    it is happening only for one work center. in other work centers same capacity category is editable.
    Please help us in resolving this.
    Regards,
    Gowri

    Hi,
    Check your work center categeroy definition for which edit is not possible.
    The work center category determines which data can be maintained in a work center.
    Each work center category is assigned to the applications (for example, production, plant maintenance or quality management) whose menus allow you to maintain work centers with this category.
    Each work center category has a number of screens assigned to it which the system displays when work centers of this category are displayed. The screens contain groups of fields (for example, scheduling data). Depending on the work center category, you can make field selections on these screens (for example, defining required entry fields).
    Thanks,
    nandha

  • Header Freezing not working for IE

    Hi,
    I want to freeze headers of the Interactive report. I used plugin (http://www.theapexfreelancer.com/apex/f?p=APEXFREELANCER:IR_PLUGIN_PACKAGE:0) for the same but it is taking lots of time when the query returns more than 500 rows and this does not work properly in IE.
    I applied the below code but it works fine only on IE and it does not support any other browser.
    table.apexir_WORKSHEET_DATA th
    position: relative; z-index: 14;
    top: expression(document.getElementById("apexir_DATA_PANEL").scrollTop-3);
    Please Help.
    Anuja

    Hi,
    I think it is best to contact plugin creator to get support.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • DataTable header colors

    Is there any way to set the header colors for individual columns vs. setting the color for the entire header?

    I wrote up the solution for this and was about to post when I decided I'd better try it. Then I found it doesn't work; there's a bug in the JSF Data Table which causes the columnClasses property to not apply to the cells in the header section. (If you look at the rendered html page, you can see each <td> is assigned an item from the columnClasses list, but this is not the case for the <th>'s.). Or alternatively, the JSF data table authors did this deliberately, but failed to provide a style list property for the header; the "headerClass" property is not an iterator like rowClasses/columnClasses.
    Thus, the solution I was going to suggest doesn't work for the data table.
    With that fixed, the solution would have been this:
    You should use the columnClasses property on the data table. (See this blog entry for more information on how that works:
    http://blogs.sun.com/roller/page/tor/20041004#aligning_text_in_tables)
    Note however that this will set the styleclass properties for the columns on every ROW in the table, not just in the header.
    So assuming your columnClasses property for your three-column table was this: "col1,col2,col3"
    you should put rules like this in the stylesheet:
    thead .col1 { background-color: orange }
    thead .col2 { background-color: indigo }
    thead .col3 { background-color: lime }
    In other words, you're writing rules for the case where there's a col1 class on an element within a <thead>.
    -- Tor
    http://blogs.sun.com/tor

  • How to freeze the report header row in the web template SAP BI 7.0?

    Hello,
    Can somebody tell me how to freeze the report header row in the web template SAP BI 7.0 (key fiigures1, 2,3)?
    key figure1   key figure2    key figure3
    20                    30                   40
    30                    80                   90
    Thanks

    Hi,
    You can refer the following threads...
    Re: Create Scrollable Table Body in WAD - Locking Table Column and Header
    Freeze Data Columns in WAD
    This will help you!
    Rgds,
    Murali

  • SSRS 2008 R2 report does not print the page header for a html content displaying on multiple pages

    Hi
    I need to display the html content from the database. The html content are quite long and can have content of 3-5 pages. Issue I  am facing is f the record has html content of 3-5 pages, then it does not print the page header (which is a separate tablix) on
    second page onwards.
    Nikesh Shah
    Nikesh Shah

    Hi Nikesh,
    According to your description, I’m not sure the meaning of Page header in your scenario. In Reporting Services, a page header that run along the top of each page, respectively. Headers can contain static text, images, lines, rectangles, borders, background
    color, background images, and expressions. But we couldn’t add tablix in the page header.
    If you are saying report header, a report header consists of the report items that are placed at the top of the report body on the report design surface. They appear only once as the first content in the report. So it cannot repeat in other pages.
    If you are saying tablix header, freezing column headers are different in table and matrix. For more details, please refer to the following thread:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c8ddc1af-1bdf-4e72-8aab-0353c7cc848a/ssrs-report-freezing-row-and-column-while-scrolling-issue?forum=sqlreportingservices
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Sort B1 DataTable - Code Inside...

    Hi
    I hope this will help you ...
    In case you know a  better way to implement this - please post your code...
    [B1Listener(BoEventTypes.et_ITEM_PRESSED, false)]
            public virtual void OnAfterItemPressed(ItemEvent pVal)
                bool ActionSuccess = pVal.ActionSuccess;
                Form oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
                if (pVal.Row < 0)
                    //click on headers...
                    //call sort DT according to Col.
                    Grid oGrid = (Grid) oForm.Items.Item("CFLG").Specific;
                    DataTable oDT = oGrid.DataTable;
                    oForm.Freeze(true);
                    SortDT(ref oDT , pVal.ColUID);
                    oForm.Freeze(false);
            public static bool SortDT(ref DataTable oDT, string ColName)
                //Copy To System DT
                System.Data.DataTable oSysDT = new System.Data.DataTable();
                // Add Cols
                for (int iCol = 0; iCol < oDT.Columns.Count; iCol++)
                    oSysDT.Columns.Add(oDT.Columns.Item(iCol).Name);
                for (int iRow = 0; iRow < oDT.Rows.Count; iRow++)
                    System.Data.DataRow oRow =  oSysDT.NewRow();
                    for (int iCol = 0; iCol < oDT.Columns.Count; iCol++)
                        oRow[iCol] = oDT.GetValue(iCol, iRow);
                    oSysDT.Rows.Add(oRow);
                //Sort DT
                SortSystemDataTable(oSysDT, ColName);
                //Copy Sorted table to B1DT
                oDT.Rows.Clear();
                oDT.Rows.Add(oSysDT.Rows.Count);
                for (int iRowCount = 0; iRowCount < oSysDT.Rows.Count; iRowCount++)
                    for (int iColCount = 0; iColCount < oSysDT.Columns.Count; iColCount++)
                        string scol = oDT.Columns.Item(iColCount).Name;
                        int icol = oSysDT.Columns.IndexOf(scol);
                        string sValue = oSysDT.Rows[iRowCount].ItemArray[icol].ToString();
                        if (oDT.Columns.Item(iColCount).Type == BoFieldsType.ft_Date)
                            if (sValue.Length > 0)
                                DateTime dDate = DateTime.Parse(sValue);
                                oDT.SetValue(iColCount, iRowCount, dDate);
                        else
                            if (sValue.Length > 0)
                                oDT.SetValue(iColCount, iRowCount, sValue);
                return true;
            private static void SortSystemDataTable(System.Data.DataTable oDT, string Sort)
                System.Data.DataTable newDT = oDT.Clone();
                int rowCount = oDT.Rows.Count;
                System.Data.DataRow[] foundRows = oDT.Select(null, Sort); // Sort with Column name
                for (int i = 0; i < rowCount; i++)
                    object[] arr = new object[oDT.Columns.Count];
                    for (int j = 0; j < oDT.Columns.Count; j++)
                        arr[j] = foundRows<i>[j];
                    System.Data.DataRow data_row = newDT.NewRow();
                    data_row.ItemArray = arr;
                    newDT.Rows.Add(data_row);
                //clear the incoming dt
                oDT.Rows.Clear();
                for (int i = 0; i < newDT.Rows.Count; i++)
                    object[] arr = new object[oDT.Columns.Count];
                    for (int j = 0; j < oDT.Columns.Count; j++)
                        arr[j] = newDT.Rows<i>[j];
                    System.Data.DataRow data_row = oDT.NewRow();
                    data_row.ItemArray = arr;
                    oDT.Rows.Add(data_row);
    Enjoy,
    J.

    J,
    If you search the Business One SDK forum on this topic you will find many posts that may help you.  Here is one as an example ...
    Re: sorting db datatable
    HTH,
    Eddy

  • Interface slow/buggy with two user accounts?

    I've recently created a second user account on my 2009 27" iMac and ever since I've been having weird things happening, such as flash videos in safari becoming unresponsive (literally frozen) untill I move the safari window, which gets the video to play for a few more seconds, then it freezes again... Also, GarageBand does the same thing, when I press play I hear my music, but the play head freezes in place after a few seconds and the only way to get it to move again is to jiggle the GarageBand window, switch to another Space and switch back or press CMD ALT ESC to bring up the force quit menu (not actually force quitting the application, just the action of bringing up the menu is enough to get GarageBand to refresh and start playing again...). These methods also work with safari.
    Quitting and reopening the applications doesn't fix the problem and restarting the computer brings temporary relief, but it always comes back. Sometimes safari is open on both user accounts, that might be causing the problem, I'm not sure. I do know that it started at the same time I created a second account.
    So whats going on? I'm thinking it's maybe a graphical issue? I've tried doing a permissions and disk repair and while my hard drive was found corrupt, the repair didn't seem to make a difference. Is my only option here to delete the second account? Would that even work? Or is a trip to the apple store in order? I'm hoping someone can shed some light on this issue since ive never come across a bug in OSX that I couldn't fix myself!
    Thanks

    A trip might be in order but not yet. First run software update, if your profile is correct you're a version behind as 10.6.8 is current, there may neither updates as well. Second reset the SMC and pram
    To reset the SMC
    Shut down the computer.
    Unplug the computer's power cord.
    Wait fifteen seconds.
    Attach the computer's power cord.
    Wait five seconds, then press the power button to turn on the computer.
    To reset PRAM/NVRAM
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

Maybe you are looking for