You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Josh Cronemeyer <jo...@ink.org> on 2005/08/22 18:18:50 UTC

Validator's indexedListProperty

Hi,

I've been playing with the indexedListProperty to validate what a user has
selected in my forms.  The problem I am having is that when an error message
gets returned, It does not get associated with the form element
(<html:multibox property="test"> in my case).  I think the problem is that
the message comes back with a key of test[x] where x is the index of the
error.  If I just print out my error messages like this <html:errors/> I can
see the error message, but <html:errors property="test"/> doesn't show
anything.  It seems like the <html:errors> tag should have an
indexedListProperty parameter as well so I can display my error messages
correctly.  What am i missing?

Regards,

josh cronemeyer

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


Re: Validator's indexedListProperty

Posted by Josh Cronemeyer <jo...@ink.org>.
Ok, Looks like at least a few other people have found Struts guilty here.  I
have found a existing bug report 23372
http://issues.apache.org/bugzilla/show_bug.cgi?id=23372 that deals with this.
Basically Validator can handle indexed properties, but the indexed error
messages that it creates cannot be handled by the Struts custom JSP taglibs.
Perhaps I can write some custom taglibs to work around this.  On the subject
of custom taglibs if anyone is interested I have created a simple tutorial
based on a custom struts tag I created.  It is a custom <div> tag that lets
you change the class or id of the div when there are errors for the given
property.  Here is the link.  http://www.cuberick.com/?p=2  Lemme know if you
have any suggestions or questions.

On Mon, Aug 22, 2005 at 03:52:30PM -0500, Josh Cronemeyer wrote:
> On Mon, Aug 22, 2005 at 11:18:50AM -0500, Josh Cronemeyer wrote:
> > Hi,
> > 
> > I've been playing with the indexedListProperty to validate what a user has
> > selected in my forms.  The problem I am having is that when an error message
> > gets returned, It does not get associated with the form element
> > (<html:multibox property="test"> in my case).  I think the problem is that
> > the message comes back with a key of test[x] where x is the index of the
> > error.  If I just print out my error messages like this <html:errors/> I can
> > see the error message, but <html:errors property="test"/> doesn't show
> > anything.  It seems like the <html:errors> tag should have an
> > indexedListProperty parameter as well so I can display my error messages
> > correctly.  What am i missing?
> > 
> > Regards,
> > 
> > josh cronemeyer
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> >
> I've looked all over in the struts user guide and googled for information on
> this.  It appears that while the validator can handle validation of indexed
> beans in forms, the struts JSP taglibs cannot handle the resulting indexed
> messages.  Could this be a bug?  It sure looks that way.
> 
> Thanks, 
> josh cronemeyer 
> 
> ---------------------------------------------------------------------
> 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


Re: [OT] Re: Validator's indexedListProperty

Posted by Dave Newton <ne...@pingsite.com>.
Josh Cronemeyer wrote:

>I'm having some problems with mutt or imapfilter or something. I'm getting
>all the email I send to list list except ones with the subject of this
>thread.  It is really weird.
>  
>
Technology: Improving our lives one reboot at a time.

Dave



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


Re: [OT] Re: Validator's indexedListProperty

Posted by Josh Cronemeyer <jo...@ink.org>.
On Wed, Aug 24, 2005 at 05:13:28PM -0400, Dave Newton wrote:
> Dave Newton wrote:
> 
> >Feel free to assume we've all seen it three times now.
> 
> I meant four.
> 
> Dave
> 

*hat in hand*

I'm having some problems with mutt or imapfilter or something. I'm getting
all the email I send to list list except ones with the subject of this
thread.  It is really weird.  Didn't mean to make you all see double, 
uh i mean quadruple.  Shame on me!

-josh
> 
> 
> ---------------------------------------------------------------------
> 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


[OT] Re: Validator's indexedListProperty

Posted by Dave Newton <ne...@pingsite.com>.
Dave Newton wrote:

> Feel free to assume we've all seen it three times now.

I meant four.

Dave



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


Re: Validator's indexedListProperty

Posted by Dave Newton <ne...@pingsite.com>.
Josh Cronemeyer wrote:

>Looks like at least a few other people have this same issue I do.  I
>have found a existing bug report 23372 
>http://issues.apache.org/bugzilla/show_bug.cgi?id=23372 that deals with this.
>Basically Validator can handle indexed properties, but the indexed error
>messages that it creates cannot be handled by the Struts custom JSP taglibs.
>Perhaps I can write some custom taglibs to work around this.  On the subject
>of custom taglibs if anyone is interested I have created a simple tutorial
>based on a custom struts tag I created.  It is a custom <div> tag that lets
>you change the class or id of the div when there are errors for the given
>property.  Here is the link.  http://www.cuberick.com/?p=2  Lemme know if you
>have any suggestions or questions.
>
>
>Hmm, I don't know where my emails are ending up, but this is my 3rd attempt
>to respond to this (my own) thread.
>  
>
They're ending up on the list :/

Feel free to assume we've all seen it three times now.

Dave



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


Re: Validator's indexedListProperty

