You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Emond Papegaaij <e....@emaxx.nl> on 2005/05/31 15:26:10 UTC

Struts-faces and conversion errors

Hello,

I'm currently evaluating Struts in combination with JSF for use in our 
company. As a simple test-case I decided to convert the example application 
from the JSF tutorial (the number guessing game). All works very well, except 
for one issue: conversion messages.

The form holding the entered number has get- and set-methods of type 
'Integer'. When a user enters a non-integer value in the form, JSF gives a 
conversion error. This error is rendered with a 'h:message' tag. However, 
other validation is done with the Struts validator framework (a single 
'intRange' validator). These messages are rendered with the 's:errors' tag. 
This means I have to use two tags to render error messages. Changing the 
types of the get- and set-methods to 'String' will cause the error to show up 
in 's:errors', but this solution is of course not optimal. Is possible to 
have the JSF model population errors show up under the 's:errors' tag?

Best regards,
Emond Papegaaij

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


Re: Struts-faces and conversion errors

Posted by Emond Papegaaij <e....@emaxx.nl>.
On Tuesday 31 May 2005 22:45, Craig McClanahan wrote:
> It would be technically feasible to make <s:serrors> display the JSF
> conversion and validation messages (stored in FacesContext) as well as
> the Struts-specific ones.  Could you please file an enhancement
> request in our issue tracking system?
>
> http://issues.apache.org/bugzilla/

Thanks for your quick reply. I've filed the enhancement request:
http://issues.apache.org/bugzilla/show_bug.cgi?id=35179

Best regards,
Emond Papegaaij

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


Re: Struts-faces and conversion errors

Posted by Craig McClanahan <cr...@gmail.com>.
It would be technically feasible to make <s:serrors> display the JSF
conversion and validation messages (stored in FacesContext) as well as
the Struts-specific ones.  Could you please file an enhancement
request in our issue tracking system?

http://issues.apache.org/bugzilla/

Craig


On 5/31/05, Emond Papegaaij <e....@emaxx.nl> wrote:
> Hello,
> 
> I'm currently evaluating Struts in combination with JSF for use in our
> company. As a simple test-case I decided to convert the example application
> from the JSF tutorial (the number guessing game). All works very well, except
> for one issue: conversion messages.
> 
> The form holding the entered number has get- and set-methods of type
> 'Integer'. When a user enters a non-integer value in the form, JSF gives a
> conversion error. This error is rendered with a 'h:message' tag. However,
> other validation is done with the Struts validator framework (a single
> 'intRange' validator). These messages are rendered with the 's:errors' tag.
> This means I have to use two tags to render error messages. Changing the
> types of the get- and set-methods to 'String' will cause the error to show up
> in 's:errors', but this solution is of course not optimal. Is possible to
> have the JSF model population errors show up under the 's:errors' tag?
> 
> Best regards,
> Emond Papegaaij
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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