RE: why are form beans required for html:form?

2004-01-22 Thread Joe Germuska
Next, James Stachan will insist we need a way to use Groovy for actions :-).

(A smiley only because I always smile when seeing how passionate 
James gets when
he talks about Groovy -- it's actually a pretty good idea.)
http://groovy.codehaus.org/bsf.html

:-)

James' passion for any project he takes on is pretty inspiring.  Not 
to mention that he produces great stuff!

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]


RE: why are form beans required for html:form?

2004-01-22 Thread Craig R. McClanahan
Quoting Ted Husted <[EMAIL PROTECTED]>:

> 
> 
> >> Heck, if you throw the JSF extension into the mix, I wager you
> >> could write significant Struts applications now without writing
> >> any Java code at all. :)
> >>
> >> http://struts.sourceforge.net/struts-bsf/index.html
> >>
> >
> > I have in fact thrown the BSF extension into the mix, and I'm
> > pretty excited about it!
> 
> Yep. Lost track of who I was chatting with :)
> 
> 

Next, James Stachan will insist we need a way to use Groovy for actions :-).

(A smiley only because I always smile when seeing how passionate James gets when
he talks about Groovy -- it's actually a pretty good idea.)

> > Joe
> 
> 

Craig


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



RE: why are form beans required for html:form?

2004-01-18 Thread Ted Husted
On Sun, 18 Jan 2004 21:55:19 -0600, Joe Germuska wrote:
>> A JSP author should be able to define one without any problem.
>> And the one suggested here, could be a standard part of your
>> team's starter Struts config.
>>
>
> Well, I just want it all NOW and we're already piling a lot onto
> the people who are making JSPs (who, by the way, don't quite fit
> the profile of "JSP author" as in the way that Sun and others split
> it up -- these folks don't write their own JavaScript either --
> yet.)
>
> Actually, my guinea pig... er, first "student" has managed to do a
> few pretty decent configuration tasks on her own already.

If they are writing Struts JSPs, then you must be handling them some type of default 
web application that imports the tags. It can just as easily include the default, 
blank DynaBean they can use with whatever forms they happen to be writing. Remember, 
the one form-bean can be used with any number of forms. This doesn't create any 
additional work for the JSP author.

Learning JSP authors DynaBeans can actually *save* JSP authors a lot of work. I often 
do full storyboards that gather and validate input from forms before writing any 
Action classes at all. Just straight Struts JSPs. This lets you demonstrate a huge 
hunk of the screen requirements up front, in live code that can rollover into the 
working application.


>> Heck, if you throw the JSF extension into the mix, I wager you
>> could write significant Struts applications now without writing
>> any Java code at all. :)
>>
>> http://struts.sourceforge.net/struts-bsf/index.html
>>
>
> I have in fact thrown the BSF extension into the mix, and I'm
> pretty excited about it!

Yep. Lost track of who I was chatting with :)


> Joe




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



RE: why are form beans required for html:form?

2004-01-18 Thread Joe Germuska
A JSP author should be able to define one without any problem. And 
the one suggested here, could be a standard part of your team's 
starter Struts config.
Well, I just want it all NOW and we're already piling a lot onto the 
people who are making JSPs (who, by the way, don't quite fit the 
profile of "JSP author" as in the way that Sun and others split it up 
-- these folks don't write their own JavaScript either -- yet.)

Actually, my guinea pig... er, first "student" has managed to do a 
few pretty decent configuration tasks on her own already.

Heck, if you throw the JSF extension into the mix, I wager you could 
write significant Struts applications now without writing any Java 
code at all. :)

http://struts.sourceforge.net/struts-bsf/index.html
I have in fact thrown the BSF extension into the mix, and I'm pretty 
excited about it!

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]


RE: why are form beans required for html:form?

2004-01-16 Thread Ted Husted
DynaBeans are specified in the Struts-Config. They are not Java classes that an 
engineer needs to writes.

http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_action_form_classes

