You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by al so <vo...@gmail.com> on 2012/08/23 16:01:42 UTC
sample struts JSP for dependency validation among user input fields..
Assuming one wants to build a simple UI with following components:
Checkbox A
TextInput B
SelectionList C ( E, F, G as dropdown items)
TextInput D
Here is the required validation:
If A is checked, enable modification of all other fields.
If A is unchecked, disable modification of all other fields
If E is chosen from C, disable modification of D
For all other items in C, enable modification of D
Is there a sample Struts 2.0 based JSP/taglib which can perform the above
validations?
Re: sample struts JSP for dependency validation among user input fields..
Posted by Dave Newton <da...@gmail.com>.
Validators aren't intended to prevent values from being changed, and it
doesn't do anything for the UI side--why allow a field to be changed if
it's not legally changeable?
Dave
On Thu, Aug 23, 2012 at 10:28 AM, al so <vo...@gmail.com> wrote:
> alternatively, how about using
> com.opensymphony.xwork2.validator.validators?
>
> On Thu, Aug 23, 2012 at 7:05 AM, Dave Newton <da...@gmail.com>
> wrote:
>
> > This would be all via JavaScript.
> >
> > There's no tag library that would do this declaratively, out of the box.
> > The JavaScript would be standard JavaScript, examples of things like this
> > abound.
> >
> > Dave
> >
> > On Thu, Aug 23, 2012 at 10:01 AM, al so <vo...@gmail.com> wrote:
> >
> > > Assuming one wants to build a simple UI with following components:
> > > Checkbox A
> > > TextInput B
> > > SelectionList C ( E, F, G as dropdown items)
> > > TextInput D
> > >
> > > Here is the required validation:
> > > If A is checked, enable modification of all other fields.
> > > If A is unchecked, disable modification of all other fields
> > > If E is chosen from C, disable modification of D
> > > For all other items in C, enable modification of D
> > >
> > >
> > > Is there a sample Struts 2.0 based JSP/taglib which can perform the
> above
> > > validations?
> > >
> >
> >
> >
> > --
> > e: davelnewton@gmail.com
> > m: 908-380-8699
> > s: davelnewton_skype
> > t: @dave_newton <https://twitter.com/dave_newton>
> > b: Bucky Bits <http://buckybits.blogspot.com/>
> >
>
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
Re: sample struts JSP for dependency validation among user input fields..
Posted by al so <vo...@gmail.com>.
alternatively, how about using com.opensymphony.xwork2.validator.validators?
On Thu, Aug 23, 2012 at 7:05 AM, Dave Newton <da...@gmail.com> wrote:
> This would be all via JavaScript.
>
> There's no tag library that would do this declaratively, out of the box.
> The JavaScript would be standard JavaScript, examples of things like this
> abound.
>
> Dave
>
> On Thu, Aug 23, 2012 at 10:01 AM, al so <vo...@gmail.com> wrote:
>
> > Assuming one wants to build a simple UI with following components:
> > Checkbox A
> > TextInput B
> > SelectionList C ( E, F, G as dropdown items)
> > TextInput D
> >
> > Here is the required validation:
> > If A is checked, enable modification of all other fields.
> > If A is unchecked, disable modification of all other fields
> > If E is chosen from C, disable modification of D
> > For all other items in C, enable modification of D
> >
> >
> > Is there a sample Struts 2.0 based JSP/taglib which can perform the above
> > validations?
> >
>
>
>
> --
> e: davelnewton@gmail.com
> m: 908-380-8699
> s: davelnewton_skype
> t: @dave_newton <https://twitter.com/dave_newton>
> b: Bucky Bits <http://buckybits.blogspot.com/>
>
Re: sample struts JSP for dependency validation among user input fields..
Posted by Dave Newton <da...@gmail.com>.
This would be all via JavaScript.
There's no tag library that would do this declaratively, out of the box.
The JavaScript would be standard JavaScript, examples of things like this
abound.
Dave
On Thu, Aug 23, 2012 at 10:01 AM, al so <vo...@gmail.com> wrote:
> Assuming one wants to build a simple UI with following components:
> Checkbox A
> TextInput B
> SelectionList C ( E, F, G as dropdown items)
> TextInput D
>
> Here is the required validation:
> If A is checked, enable modification of all other fields.
> If A is unchecked, disable modification of all other fields
> If E is chosen from C, disable modification of D
> For all other items in C, enable modification of D
>
>
> Is there a sample Struts 2.0 based JSP/taglib which can perform the above
> validations?
>
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>