At 12:25 PM -0500 1/15/04, Mike Jasnowski wrote:
as long as it was clear, the distinction between a form bean missing because
it "should" be there, and a form bean missing because it was "optional". I
would think it might be better as a tag attr, because a form could be shared
with different actions, and it might be sticky if it's optional for "some"
but not all.

But here we're just talking about how the JSP tags work; in the nightly builds, the first thing the tag does is try to find a form bean by looking up the action to which it will be submitted. This is what throws an exception now if no bean is found. So it's not so much whether the form bean is shared or not, but whether the specific "receiving" action expects to get a Form Bean or not.


Within FormTag itself, this name is used to lookup a bean and put it into page scope for use by other form elements. Otherwise, it's only used to render the focus javascript, because to do the javascript you need a named form. I'd argue that if the "renderFocusJavascript()" method were called in the case when there were no form bean, that should throw a JspException.

The Nested subclasses of FormTag use the name -- I have never really used the nested tags, so I'm not sure what the implications of not having any name is to them.

For the other form elements, it generally seems the case that you could simply test for the presence of the form bean before doing the re-filling logic, and skip it when the bean is not defined.

I'm not yet persuaded of the need for any configuration to support this; just changes to any tag classes which currently depend on the bean being defined.

So far it seems like there aren't any strong objections, just some implementation details... but I'm not going to do anything about it just this minute (or even this week) so there's plenty of time for people to weigh in.

Now, at the risk of sidetracking this discussion, I have to bring up my other Struts pet-peeve -- the over complexity of pre-filling forms from data rather than from the request. I'm wondering if bringing up some questions about how the form bean is looked up gives me a chance to scratch that itch too...?

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining."
-- Jef Raskin


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



Reply via email to