A JSP author should be able to define one without any problem. And the one suggested 
here, could be a standard part of your team's starter Struts config.

Heck, if you throw the JSF extension into the mix, I wager you could write significant 
Struts applications now without writing any Java code at all. :)

http://struts.sourceforge.net/struts-bsf/index.html

-Ted.


On Fri, 16 Jan 2004 11:31:46 -0600, Joe Germuska wrote:
> At 11:29 PM -0500 1/15/04, Ted Husted wrote:
>> My only comment is that it seems we're throwing a lot of
>> technology at a problem that could be solved by putting an empty
>> DynaActionForm in the Struts config, and just referring to that.
>> Perhaps something like:
>>
>> > type="org.apache.struts.action.DynaForm" />
>>
>
> That doesn't solve the problem if you want to use html:input tags
> when you haven't created the form-beans yet.  That's kind of a
> corner case, but we are gradually getting non-developers who can
> write JSPs and tags ok but haven't yet learned struts-config
> syntax.  Eventually I hope that they will, and then this might not
> be so important.
>
> I still prefer to err on the side of permissiveness -- a blank form
> rather than a stack trace.
>
> Joe




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



RE: why are form beans required for html:form?

2004-01-16 Thread gvanmatre

>>At 11:29 PM -0500 1/15/04, Ted Husted wrote:
>>My only comment is that it seems we're throwing a lot of technology  at
>> a problem that could be solved by putting an empty DynaActionForm  in
>> the Struts config, and just referring to that. Perhaps something  like:
>>
>> type="org.apache.struts.action.DynaForm" />
>
>That doesn't solve the problem if you want to use html:input tags  when
>you haven't created the form-beans yet.  That's kind of a corner  case,
>but we are gradually getting non-developers who can write JSPs  and tags
>ok but haven't yet learned struts-config syntax.  Eventually  I hope
>that they will, and then this might not be so important.
>

>From the writ, page 172? My favorite romance novel :)


   






>I still prefer to err on the side of permissiveness -- a blank form
>rather than a stack trace.
>
>Joe







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



RE: why are form beans required for html:form?

2004-01-16 Thread Joe Germuska
At 11:29 PM -0500 1/15/04, Ted Husted wrote:
My only comment is that it seems we're throwing a lot of technology 
at a problem that could be solved by putting an empty DynaActionForm 
in the Struts config, and just referring to that. Perhaps something 
like:


That doesn't solve the problem if you want to use html:input tags 
when you haven't created the form-beans yet.  That's kind of a corner 
case, but we are gradually getting non-developers who can write JSPs 
and tags ok but haven't yet learned struts-config syntax.  Eventually 
I hope that they will, and then this might not be so important.

I still prefer to err on the side of permissiveness -- a blank form 
rather than a stack trace.

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]


RE: why are form beans required for html:form?

2004-01-16 Thread Joe Germuska
At 11:21 PM -0500 1/15/04, Ted Husted wrote:
On Thu, 15 Jan 2004 12:14:46 -0600, Joe Germuska wrote:
 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...?
I don't think this is what you meant, but I've wondered whether the 
tags should check the request for a corresponding attribute if the 
formbean property returns null.
Since I've adopted the "use strings as ActionForm properties", I 
don't have much use for this kind of solution, but it also just seems 
kind of complicated.

I think the trickiest bit about getting the ActionForm for prefilling 
involves the dependency on ActionMappings in the API around getting 
form instances.  Right now you need an ActionMapping to get a 
DynaActionForm, although the mapping is just used to look up the 
FormBeanConfig.  Someone has probably suggested this before, but what 
about adding a "newInstance()" method to  FormBeanConfig?

From there, one could create an alternate method on RequestUtils:

public static ActionForm createActionForm(
HttpServletRequest request,
String formName,
String scope,
ModuleConfig moduleConfig,
ActionServlet servlet)
presumably it's not asking too much to know the form's name if you 
intend to set properties on it, and besides, you need to know it so 
that you can put it in either request or session someplace where the 
form tag would find it.

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]