Posted by Josh Cronemeyer <jo...@ink.org>.
Looks like at least a few other people have this same issue I do.  I
have found a existing bug report 23372 
http://issues.apache.org/bugzilla/show_bug.cgi?id=23372 that deals with this.
Basically Validator can handle indexed properties, but the indexed error
messages that it creates cannot be handled by the Struts custom JSP taglibs.
Perhaps I can write some custom taglibs to work around this.  On the subject
of custom taglibs if anyone is interested I have created a simple tutorial
based on a custom struts tag I created.  It is a custom <div> tag that lets
you change the class or id of the div when there are errors for the given
property.  Here is the link.  http://www.cuberick.com/?p=2  Lemme know if you
have any suggestions or questions.


Hmm, I don't know where my emails are ending up, but this is my 3rd attempt
to respond to this (my own) thread.

-josh


On Mon, Aug 22, 2005 at 03:52:30PM -0500, Josh Cronemeyer wrote:
> On Mon, Aug 22, 2005 at 11:18:50AM -0500, Josh Cronemeyer wrote:
> > Hi,
> > 
> > I've been playing with the indexedListProperty to validate what a user has
> > selected in my forms.  The problem I am having is that when an error message
> > gets returned, It does not get associated with the form element
> > (<html:multibox property="test"> in my case).  I think the problem is that
> > the message comes back with a key of test[x] where x is the index of the
> > error.  If I just print out my error messages like this <html:errors/> I can
> > see the error message, but <html:errors property="test"/> doesn't show
> > anything.  It seems like the <html:errors> tag should have an
> > indexedListProperty parameter as well so I can display my error messages
> > correctly.  What am i missing?
> > 
> > Regards,
> > 
> > josh cronemeyer
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> >
> I've looked all over in the struts user guide and googled for information on
> this.  It appears that while the validator can handle validation of indexed
> beans in forms, the struts JSP taglibs cannot handle the resulting indexed
> messages.  Could this be a bug?  It sure looks that way.
> 
> Thanks, 
> josh cronemeyer 
> 
> ---------------------------------------------------------------------
> 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


Re: Validator's indexedListProperty

Posted by Josh Cronemeyer <jo...@ink.org>.
Ok, Looks like at least a few other people have found Struts guilty here.  I
have found a existing bug report 23372
http://issues.apache.org/bugzilla/show_bug.cgi?id=23372 that deals with this.
Basically Validator can handle indexed properties, but the indexed error
messages that it creates cannot be handled by the Struts custom JSP taglibs.
Perhaps I can write some custom taglibs to work around this.  On the subject
of custom taglibs if anyone is interested I have created a simple tutorial
based on a custom struts tag I created.  It is a custom <div> tag that lets
you change the class or id of the div when there are errors for the given
property.  Here is the link.  http://www.cuberick.com/?p=2  Lemme know if you
have any suggestions or questions.

On Mon, Aug 22, 2005 at 03:52:30PM -0500, Josh Cronemeyer wrote:
> On Mon, Aug 22, 2005 at 11:18:50AM -0500, Josh Cronemeyer wrote:
> > Hi,
> > 
> > I've been playing with the indexedListProperty to validate what a user has
> > selected in my forms.  The problem I am having is that when an error message
> > gets returned, It does not get associated with the form element
> > (<html:multibox property="test"> in my case).  I think the problem is that
> > the message comes back with a key of test[x] where x is the index of the
> > error.  If I just print out my error messages like this <html:errors/> I can
> > see the error message, but <html:errors property="test"/> doesn't show
> > anything.  It seems like the <html:errors> tag should have an
> > indexedListProperty parameter as well so I can display my error messages
> > correctly.  What am i missing?
> > 
> > Regards,
> > 
> > josh cronemeyer
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> >
> I've looked all over in the struts user guide and googled for information on
> this.  It appears that while the validator can handle validation of indexed
> beans in forms, the struts JSP taglibs cannot handle the resulting indexed
> messages.  Could this be a bug?  It sure looks that way.
> 
> Thanks, 
> josh cronemeyer 
> 
> ---------------------------------------------------------------------
> 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


Re: Validator's indexedListProperty

Posted by Josh Cronemeyer <jo...@ink.org>.
On Mon, Aug 22, 2005 at 11:18:50AM -0500, Josh Cronemeyer wrote:
> Hi,
> 
> I've been playing with the indexedListProperty to validate what a user has
> selected in my forms.  The problem I am having is that when an error message
> gets returned, It does not get associated with the form element
> (<html:multibox property="test"> in my case).  I think the problem is that
> the message comes back with a key of test[x] where x is the index of the
> error.  If I just print out my error messages like this <html:errors/> I can
> see the error message, but <html:errors property="test"/> doesn't show
> anything.  It seems like the <html:errors> tag should have an
> indexedListProperty parameter as well so I can display my error messages
> correctly.  What am i missing?
> 
> Regards,
> 
> josh cronemeyer
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>
I've looked all over in the struts user guide and googled for information on
this.  It appears that while the validator can handle validation of indexed
beans in forms, the struts JSP taglibs cannot handle the resulting indexed
messages.  Could this be a bug?  It sure looks that way.

Thanks, 
josh cronemeyer 

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