scrolling changes the size of the ice datatable headers - icefaces

It seems like a bug in icefaces. Most of the forums(in 2008/9, I could not find any recent answers in forums) says some solutions to over come this, but none of them give a solution which we can add columns widths as percentages. So what I like to know is, is there a way that we can over come this.
Description of the problem
When we add a scroll to a datatable, the headers widths become mess. And there's a solution that we can add fixed widths in pixel (columnWidths attribute). But it is not supported in percentage. So I am asking is there a better solution for this. Because I want the datatable widths to be changed from screens to screen(different sizes)
please help

You could create a profile of column widths to match the entities that you want to display in your backing bean.
As icefaces does not support the column widths yet.
http://www.icefaces.org/docs/v1_8_1/tld/index.html

Related

MUI Datagrid truncating tables

I am currently developing a site where I am showing some data in a table. For that, I am using
#mui/x-data-grid
https://mui.com/x/react-data-grid/
and I am experiencing the following issue:
Basically, it seems that the width for each column is being truncated, normally to 100px which is the minWidth default value. I don't usually know how big this field could be so, using minWidth does not accomplish the solution as it keeps shortening the data at some point.
Is there any way to avoid this?
For example, in the image above, if the reference Q-24 is something like Q-12345678901234567890, it may end up truncated to Q-1234567...
Thanks in advance.
I ended up building my own component as it doesn't seem there is a built-in solution to my requirements.

How to check if a table will fit in current page or get split up in two pages in itext7

I am trying to create a table in a PDF document with itext7. But, if the content before the table is too big, the table gets split up between current page and next page. I want to insert a -
document.Add(new AreaBreak())
if there is not enough space left in the current page for the table to be inserted completely. However, I have no idea on how to calculate the available space.
Any help or pointers will be highly appreciated.
From your requirement to avoid page-break inside the table, I assume Table#setKeepTogether(boolean) is exactly what you need.
This property ensures that, if it's possible, elements with this property are pushed to the next area if they are split between areas.
This is not exactly what you have asked, however it seems it's what you want to achieve. Manually checking for this use case might be tricky. You would need to have a look at renderers mechanism and inner processing of iText layout in order to get available space left and space needed for the table. You would also need to take care of the cases like if table is to big to be fit on single page. Also #setKeepTogether(boolean) works when elements are nested inside each other.

LWUIT Table, constraint data

I am working in a table with multiple data inside. When I add only the header, I can see the data in a good way, and the columns with different sizes.
But when I add the data, all the columns go crazy, the widths are adjust to the headers, and the data dissapear.
How can I get to show every data in the proper way?
You need to derive table and override the method to create a cell then after a call to super set it to not end with 3 points.
You can also override the create constraint method and define percentages for the specific columns although this might not look good for all resolutions.
As a side note we made quite a few improvements to Table in Codename One and integrated basic Asha support as well.

JasperReports, Subreports row height synchronization

I have 2 subreports, each report contains information for one column of what is going to be the result table. As some entries are quite lengthy I gave the rows of both subreports a same generic height size that worked fine enough for the hurry, but now it looks quite ugly so they want me to change it. So I was wondering if is there a way to coordinate both subreports, so that the one with the tallest cell of a given entry dictates the width of all the row and it sends that information to the other subreport to adjust the size of that same entry, just like it would happen on a regular table in just one subreport. If this is possible or do I have to use iText to make it happen?
Thanks in advance.
I've worked a lot with jasper reports and I've given this a lot of thought, but I can't come up with an answer for how to make the subreports communicate a section height. I had composed an answer about using a Java class to define a static height that you could set and get, but then realized that you can't specify anything other than a simple numeric value for the height, i.e. there would be nowhere to call the method to get the height.
So, I have two possible recommendations which may or may not work depending on the implementation details for your reports.
The first recommendation would be to use a single report if at all possible, or at least a single "bottom row" below the two subreports.
If that won't work, then you could try using a minimal height value for both subreport sections, but with a Stretch Type of "Relative to Tallest Object". Then, although they may not be the same height, at least they wouldn't be too big. Depending again on the details, this might accomplish what you need.
Let me know if this works or not, maybe I can think of something else.

Advanced SWT table widgets

There are a couple of "advanced" table/spreadsheet SWT widgets out there (Nattable, Nebula Grid), but none of them support really large datasets. Nattable is the one which comes closest, but it still has limitations in the datatypes it uses causing the number of rows in the table to become far to limited.
I need to be able to represent at least 2^32 rows, preferrably 2^64.
SWT Matrix breaks the capacity bariers allowing any BigInteger amount of rows or columns. It is closed source, but free for private and non-commercial use. Early alpha release though at this point.
What's wrong with SWT.VIRTUAL with a reguar table? You can then use a LazyContentProvider, which gives you a callback for loading what's needed in the view.
Something like this...
TableViewertableViewer = new TableViewer(parent, SWT.VIRTUAL|SWT.BORDER|SWT.V_SCROLL);
// skipping the noise
tableViewer.setItemCount(100000);
tableViewer.setContentProvider(new LazyContentProvider());
tableViewer.setLabelProvider(new TableLabelProvider());
tableViewer.setUseHashlookup(true);
tableViewer.setInput(null);