RE: why are form beans required for html:form?

2004-01-16 Thread Edgar P Dollin
The data not going to a form bean seem to be a 'very' limited use,
especially with the ease of DynaActionForms.  There already exists a fair
amount of technology to handle this sort of situation.  Additionally, the
idea of struts was to put a framework around this.  To compliciate the tags
for this situation seems...like it should be thought about further.

Edgar

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 11:21 PM
To: Struts Developers List
Subject: RE: why are form beans required for html:form?


On Thu, 15 Jan 2004 12:14:46 -0600, Joe Germuska wrote:
> 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...?

I don't think this is what you meant, but I've wondered whether the tags
should check the request for a corresponding attribute if the formbean
property returns null. 

This could answer the case where the target property is not a String (or
boolean). 

If the bean property is null, and the same property exists in the request,
then we have the case where validation failed and the attribute could not be
stored in the target property. If the tag then displayed the request
attribute, we could have typed input field on ActionForms. (Essentially, we
are using the request as our String buffer.) 

Though for consistency, a better idea (if this first idea is even good)
would be to check the request for a corresponding attribute first, and then
look to the formbean property
if the attribute is absent. Again, this would let us use the request for an
input buffer, and reserve the ActionForm for validated input. 

-Ted.



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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 1/2/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 1/2/2004
 

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



RE: why are form beans required for html:form?

2004-01-15 Thread Andrew Hill
u, hmmm.


This could answer the case where the target property is not a String (or
boolean).


imho, people who dont use strings exclusively in their AFs deserve whatever
is coming to them... ;->

Seriously though, I dont think I like the idea of changing the form and view
population methodology too much.


to check the request for a corresponding attribute first, and then look to
the formbean property
if the attribute is absent. Again, this would let us use the request for an
input buffer, and reserve the ActionForm for validated input


Especially if this necessitates changes to the logic required to render the
values out again. One of the advantages of keeping everything buffered in
the ActionForm is that using a bean as the input buffer makes it nice and
easy to find and render these values back into the html in pretty much all
the rendering technologies. It also means even if you are using JSP
(shudder) you dont have to stuff around checking several places for a value
to render the field with when your not using struts tags.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Friday, 16 January 2004 12:21
To: Struts Developers List
Subject: RE: why are form beans required for html:form?


On Thu, 15 Jan 2004 12:14:46 -0600, Joe Germuska wrote:
> 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...?

I don't think this is what you meant, but I've wondered whether the tags
should check the request for a corresponding attribute if the formbean
property returns null.

This could answer the case where the target property is not a String (or
boolean).

If the bean property is null, and the same property exists in the request,
then we have the case where validation failed and the attribute could not be
stored in the target property. If the tag then displayed the request
attribute, we could have typed input field on ActionForms. (Essentially, we
are using the request as our String buffer.)

Though for consistency, a better idea (if this first idea is even good)
would be to check the request for a corresponding attribute first, and then
look to the formbean property
if the attribute is absent. Again, this would let us use the request for an
input buffer, and reserve the ActionForm for validated input.

-Ted.



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



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



RE: why are form beans required for html:form?

2004-01-15 Thread Ted Husted
My only comment is that it seems we're throwing a lot of technology at a problem that 
could be solved by putting an empty DynaActionForm in the Struts config, and just 
referring to that. Perhaps something like:



-Ted.


