What I learned from using displaytag and appFuse

I am currently writing a web-app using appFuse and it’s going great so far. However; I faced some issues with displayTag used by default in appFuse for table display, sorting and export among other things.

The latest displayTag  release is 1.2 (some years ago) and the svn source code hasn’t been updated since 2011 (not sure).

Most of my issues came as follows:

1- Sorting and export will never work unless you specify requestURI=”” in the display:table tag

(this is not really an issue but a thing with appFuse and displayTag  ).

Although the documentation doesn’t specifically say it (userList.jsp for example uses it and in appFuse FAQ they use it):

requestURI false true java.lang.String When the present, links for sorting, exports, and paging are formed by adding any tag generated parameters to the value of requestURI attribute.

What happens if you removed it is that the context url will be appended to the added url paramenters (generated by displayTag  for sorting) and your url will be redirected to 404.

2- Specific displayTag  issues were in the form of swallowed exceptions to never appear in the logs of displayTag (no matter what log level is set).

For example: I had to debug line by line when I faced one of those appFuse Yikes! upon page open only to know that

in TableTag.describeEmptyTable()

objectProperties = BeanUtils.describe(iteratedObject);
catch (Exception e)
log.warn("Unable to automatically add columns: " + e.getMessage(), e);

will never show real causes but only a warn message. There is an open bug at the specific location.

3- I had to make some dummy copies of my models specifically for displayTag as I could not figure out why some form of ArrayLists failed while others were properly displayed.

(Again, this is not necessary a bad thing with displayTag  , may be my lack of knowledge and experience from my side, but when one finds it hard to make common things work; it becomes annoying).

I faced other issues with displayTag  , however handy it came. Although I prefer using a pure JS approach for view tables, I think at a certain time that some people did not favor the JS option and displayTag  seemed the library to use.

And this is the cool thing about appFuse, it does not tie anyone to anything, so you can use a pure JS approach for view tables or you can just stick with displayTag  .

In my case, I dropped the usage of Struts Validation in favor of Hibernate Validator for my parts without affecting anything already present in appFuse (this is both a good thing in appFuse and both validation frameworks).

Having said all that, I wish that appFuse provided some Play Framework option as one of the provided Web-Frameworks (not that it’s not doable now but it requires some work) especially since Mr. Raible is a Play Framework user and advocate.

Well all-in-all, I think many developers are grateful for what appFuse already is and already offers especially since it’s open-source, community driven and provides the boot-plate for most Java Web projects.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s