| Issue 195: | Empy cells don't show border | |
| 1 person starred this issue and may be notified of changes. | Back to list |
The way that the empty cells are rendered (as </td> ) makes them not able
to have border.
If you set this as in a example of the Renderes wiki page:
table.getTableRenderer().setBorder("1px");
(And you disable the default coloured borders that the cells have)
The empty cells won't have border. This is a CSS problem between the
browsers, I think. You can fix it in Firefox like this:
.jmesa .table {
empty-cells: show;
}
But that doesn't work in IE6 or IE7.
Is there any chance that the empty cells would be rendered like this?
<td>   </td>
I think this may fix the problem, not having to wait for IE8 that seems to
follow the necesary CSS standard for "empty-cells".
Someone correct me if I'm wrong
Cheers,
Alex
May 13, 2009
This is a good improvement, and actually something that I thought was already in place. Good catch! I will implement this on the trunk this weekend. Feel free to submit code patches (as a file) as well. All the IDE's make it very easy to do and it is the easiest way for me to integrate changes.
Status:
Accepted
Labels: -Type-Defect Type-Enhancement
May 14, 2009
Hi again. If the change is finally discarded (because is not a good standard or
something else) there is another CSS pure solution (but a bit hack) to make the empty
cells have border. The CSS would look like this:
.jmesa .table {
empty-cells: show; /* For Firefox, standard CSS 2.1 */
}
/* For IE6 */
* html .jmesa .table{
border-collapse: collapse;
}
/* For IE7*/
*:first-child+html .jmesa .table
{
border-collapse: collapse;
}
Hope this helps somebody.
May 15, 2009
Have it implemented on the trunk.
May 15, 2009
(No comment was entered for this change.)
Status:
Fixed
|
Maybe something like this in the HtmlCellRendererImpl? public Object render(Object item, int rowcount) { HtmlBuilder html = new HtmlBuilder(); html.td(2); html.width(getColumn().getWidth()); html.style(getStyle()); html.styleClass(getStyleClass()); html.close(); String property = getColumn().getProperty(); Object value = getCellEditor().getValue(item, property, rowcount); if (value != null) { html.append(value.toString()); } //***************** else { html.nbsp(); } //***************** html.tdEnd(); return html.toString(); }