On Thu, 15 Jan 2004 09:45:41 -0600, Joe Germuska wrote:
> At 8:25 AM -0700 1/15/04, <[EMAIL PROTECTED]> wrote:
>> I think this is a great idea.  We often use buttons on the form
>> for navigation between inquiry/dispaly pages which requires that
>> we use a default formbean.  Maybe you could add the attributre to
>> the action noded of the struts config file instead of making it a
>> custom tag attribute? This would allow you to let the request
>> processor do the check and instantiate a base/dummy action form.
>> Then you wouldn't have to refactor the tag libraries?  I suppose
>> this might sound like a kluge.
>>
>
> Gary:
>
>
> which is the great idea?  Using some config param to make the form
> optional?  Or just making it optional in general?  I'm not sure
> what the dummy form is for, unless the form wasn't optional.
>
> I'm wondering if I might not also like behavior that also let you
> use HTML form tags in the absence of a backing form bean; just skip
> the re-filling instead of throwing an error.  That would allow us
> to have non-programmers flesh out JSPs including forms with the
> right Struts tags at any time ahead of programmers coming along and
> implementing the form pieces.  They're already familiar with
> substituting  for  in production apps, but
> they aren't ready to do a lot of struts-config work defining form
> beans and action mappings.
>
> Would people object to reworking the form tags for more graceful
> degradation at all levels in the absence of a form bean, instead of
> exception throwing?
>
> Joe
>
>
>> Gary VanMatre
>>
>>
>> -Original Message-
>> From: Joe Germuska [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, January 15, 2004 7:09 AM
>> To: Struts Developers List
>> Subject: RE: why are form beans required for html:form?
>>
>>
>> At 8:59 PM -0700 1/14/04, Richard Hightower wrote:
>>> how about another attribute, i.e.,
>>>
>>>
>>> >>
>>>
>>> The checkFormBean defaults to true so it is backwards
>>> compatible with
>>>
>> other
>>> versions.
>>>
>>>
>>> I like the idea that html:form checks for the form bean. It
>>> makes it
>>>
>> easier
>>> to debug the way it is.
>>> However, I can see when you would not want that
>>>
>>
>> Well, I'm figuring that if you actually NEED the form bean, then
>> something else would throw an exception; presumably the first
>> input  tag which isn't backed by some explicitly named bean.
>>
>> I'd probably leave out the parameter in preference of error
>> checking  at the right spot.  I think what Ted was getting at in
>> his email was  that other tags might not be doing good error
>> checking because they've always deferred to html:form -- and yes,
>> it would be bad to remove the check and then start having NPEs
>> thrown that might be much harder to debug.
>>
>> 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: struts-dev-
>> [EMAIL PROTECTED] For additional commands, e-mail:
>> [EMAIL PROTECTED]
>>
>>
>> --
>> --- To unsubscribe, e-mail: struts-dev-
>> [EMAIL PROTECTED] For additional commands, e-mail:
>> [EMAIL PROTECTED]




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



RE: why are form beans required for html:form?

2004-01-15 Thread Ted Husted
On Thu, 15 Jan 2004 12:14:46 -0600, Joe Germuska wrote:
> 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...?

I don't think this is what you meant, but I've wondered whether the tags should check 
the request for a corresponding attribute if the formbean property returns null.

This could answer the case where the target property is not a String (or boolean).

If the bean property is null, and the same property exists in the request, then we 
have the case where validation failed and the attribute could not be stored in the 
target property. If the tag then displayed the request attribute, we could have typed 
input field on ActionForms. (Essentially, we are using the request as our String 
buffer.)

Though for consistency, a better idea (if this first idea is even good) would be to 
check the request for a corresponding attribute first, and then look to the formbean 
property
if the attribute is absent. Again, this would let us use the request for an input 
buffer, and reserve the ActionForm for validated input.

-Ted.



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



RE: why are form beans required for html:form?

2004-01-15 Thread Joe Germuska
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]


RE: why are form beans required for html:form?

2004-01-15 Thread gvanmatre
Joe:

I was lobbying for the optional form bean when using the struts
 tag.  My suggestion was directed at an implementation
strategy.  Instead of adding the extra attribute to the , I
thought it might be simpler to add a "default" attribute to the action
xml definition.  Or, a "reserved word" in the name attribute, maybe
something like "default" (input="default").  The thought was that maybe
the request processor, seeing this "flag" could just instantiate an
org.apache.struts.action.ActionForm placing it in request scope. The
 tag would be happy because there was a formbean associated
