datatable,richfaces , <rich:dataTable> header height

header height


Tag: datatable,richfaces

Whenever I have a table header going into 3 rows, the background is not able expand. When it is only 2 rows all seems to be fine. Does anybody went through this ?

Thanks in advance.

Sorry I am new to stackoverflow, couldn't attach image.

Image link

Table in xhtml

<rich:dataTable value="#{couponController.campaignSegmentVersionDtoList}"
var="campaignSegment" id="sas" rowClasses="odd-row, even-row"
styleClass="stable" style="width:1100px;" sortMode="single" rowKeyVar="myrow">
<f:facet name="header">No</f:facet>
<h:outputText value="#{myrow + 1}" />
<rich:column sortBy="#{campaignSegment.segmentName}" id="segmentName">
    <f:facet name="header">
        <a4j:commandLink value="Campaign Segment" onclick="#{rich:component('sas')}.sort('segmentName')" style="color:white;"/>
    <h:outputText value="#{campaignSegment.segmentName}" />
<rich:column sortBy="#{campaignSegment.segmentTitle}" id="segmentTitle">
    <f:facet name="header">
        <a4j:commandLink value="MRM Segment Name" onclick="#{rich:component('sas')}.sort('segmentTitle')" style="color:white;"/>
    <h:outputText value="#{campaignSegment.segmentTitle}" />
<rich:column sortBy="#{campaignSegment.sourceCode}" id="sourceCode">
    <f:facet name="header">
        <a4j:commandLink value="Source Code" onclick="#{rich:component('sas')}.sort('sourceCode')" style="color:white;"/>
    <h:outputText value="#{campaignSegment.sourceCode}">
<rich:column id="packageCode" sortBy="#{campaignSegment.packageCode}" style="width:80px;">
    <f:facet name="header">
        <a4j:commandLink value="SAS Package Code"  onclick="#{rich:component('sas')}.sort('packageCode')" style="color:white;"/>
    <h:outputText value="#{campaignSegment.packageCode}">
<rich:column id="version" style="width:80px;">
    <f:facet name="header">
        <h:outputText value="MRM Version Code" />
    <h:selectOneMenu value="#{campaignSegment.versionCode}" valueChangeListener="#{couponController.valueChangeListener}" label="Version Code" listWidth="300" immediate="true">
<f:selectItems value="#{couponController.mrmVersions}" var="version" itemLabel="#{version.versionCode}" itemValue="#{version.versionId}"/>
<a4j:ajax event="valueChange" render="stringCodeList" execute="@this" />
<rich:message for="Version"/>
<rich:column id="testControlFlag" sortBy="{campaignSegment.testControlFlag}" style="width:60px">
    <f:facet name="header">
        <a4j:commandLink value="Test Control Flag" onclick="#{rich:component('sas')}.sort('testControlFlag')" style="color:white"/>
    <h:outputText value="#{campaignSegment.testControlFlag}"/>
<rich:column sortBy="#{campaignSegment.publishedDate}" id="publishedDate">
    <f:facet name="header">
        <a4j:commandLink value="Published Date" onclick="#{rich:component('sas')}.sort('publishedDate')" style="color:white;"/>
    <h:outputText value="#{campaignSegment.publishedDate}">
        <f:convertDateTime type="date" pattern="MM-dd-yyyy H:m:s"/>
<rich:column sortBy="#{campaignSegment.status}" sortOrder="#{couponController.campaignSegmentsDescOrder}" id="publishStatus">
    <f:facet name="header">
        <a4j:commandLink value="Publish Status" onclick="#{rich:component('sas')}.sort('publishStatus')" style="color:white;"/>
    <h:outputText value="#{campaignSegment.status}">


The background image starts repeating itself, which it shouldn't do.

You can fix that with this:

