You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Darius Ghanipour <dg...@ventera.com> on 2003/09/17 03:41:53 UTC

on validation fail

I'm using the struts validator for a page that displays some bean
properties as plain text (not in an input field).
My problem is when validation fails, the flow is returned to the same
page except the request is reset and by bean is gone!  Thus I can't
display the page as before with the addition of an error message.
Is there a way to return the request while maintaining all its
attributes or is there a workaround to this problem?
The only thing I can think of is extending the ActionServlet.

I would appreciate any help.
Thanks in advance,
Darius

Re: How to pull messages from multiple Bundles?

Posted by Daniel Wang <dd...@anomaly.net>.
I don't believe you can.
<html:errors> or <html:messages> can only accept a single message bundle.

daniel

"manglu" <ma...@eutama.com> wrote in message
news:3F68D820.8080101@eutama.com...
> Thomas,
>
> You didn't get the question.
>
> I understand that multiple bundles can be used in bean:write or other
> tags that understand i18n.
>
> Question is:
>
> Application identifies two errors-
> errors.invalid (found in bundle1)
>
> invalid.amount (found in bundle2)
>
> When i create these errors and add it to the request scope how do i tell
> it which bundle do these keys exist in?
>
> If i say html:errors to display my errors how would it know that one of
> the error keys is from bundle1 while the other is from bundle2?
>
> Hope that clarifies the question
>
> Manglu
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Re: on validation fail

Posted by Daniel Wang <dd...@anomaly.net>.
I can't imagine why you would need to use validation when there's no user
input involved, but...

- you can put all the values of your bean in <html:hidden> so they get
resubmitted
or
- you can put the bean in the session

daniel

----- Original Message ----- 
From: "Darius Ghanipour" <dg...@ventera.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, September 16, 2003 6:41 PM
Subject: on validation fail


I'm using the struts validator for a page that displays some bean
properties as plain text (not in an input field).
My problem is when validation fails, the flow is returned to the same
page except the request is reset and by bean is gone!  Thus I can't
display the page as before with the addition of an error message.
Is there a way to return the request while maintaining all its
attributes or is there a workaround to this problem?
The only thing I can think of is extending the ActionServlet.

I would appreciate any help.
Thanks in advance,
Darius


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