with the action.

My perspective was not in terms of separation of roles of development.
I see your argument as far as making it a feature of the jsp library as
it relates to the evolution of html into a dynamic application.

I felt this feature would be beneficial when creating inquiry pages and
menu pages that you wanted to use submit buttons for navigation and
still want to take advantage of the synchronization token and jsessionid
that the custom form tag handles for you.

Gary

From: Joe Germuska [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 8:46 AM
To: Struts Developers List
Subject: RE: why are form beans required for html:form?

At 8:25 AM -0700 1/15/04, <[EMAIL PROTECTED]> wrote:
>I think this is a great idea.  We often use buttons on the form for
> navigation between inquiry/dispaly pages which requires that we use a
> default formbean.  Maybe you could add the attributre to the action
noded
>of the struts config file instead of making it a custom tag attribute?
> This would allow you to let the request processor do the check and
> instantiate a base/dummy action form.  Then you wouldn't have to
refactor
>the tag libraries?  I suppose this might sound like a kluge.

Gary:

which is the great idea?  Using some config param to make the form
optional?  Or just making it optional in general?  I'm not sure what the
dummy form is for, unless the form wasn't optional.

I'm wondering if I might not also like behavior that also let you use
HTML form tags in the absence of a backing form bean; just skip the
re-filling instead of throwing an error.  That would allow us to have
non-programmers flesh out JSPs including forms with the right Struts
tags at any time ahead of programmers coming along and implementing  the
form pieces.  They're already familiar with substituting   for
 in production apps, but they aren't ready to do  a lot
of struts-config work defining form beans and action mappings.

Would people object to reworking the form tags for more graceful
degradation at all levels in the absence of a form bean, instead of
exception throwing?

Joe




>Gary VanMatre
>
>-Original Message-
>From: Joe Germuska [mailto:[EMAIL PROTECTED]
>Sent: Thursday, January 15, 2004 7:09 AM
>To: Struts Developers List
>Subject: RE: why are form beans required for html:form?
>
>At 8:59 PM -0700 1/14/04, Richard Hightower wrote:
>>how about another attribute, i.e.,
>>
>>>
>>The checkFormBean defaults to true so it is backwards compatible with
>other
>>versions.
>>
>>
>>I like the idea that html:form checks for the form bean. It makes it
>easier
>>to debug the way it is.
>>However, I can see when you would not want that
>
>Well, I'm figuring that if you actually NEED the form bean, then
>something else would throw an exception; presumably the first input
tag
>which isn't backed by some explicitly named bean.
>
>I'd probably leave out the parameter in preference of error checking
at
>the right spot.  I think what Ted was getting at in his email was  that
> other tags might not be doing good error checking because
>they've always deferred to html:form -- and yes, it would be bad to
> remove the check and then start having NPEs thrown that might be much
> harder to debug.
>
>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]
>
>
>
>
>-
> To unsubscribe, e-mail: [EMAIL PROTECTED] For
> additional commands, e-mail: [EMAIL PROTECTED]


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

RE: why are form beans required for html:form?

2004-01-15 Thread Mike Jasnowski
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.

my 2 cents.

-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 10:46 AM
To: Struts Developers List
Subject: RE: why are form beans required for html:form?


At 8:25 AM -0700 1/15/04, <[EMAIL PROTECTED]> wrote:
>I think this is a great idea.  We often use buttons on the form for
>navigation between inquiry/dispaly pages which requires that we use a
>default formbean.  Maybe you could add the attributre to the action noded
>of the struts config file instead of making it a custom tag attribute?
>This would allow you to let the request processor do the check and
>instantiate a base/dummy action form.  Then you wouldn't have to refactor
>the tag libraries?  I suppose this might sound like a kluge.

Gary:

which is the great idea?  Using some config param to make the form
optional?  Or just making it optional in general?  I'm not sure what
the dummy form is for, unless the form wasn't optional.

I'm wondering if I might not also like behavior that also let you use
HTML form tags in the absence of a backing form bean; just skip the
re-filling instead of throwing an error.  That would allow us to have
non-programmers flesh out JSPs including forms with the right Struts
tags at any time ahead of programmers coming along and implementing
the form pieces.  They're already familiar with substituting 
for  in production apps, but they aren't ready to do
a lot of struts-config work defining form beans and action mappings.

Would people object to reworking the form tags for more graceful
degradation at all levels in the absence of a form bean, instead of
exception throwing?

Joe




>Gary VanMatre
>
>-Original Message-
>From: Joe Germuska [mailto:[EMAIL PROTECTED]
>Sent: Thursday, January 15, 2004 7:09 AM
>To: Struts Developers List
>Subject: RE: why are form beans required for html:form?
>
>At 8:59 PM -0700 1/14/04, Richard Hightower wrote:
>>how about another attribute, i.e.,
>>
>>>
>>The checkFormBean defaults to true so it is backwards compatible with
>other
>>versions.
>>
>>
>>I like the idea that html:form checks for the form bean. It makes it
>easier
>>to debug the way it is.
>>However, I can see when you would not want that
>
>Well, I'm figuring that if you actually NEED the form bean, then
>something else would throw an exception; presumably the first input  tag
>which isn't backed by some explicitly named bean.
>
>I'd probably leave out the parameter in preference of error checking  at
>the right spot.  I think what Ted was getting at in his email was  that
>other tags might not be doing good error checking because
>they've always deferred to html:form -- and yes, it would be bad to
>remove the check and then start having NPEs thrown that might be much
>harder to debug.
>
>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]
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


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



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



RE: why are form beans required for html:form?

2004-01-15 Thread Joe Germuska
At 8:25 AM -0700 1/15/04, <[EMAIL PROTECTED]> wrote:
I think this is a great idea.  We often use buttons on the form for
navigation between inquiry/dispaly pages which requires that we use a
default formbean.  Maybe you could add the attributre to the action noded
of the struts config file instead of making it a custom tag attribute?
This would allow you to let the request processor do the check and
instantiate a base/dummy action form.  Then you wouldn't have to refactor
the tag libraries?  I suppose this might sound like a kluge.
Gary:

which is the great idea?  Using some config param to make the form 
optional?  Or just making it optional in general?  I'm not sure what 
the dummy form is for, unless the form wasn't optional.

I'm wondering if I might not also like behavior that also let you use 
HTML form tags in the absence of a backing form bean; just skip the 
re-filling instead of throwing an error.  That would allow us to have 
non-programmers flesh out JSPs including forms with the right Struts 
tags at any time ahead of programmers coming along and implementing 
the form pieces.  They're already familiar with substituting  
for  in production apps, but they aren't ready to do 
a lot of struts-config work defining form beans and action mappings.

Would people object to reworking the form tags for more graceful 
degradation at all levels in the absence of a form bean, instead of 
exception throwing?

Joe




Gary VanMatre

-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 7:09 AM
To: Struts Developers List
Subject: RE: why are form beans required for html:form?
At 8:59 PM -0700 1/14/04, Richard Hightower wrote:
how about another attribute, i.e.,



The checkFormBean defaults to true so it is backwards compatible with
other
versions.

I like the idea that html:form checks for the form bean. It makes it
easier
to debug the way it is.
However, I can see when you would not want that
Well, I'm figuring that if you actually NEED the form bean, then
something else would throw an exception; presumably the first input  tag
which isn't backed by some explicitly named bean.
I'd probably leave out the parameter in preference of error checking  at
the right spot.  I think what Ted was getting at in his email was  that
other tags might not be doing good error checking because
they've always deferred to html:form -- and yes, it would be bad to
remove the check and then start having NPEs thrown that might be much
harder to debug.
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]


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


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