.rf-dt-hdr-c {
    background-repeat: repeat-x;


Change default color of a popupPanel?

I have a popupPanel: <rich:popupPanel id="popup" modal="false" autosized="true" resizeable="false"> <f:facet name="header"> <h:outputText value="Simple popup panel" /> </f:facet> <f:facet name="controls"> <h:outputLink value="#" onclick="#{rich:component('popup')}.hide(); return false;"> X </h:outputLink> </f:facet> <p>Any content might be inside this panel.</p> <p> The popup panel is open and closed from the javascript function of component client side...

Adding image to GridView created in CodeBehind

First thing I do is create a Datatable and then bind it to a GridView Here is my code DataTable dt = new DataTable(); DataColumn imgC = dt.Columns.Add("img", typeof(string)); DataRow row1 = dt.NewRow(); row1["img"] = "~images/foo.png"; GridView gv = new GridView(); gv.DataSource = dt; gv.DataBind(); cust_services.Controls.Add(gv); I'm not sure where...

DataTable.Update Fails and Throws DBConcurrencyException

I'm trying to take advantage of the DataTable.Update method to update a SQL data source. Below is the code for the method that performs the update. string connString = "SQL connection string...this works."; string sqlSelect = "SELECT Payment, Amount, Date, Month, StartDate, EndDate, FROM Payment"; private void updateDataSource(DataTable dt) {...

JQuery Datatable Error “Cannot read property 'length' of undefined”

I am getting data for my DataTable from another URL on my website called request.php. request.php: $con = mysql_connect("xxxx", "xxxx", "xxxx"); $con or die(mysql_error()); mysql_select_db("xxxx") or die(mysql_error()); $result = mysql_query("SELECT * FROM users_logins") or die(mysql_error()); $resultArray = array(); $tempArray = array(); while($row = mysql_fetch_assoc($result)) { // Add each row into...

Richfaces custom skinning images

My web app got normal skinng working for (e)css files. I got 2 skins: Normal plainTxt=#006 plainBg=#FFF readonlyTxt=#003082 menuTxt=#0000A0 blackwhite plainTxt=#FFF plainBg=#000 readonlyTxt=#D0D0D0 menuTxt=#000 The colors work. But now i have the following issue: images For each skin i want different images. How do i get that? That i can't...

Adding property in php datatable for google chart custom html tooltips

I am trying to create custom html tooltips in my google chart by adding them into the datatable, right now my datatable is being created in PHP like this: $datatable = array('cols' => array( array('type' => 'string', 'role' => 'domain', 'label' => 'Month'), array('type' => 'string', 'role' => 'tooltip'), array('type'...

Desired page in pagination with DataTables

I am using datatables plugin on my table. I am getting pagination with all page numbers. But my requirement is I need to have a textbox in which I can enter the number, which will take to the entered page number. I am using plugin from here:: here is...

Bulk Exporting Data from Codeignitor to CSV using Database Utility Class

Here is my code: function export_csv() { $st = $this->input->get('st'); //Start Date $en = $this->input->get('en'); //End Date $sTable = 'TABLE_NAME'; $this->load->dbutil(); $aColumns = array('tempdisplayid AS ucid','uui','campaign_name','location','caller_id','skill','calltime','answertime','TIMEDIFF(answertime,calltime) as...

Ajax update of datatable from a modal after filtering

My question is very similar to this: Ajax update doesn't work, when using filter on datatable (JSF, Primefaces). I have a dataTable with an "Open" button (a commandButton) for each entry/row in the table, on click of which, a dialog will open. I have a form in the dialog that...

How to select rows from a DataTable where a Column value is within a List?,.net,,linq,datatable
Say you had a table in SQL and you wanted to find all the rows where a particular column could be one of 3 options. You could write something like this: SELECT * FROM MyTable WHERE uid IN (123, 456, 789) That's effectively what I want to do with a...

Bootstrap datatable pagination only showing buttons but not working in Grails

I am using Grails 2.4.2. and bootstrap datatable for Grails. All works fine for datatable in my index page except for pagination. It shows all the related buttons for pagination but don't paginate. Also there is another div where paginate also shown and work but not with datatable ? Here...

C# Get String From Data set Exception

I searched already & it isn't the issue to read Dataset , The issue is i done same but it is not working I Am trying to get complete name from Datasset, when i try following String Receiver_name = rec_Ds.Tables[0].Rows[0][First_Name].ToString() + " " + rec_Ds.Tables[0].Rows[0][Last_Name].ToString(); it gives ArgumentNullException was unHandeled...

filtering firstname and lastname using datatable.js

I have created a application with dataTable for filtering firstname and lastname, I am having a firstname and lastname text-field through which I would filter firstname and lastname. The filtering is working but the issue is that firstname and lastname filtering is doing from both the textfield, Actually I need...

Error occurred while convert the dataTable to excel. [duplicate]

This question already has an answer here: java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/RichTextString at org.primefaces.component.export.ExporterFactory.getExporterForType 2 answers I got these error message while click the export button in the sever. I can't convert that table. I used primeface 5.0 and netbeans 8.0.2 version and GlassFish server 4.1 How can i solve this problem?...

Stored Procedure for insert

I am taking a datatable as parameter in my stored procedure and I am trying to insert a few of its column in one of the database tables but I don't know the correct syntax. This is what I have tried ALTER PROCEDURE [dbo].[spInsertInvoice] @tblInvoice [TypeExcel] READONLY AS BEGIN SET...

datatable plugin not working

I am trying to use the DataTable plugin to add functionality to my html table. I followed the steps for installation and initialization from, but it is not adding any functionality to my html page. I am wondering if it is because my table is formatted in a way...

DataTable Modifies Date Format - WHY?

So I issue a test query like SELECT * from my table with a start_date column that has a Date data type. This query is then made into a DataTable, after which it's converted to a CSV file. In SSMS, the query returns only the date, as you can see...

Ajax Rerender working for selectOneMenu, but not input text

I'm a bit out of my element here, but I have two panelGroups, one that contains an input field of type text: <input type="text" value="#{myBean.value}" id="myId" > <a4j:support event="onchange" reRender="divToRerender" oncomplete="jsFunction()"/> </input> and another that contains a selectOneMenu: <h:selectOneMenu value="#{bean.value}" id="myId" > <f:selectItems value="#{myBean.options}" /> <a4j:support event="onchange" reRender="divToRerender" oncomplete="jsFunction()"/> </h:selectOneMenu>...

pick a random records from a datatable

I'm trying to create an application which import an excel file and read the data from it and it returns n records randomly as winners according to how many winners the user want from that list. so i read the data from excel file and assign it to a datatable...

a4j:support - Value retrieved from h:selectOneMenu is always NULL

There's a datatable with a h:selectOneMenu in each row. I want to be able to retrieve the value selected in the selectOneMenu in the bean. I'm using richfaces a4j:support tag to make AJAX calls to the backing bean. You can see the code below: DataTable header: <t:dataTable id="datatable" var="row" value="#{myBean.dataTableRows}">...

Splitting a Datatable based on Column value

I have a datatable containing a Bool(bit) Column. a b ------ ------ 1 10 0 20 1 30 0 20 1 10 I wish to split this into 2 independently sortable datatables based on this value (column a) I've had a look and found an old question: Split a DataTable...

Select and updating data from datatable

I select data from my datatable, by using following code,but it throws an exception am not familiar with. "Index was outside the bounds of the array." tblRooms.Select(IDRoom = 4) This is the value of IDRoom in thetblroom but I don't know why it causes an error. foreach (DataRow dr in...

Export DataTable to CSV File with “|” Delimiter

I am building an ASP.NET C# project that has a functionality to export DataTables to CSV files with a | delimiter for each cell. I want it to look like this: 100001|06/19/1861|Jose|Rizal|Filipino|Calamba, Laguna| 100002|08/30/1850|Marcelo|Del Pilar|Filipino|| 100003|||||| As you can see, each 'cell' is delimited by |. Furthermore, null cells should...

filtering not working from select

I have created a application with dataTable with fixed headers and sorting, the application is working fine but the issue is that I am having a name filtering through a drop-down, which is not working when I select a particular name. My code is given below. Can anyone please tell...

adjust the rows dynamically in paginator of primefaces datatable

I am using the primefaces datatable paginator. I have fixed the to no of rows to 15. This correctly matches the my system resolution. But users are using monitors with different(bigger) resolutions. The no of rows in this case will be less and space will be displayed at the bottom....

HIVE: apply delimiter until a specified column

I am trying to move data from a file into a hive table. The data in the file looks something like this:- StringA StringB StringC StringD StringE where each string is separated by a space. The problem is that i want separate columns for StringA, StringB and StringC and one...

Refresh selection model of p:datatable on row deselection

I have a problem with the selection model of a Primefaces 5.0 datatable. This selection model does not process deselection properly: Selection of rows adds these roles as expected to the list of selected rows. But a deselection has no influence on this list; deselected rows remains in it. Only...

Best way to remove duplicates from DataTable depending on column values

I have a DataSet which contains just one Table, so you could say I'm working with a DataTable here. The code you see below works, but I want to have the best and most efficient way to perform the task because I work with some data here. Basically, the data...

Primeface Datatable filtering removed when sorting with o:form includeRequestParams=“true”

this is an issue following this one: Primeface datatable.filter() and url parameter is use PrimeFaces-5.1 and omnifaces-2.1 to render a datatable with pagination, filtering and sorting while using request parameters. my datatable is constructed like this: <o:form includeRequestParams="true"> <p:dataTable id="hostStateHistoryTable" value="#{HostHistoryBean.hostStateHistoryList}" var="status" widgetVar="statusTable" filteredValue="#{HostHistoryBean.filteredHostStateHistoryList}" rowStyleClass="#{status.state eq 0 ? 'up' :...

RichFaces 4 ExtendedDataTable - Selecting rows programmatically

Good evening. I've been asked to update a web app that was implemented in RichFaces. The application has a rich:extendedDataTable inside of a composite component that displays some searchable data. The update I've been asked to implement is to have the first row in the table automatically selected when a...

highcharts datatable - function parameters

I want to display a datatable below my highcharts graphs. I found on the Highcharts FAQ a running example. Highcharts.drawTable = function() {...} I need to display many datatables, so i want to refactor my code in order to be able to give display parameters to the Highcharts.drawTable function. (this...

How to remove datatable from dataset?

Aspx code: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchCustomer.aspx.cs" Inherits="WebApplication1.eyeofheaven.SearchCustomer" %> <!DOCTYPE html> <html lang="en" xmlns=""> <head runat="server"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <link rel="stylesheet" type="text/css" href="StyleSheets/SearchCustomerStyle.css"> <link rel="stylesheet"...

jsf - foreign key in datatable

I'm showing a list of Orders in a datatable , and one of its columns must show the customer_id of that order: customer_id is a fk in ManyToOne relationship. Customer entity @Entity public class Customer { ///other columns @OneToMany(mappedBy = "cliente", fetch=FetchType.EAGER) private List<Order> orders; Order entity @Entity @Table(name =...

Binding a datagrid template column (as datepicker column) to a datatable column

I am building a database-access program that dynamically creates datagrid columns, as well as dynamically requests data based on account preferences. I have several datagrids that work in identical manners and for the most part they work perfectly. All of my text columns bind to the datatables that I use...

Add Column to DataTable before exporting to Excel file,excel,datatable,type-conversion,dataview
I have a DataTable that is built like this: Dim dt As New DataTable() dt = SqlHelper.ExecuteDataset(connString, "storedProcedure", Session("Member"), DBNull.Value, DBNull.Value).Tables(0) Then it is converted to a DataView and exported to Excel like this: Dim dv As New DataView() dv = dt.DefaultView Export.CreateExcelFile(dv, strFileName) I want to add another column...

Checkboxes will only work on current pagination page in jQuery datatables

I am using jquery data table for listing my content which have checkbox selection and selected content post the data but in submitted form only current page data sent. My Data table code is: $('#select').dataTable( { "order": [[ 2, "desc" ]], "lengthMenu": [[50, -1], [50, "All"]], "columnDefs": [ { orderable:...

JSF Composite Component with conditional popup panel

I'm trying to render a composite component that shows a popup panel based on the outcome of a backing bean method. So far no success. Would appreciate some help. GlassFish 4.1 Mojarra 2.2 RichFaces 4.5.4 Composite Component (conditionalActionLink.xhtml): <ui:component xmlns="" xmlns:h="" xmlns:f="" xmlns:a4j="" xmlns:rich="" xmlns:ui=""...

Primefaces datatable duplicate “No records found” while doing column freeze for empty records

I am using primefaces <p:datatable> to freeze some of my columns.Everything is fine but when there are no records in then it gives two "No records found" message.This is weird situation.Do anyone have come across this problem? Suggestions are welcome.I want only one "No records found " message. <p:dataTable var="car"...

How to append datatable to existing records in CSV file

I have CSV file MyFile.csv. It contains following data: RollNumber Name 1 Amol 2 Ravi Now I am fetching few records from SQL Server as follows: RollNumber Name 3 Viku 4 Vaibhav I am not able to find a way to append these new records to existing CSV file. I...

Improve DataGridView rows managing

SCENARIO I'm manually filling a DataGridView with a DataGridViewRow collection: I created the columns at design time in the GUI builder of Visual Studio. First column takes an Integer value, its a DataGridViewTextBoxColumn. Second column takes an Icon object, its a DataGridViewImageColumn. Third column takes a String value, its...

Convert DataTable into object[ , ] array with LINQ

I sincerely apologize if this has been asked before; maybe I am just blind and not finding it. Is it possible to convert a DataTable into an object[ , ] type array using LINQ? Using the following code I can convert it into object[][] but that's not what I need...

How to display PDF in JSF, with content from ServletResponse

In my application, I use jsf & richfaces, I want to display a generated pdf in web browser , I have generated this PDF in serverside and it is available in ServletResponse, but I am unable to display it in my web page. I have tried this question but, it...

Datatable show/hide sorting/paging

I have a problem with I want to show sorting/paging based on when the screnn width is over 700px and hide it when its under 700px. It works when i go from over 700px to under 700px but when i increase the width again the sorting/paging isnt showing again....

Updating Pagination for polling with dataTables object

I am using the latest DataTables, however I have not updated my code to use the new API... I am still using the Hungarian notation! I don't mind if answers use the new methods and notation, but I just wanted to frame the context of the question. ;) I have...

Missing Data after insert into my end sql table using Sql Bulk Copy

I wrote an console application that extracts data from my access table then using sql bulk copy to an temp sql table then from the temp table loads it into main sql table. the application works as expected but it extracts 26624 rows from access table and when it does...

DataTable.Rows returns second row in c#

Im reading excel sheet using oledbdatareader and convert to Datatable. So first few columns row in excel sheet tells information about the details of excel. Ex: Month ---- First Row Year --- Second Row Payment ---THird row Balance rows in that excel sheet have salary details of all employees. I...

ignoring jquery plugin datatables empty rows on post action to database with laravel 5

I have a laravel 5 app with jQuery datatables with 3 inputs in each table row. When I post them to be inserted the database I want to check that in each row at least 2 of the inputs are filled in before inserting. If at least two rows are...

With JQuery Datatable, how do you get the search/entries etc to be on the same line

I have copied an example from the datatable site which should put some of the controlling items on the same physical line. However for some reason they are appearing on separate physical lines. This is taking up too much of the screen space. see below I have the following script...

Return DataTable from ORACLE

I'm trying to get data from Oracle to a Datatable. My idea was to create a function to do all connection staff and then call it from other parts of the code. Like: dt = New DataTable dt = Oracle2table(sql.ToString) Then, I created the function: Function Oracle2table(ByVal sql As String)...

how to remove a row from datatable

I'm trying to remove/delete 1 row from datatable which has 100 rows like this: Form1.dt.Rows[i].Delete(); Form1.dt.AcceptChanges(); but further down when i get the count of the rows of the table like : int rc = Form1.dt.Rows.Count; the rc still returns 100! does Form1.dt.Rows[i].Delete(); clear the row and leave it empty...