struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Nenning <Christoph.Nenn...@lex-com.net>
Subject TextProvider, Validation and ModelDriven
Date Fri, 13 Sep 2013 13:08:35 GMT
Dear List,


when an application uses a custom TextProvider it seems not to be used for 
validation errors. And if an Action is ModelDriven it behaves different 
again.

Here is a sample app for that:
https://github.com/wolpi/struts2-samples/tree/master/modeldriven-and-textprovider


This sample has these Objects on ValueStack:
- Model
- CustomTextProvider
- Action
- DefaultTextProvider

In hello.jsp three texts are shown:
- Just a normal text via <s:text>. That text is resolved via 
CustomTextProvider (as expected).
- A validation error of an action member. That text is resolved via the 
action itself, what I would not expect.
- A validation error of a model member. That text is tried to be resolved 
via DefaultTextProvider, what I would not expect either.


Am I doing something wrong here?


Regards,
Christoph

This Email was scanned by Sophos Anti Virus

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message