RE: why are form beans required for html:form?

2004-01-15 Thread gvanmatre
I think this is a great idea.  We often use buttons on the form for
navigation between inquiry/dispaly pages which requires that we use a
default formbean.  Maybe you could add the attributre to the action noded
of the struts config file instead of making it a custom tag attribute?
This would allow you to let the request processor do the check and
instantiate a base/dummy action form.  Then you wouldn't have to refactor
the tag libraries?  I suppose this might sound like a kluge.

Gary VanMatre

-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 7:09 AM
To: Struts Developers List
Subject: RE: why are form beans required for html:form?

At 8:59 PM -0700 1/14/04, Richard Hightower wrote:
>how about another attribute, i.e.,
>
>
>The checkFormBean defaults to true so it is backwards compatible with
other
>versions.
>
>
>I like the idea that html:form checks for the form bean. It makes it
easier
>to debug the way it is.
>However, I can see when you would not want that

Well, I'm figuring that if you actually NEED the form bean, then
something else would throw an exception; presumably the first input  tag
which isn't backed by some explicitly named bean.

I'd probably leave out the parameter in preference of error checking  at
the right spot.  I think what Ted was getting at in his email was  that
other tags might not be doing good error checking because
they've always deferred to html:form -- and yes, it would be bad to
remove the check and then start having NPEs thrown that might be much
harder to debug.

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]




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



