Hide
Paul Christmann wrote:
I'm using dwr.utl.addRows to build a table. The data being rendered
has some blank values in it (the cellFuncs can return ""), resulting
in a table that has some blank cells: <td></td>
In Firefox and Safari, these tables render just fine. However, in
Internet Explorer, the tables render without the cell border - so the
blank valued cells look bad. The fix that works in all browsers is to
instead put the non-printable blank space in the cell:
<td> </td>.
First, I attempted to adjust my cellFuncs to return " " rather
than "" where I needed a blank. But then I ran into html escaping - I
ended up with <td>&nbp;</td>. I can get around this by setting
the escapeHtml option to false.
But then I'm left with two problems:
a) rendering a table without html escaping. I'd prefer the safety of
the html escaping, as I might have values that need it.
b) My cellFuncs functions start to get complicated. Right now, they
generally just return a property of a server object. Now, each of
those functions will have to test the return value for the server
property and decide to return something different.
Would you consider a patch to util.js such that the addRows method
(actually, the _addRowInner method) would set the innerHTML to " "
if the data is an empty string? I have been playing with such a patch
locally, and it works as I'd like it to.
Or is there another way to get this behavior?
Show
Paul Christmann wrote:
I'm using dwr.utl.addRows to build a table. The data being rendered
has some blank values in it (the cellFuncs can return ""), resulting
in a table that has some blank cells: <td></td>
In Firefox and Safari, these tables render just fine. However, in
Internet Explorer, the tables render without the cell border - so the
blank valued cells look bad. The fix that works in all browsers is to
instead put the non-printable blank space in the cell:
<td> </td>.
First, I attempted to adjust my cellFuncs to return " " rather
than "" where I needed a blank. But then I ran into html escaping - I
ended up with <td>&nbp;</td>. I can get around this by setting
the escapeHtml option to false.
But then I'm left with two problems:
a) rendering a table without html escaping. I'd prefer the safety of
the html escaping, as I might have values that need it.
b) My cellFuncs functions start to get complicated. Right now, they
generally just return a property of a server object. Now, each of
those functions will have to test the return value for the server
property and decide to return something different.
Would you consider a patch to util.js such that the addRows method
(actually, the _addRowInner method) would set the innerHTML to " "
if the data is an empty string? I have been playing with such a patch
locally, and it works as I'd like it to.
Or is there another way to get this behavior?