struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: TextProvider, Validation and ModelDriven
Date Sat, 14 Sep 2013 10:36:43 GMT
2013/9/13 Christoph Nenning <Christoph.Nenning@lex-com.net>:
> 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?

Have you tried to use the extension point: struts.xworkTextProvider ?

http://struts.apache.org/development/2.x/docs/plugins.html#Plugins-ExtensionPoints


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message