RE: why are form beans required for html:form?

2004-01-15 Thread Joe Germuska
At 8:59 PM -0700 1/14/04, Richard Hightower wrote:
how about another attribute, i.e.,



The checkFormBean defaults to true so it is backwards compatible with other
versions.
I like the idea that html:form checks for the form bean. It makes it easier
to debug the way it is.
However, I can see when you would not want that
Well, I'm figuring that if you actually NEED the form bean, then 
something else would throw an exception; presumably the first input 
tag which isn't backed by some explicitly named bean.

I'd probably leave out the parameter in preference of error checking 
at the right spot.  I think what Ted was getting at in his email was 
that other tags might not be doing good error checking because 
they've always deferred to html:form -- and yes, it would be bad to 
remove the check and then start having NPEs thrown that might be much 
harder to debug.

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]


RE: why are form beans required for html:form?

2004-01-14 Thread Richard Hightower
how about another attribute, i.e.,

mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 2:49 PM
To: Struts Developers List
Subject: Re: why are form beans required for html:form?


Someone needs to try relaxing the requirement and see what happens to the
input tags.

Of course, the point of the exercise is really the input tags. The buttons
are secondary. We don't want to complicate the input tags for this edge
case.  (Though, I don't know if it would be a complication or not.)

Another idea would be a separate tag that could be used for formless forms
[html:formless perhaps? :)]

-Ted.

On Wed, 14 Jan 2004 16:26:44 -0500, Sgarlata Matt wrote:
> Joe -
>
>
> I agree that html:form is being too aggressive in its requirement
> of a form bean.  I believe there is already an open BugZilla ticket
> for this issue:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=24356
>
>
> Your reasoning is a little different than the reasoning in the
> ticket, so it might be useful to include your email as a comment on
> the bug.
>
> Matt
> - Original Message -
> From: "Joe Germuska" <[EMAIL PROTECTED]>
> To: "Struts Developers List" <[EMAIL PROTECTED]> Sent:
> Wednesday, January 14, 2004 10:32 AM Subject: why are form beans
> required for html:form?
>
>
>> I'm working with an old Struts application recently ported to a
>> Struts 1.2 nightly.  One land mine that keeps popping up is that
>> pages using the  JSP tag which used to work now no
>> longer do.  I have one specific case where a developer chose not
>> to implement an ActionForm class (probably because the app also
>> pre-dated DynaForms and/or he was being lazy) so now the JSP
>> throws an exception when it comes to the html:form tag and can't
>> find a form bean associated with the destination action.
>>
>> Now, I'm all for encouraging people to use Struts the way it was
>> designed to be used, but in this case, the form has no HTML
>> fields which are pre-filled from a form bean, so it seems pushy
>> of the html:form tag to insist that this is an error condition.
>>
>> Would it make more sense to have the individual input tags
>> complain if they can't find a form bean, and have html:form be
>> more permissive?
>>
>> 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: struts-dev-
>> [EMAIL PROTECTED] For additional commands, e-mail:
>> [EMAIL PROTECTED]
>
>
> 
> - To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




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



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



