> Interesting idea.  Let's do a bit of mental exploration of what
> actually happens to see how practical it is.  When does a Struts
> custom tag actually execute?  Only when the page is being rendered, as
> the various HTML elements get produced.  Now, when does (server side)
> validation need to happen?  On the subsequent form submit (the actual
> call to invoke the server side validator is one of the things that
> RequestProcessor does).
>
> Hmm ..... there's no "tag" there to do the validation for me ....
> maybe I need a component model to encapsulate both the rendering and
> the validating behavior ... wonder where I can find one of those?  :-)

Thought of that.  Then i thought... why not just stick the validationion
requirements into the session when you render the tags, then they'd
magically be there when you need to validate it!  You also know what
properties need to be provided by the proxy bean.

There's one more bonus of this - it wouldnt break backwards compatibility,
which seems to be a requirement for struts development :(

My reasoning behind all this stuff, is i HATE all these xml config files.
Or more accurately, I like xml config files, but I hate moving between X
different xml files.  It might suit IDEs, but it aint right for humans!
You've got a jsp page with <html:text> - why cant i put validation, type
(for dynamic bean handling), etc there, rather than looking at various
different xml files.

>
> >
> > Then you eliminate actionforms as all the validation info is in
> the form,
> > and can be automcatically done for you, and then use can use
> dynamic proxies
> > to provide properly typed javabeans as output from a form, and use the
> > models DTOs to put data into forms!
>
> You just described the most common design pattern for using JSF :-).

One of these days i will find some time to look at jsf/shale properly.  Been
saying that for quite a while, just never got round to it!

Daniel.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to