Hi,

This is mainly an email to document my problems with upgrading several applications from 1.0 to 1.1 so that others might find solutions to these problems quicker than I! I just upgraded three applications with a total of approximately 500 pages and it was quite painful.

Firstly I'd like to that the removal of the "deprecated HTML attributes" like align/width etc. was a bad idea in my opinion. While those aren't the preferred way to do styling any more they are perfectly valid HTML. It unfortunately took quite a while to track down all uses of now-verboten attributes and fix them up. Not a huge deal, but time consuming and of absolutely no value to me or my client.

Secondly, and much more painful, after upgrading nearly all of my display:tables starting throwing NullPointerExceptions! The top few lines of stack trace are included here:

java.lang.NullPointerException
at org.displaytag.util.MultipleHtmlAttribute.addAllAttributesFromArray (MultipleHtmlAttribute.java:56) at org.displaytag.util.MultipleHtmlAttribute.<init> (MultipleHtmlAttribute.java:45)
        at org.displaytag.model.Row.getOpenTag(Row.java:146)
at org.displaytag.render.HtmlTableWriter.writeRowOpener (HtmlTableWriter.java:246) at org.displaytag.render.TableWriterTemplate.writeTableBody (TableWriterTemplate.java:346) at org.displaytag.render.TableWriterTemplate.writeTable (TableWriterTemplate.java:133) at org.displaytag.render.HtmlTableWriter.writeTable (HtmlTableWriter.java:643) at org.displaytag.tags.TableTag.writeHTMLData(TableTag.java: 1549)
        at org.displaytag.tags.TableTag.doEndTag(TableTag.java:1218)

After much hunting around this turned out to be caused by (as far as I could tell) our applications having a displaytag.properties file that did *not* contain entries for "css.tr.even" and "css.tr.odd". Why this should be I don't know. 1.0 certainly allowed you to specify only those values you were interested in, and the documentation for 1.1 clearly states that if these values are not specified they default to "even" and "odd" respectively. I did some searching around on this and turned up nothing which makes me wonder if there is another factor at play here, but either way this made it most definitely not a "drop-in-replacement" for 1.0!!

In tracking all this down I ended up grabbing the source for display tag so I could debug what was going on (never a good sign). To my dismay it appears that the only way to get the source is through svn. Is that true? The distributions do not appear to contain source in any form. It'd be nice to include the source in the .zip and .tgz even if it's not a full build environment.

Anyway, I have it all working now, but I thought the developers and others might like to know about these problems!

-t


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to