Re: why are form beans required for html:form?

2004-01-14 Thread Ted Husted
Someone needs to try relaxing the requirement and see what happens to the input tags.

Of course, the point of the exercise is really the input tags. The buttons are 
secondary. We don't want to complicate the input tags for this edge case.  (Though, I 
don't know if it would be a complication or not.)

Another idea would be a separate tag that could be used for formless forms 
[html:formless perhaps? :)]

-Ted.

On Wed, 14 Jan 2004 16:26:44 -0500, Sgarlata Matt wrote:
> Joe -
>
>
> I agree that html:form is being too aggressive in its requirement
> of a form bean.  I believe there is already an open BugZilla ticket
> for this issue:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=24356
>
>
> Your reasoning is a little different than the reasoning in the
> ticket, so it might be useful to include your email as a comment on
> the bug.
>
> Matt
> - Original Message -
> From: "Joe Germuska" <[EMAIL PROTECTED]>
> To: "Struts Developers List" <[EMAIL PROTECTED]> Sent:
> Wednesday, January 14, 2004 10:32 AM Subject: why are form beans
> required for html:form?
>
>
>> I'm working with an old Struts application recently ported to a
>> Struts 1.2 nightly.  One land mine that keeps popping up is that
>> pages using the  JSP tag which used to work now no
>> longer do.  I have one specific case where a developer chose not
>> to implement an ActionForm class (probably because the app also
>> pre-dated DynaForms and/or he was being lazy) so now the JSP
>> throws an exception when it comes to the html:form tag and can't
>> find a form bean associated with the destination action.
>>
>> Now, I'm all for encouraging people to use Struts the way it was
>> designed to be used, but in this case, the form has no HTML
>> fields which are pre-filled from a form bean, so it seems pushy
>> of the html:form tag to insist that this is an error condition.
>>
>> Would it make more sense to have the individual input tags
>> complain if they can't find a form bean, and have html:form be
>> more permissive?
>>
>> 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: struts-dev-
>> [EMAIL PROTECTED] For additional commands, e-mail:
>> [EMAIL PROTECTED]
>
>
> 
> - To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




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



Re: why are form beans required for html:form?

2004-01-14 Thread Sgarlata Matt
Joe -

I agree that html:form is being too aggressive in its requirement of a form
bean.  I believe there is already an open BugZilla ticket for this issue:

http://issues.apache.org/bugzilla/show_bug.cgi?id=24356

Your reasoning is a little different than the reasoning in the ticket, so it
might be useful to include your email as a comment on the bug.

Matt
- Original Message - 
From: "Joe Germuska" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 10:32 AM
Subject: why are form beans required for html:form?


> I'm working with an old Struts application recently ported to a
> Struts 1.2 nightly.  One land mine that keeps popping up is that
> pages using the  JSP tag which used to work now no longer
> do.  I have one specific case where a developer chose not to
> implement an ActionForm class (probably because the app also
> pre-dated DynaForms and/or he was being lazy) so now the JSP throws
> an exception when it comes to the html:form tag and can't find a form
> bean associated with the destination action.
>
> Now, I'm all for encouraging people to use Struts the way it was
> designed to be used, but in this case, the form has no HTML fields
> which are pre-filled from a form bean, so it seems pushy of the
> html:form tag to insist that this is an error condition.
>
> Would it make more sense to have the individual input tags complain
> if they can't find a form bean, and have html:form be more permissive?
>
> 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]
>


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