• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems with displaytags and validations

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I looked through the topics about displaytags on this forum and on other forums but still havent found the answer to my problem. Of course I tried to solve it myself.

I use displaytags in an application and it works as it should with one mayor issue, the export to excel and pdf dont work. Displaytags doesnt work with my regex validations. I want the swedish letter �, � and � to be allowed. But when I put the displaytag filter first in web.xml the validation dont accept �,� and �, but otherwise it runs as wanted.

And if I put the displaytag after the action2-cleanup filter most of the exports dont work, but the reg ex work so I can write �, � and �.

The validations is the opensymphony validations. Here is a sample of the actionclass code and some jsp.

Action class:

@Validations(regexFields = {@RegexFieldValidator(fieldName = "firstname", message = "Ogiltigt tecken")},

JSP:

<display:table name="students" id="studentrow" class="dataTable" cellspacing="0" export="true" requestURI="" defaultsort="1">
<s:set name="myrow" value="#attr.studentrow"/>
<display:column property="id" title="Id" sortable="true"/>
<display:column property="firstname" title="F�rnamn" sortable="true" />
<display:column property="lastname" title="Efternamn" sortable="true" />
<display:column property="streetaddress" title="Gatuadress" sortable="true"/>
<display:column property="zipcode.zipcode" title="Postnr" sortable="true"/>
<display:column property="zipcode.ziparea.name" title="Postort" sortable="true"/>
<s:if test="displayInactive">
<display:column property="activestate" title="Status" sortable="true"/>
</s:if>
</display:table>

Hope you understand what I mean and that someone has an idea how to solve it.

Thanks in advance!
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To Export the data grid to Excel and Pdf you can use display tag. You can download a sample example here. Export To Excel And PDF Using Display Tag
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic