Automatic form validation

2002-03-26 Thread jeffhaenn

During automatic form validation, when errors occur, 
does the framework pass an instance of the formbean to 
the target of the "input" attribute?  None of the fields 
are being repopulated when it goes back to the form.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re-Selecting a combo box entry???

2002-03-26 Thread jeffhaenn

What Im doing:
Validating a form with a combobox.

Problem:
If there was an error, I need to re-select the values 
that the user selected, when I display the page again.

Question:
What is the syntax for this?  I looked through the 
source code for the SelectTag and they have a method 
called isMatched(String), that appears to do this, but 
it never seems to be called.  By the way, for now, I am 
using the same strings for 'labels' and 'values'.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: FormBeans and GET

2002-03-19 Thread jeffhaenn

Rob,
Thanks for the response.  You cleared up a lot of 
questions I had.

Jeff
> 
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 20, 2002 2:55 AM
> Subject: FormBeans and GET
> 
> 
> > A couple questions:
> >
> > 1.  On the initial "GET" of a page do you need to
> > explicitly add a FormBean to session with all fields set
> > to "" so it doesn't complain on null values?
> 
> No, you shouldn't have to.  Though for getters for collections that are used
> to populate with html:options you have to initialize.  (See further on in
> post)
> 
> >
> > 2.  When using the  taglib, does the
> > accessor method have to return a collection to create
> > the  tags?  Same for  with
> > booleans?
> 
> Not sure which accessor method your refering to here.
>  should map to
> form bean methods getValues() and getValueLabels() in your form bean and
> if this is what you really want to know yes those two methods must return
> collections.
> 
> >
> > Problem is that the page see the bean in session 'cause
> > it doesn't exist yet, so I get an exception thrown in
> > the taglib whenit tries to access the property.
> 
> I believe the more common solution to this is to forward through an action
> that initializes your
> form bean prior to the jsp form being loaded.
> 
> request ->
> actionFoo (if not initialized populate form bean, else do stuff cause the
> user filled out form) ->
> jsp form (submit) ->
> actionFoo (if not initialized populate form bean else do some stuff cause
> the user filled out form) ->
> jsp result/view  -- end of request --
> 
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Properties

2002-03-19 Thread jeffhaenn

I have noticed that the example app uses the props file 
to access strings such as page text and page titles.

Are these props cached?  If so, when are they reloaded?  
If they aren't reloaded, what is the point since you 
need to restart the container to re-cache them?  You may 
as well just edit the JSP page.  Or maybe set the 
controller sevlet, which takes them as an init-param, to 
re-cache them from time to time?

Thanks for your input,
Jeff

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




FormBeans and GET

2002-03-19 Thread jeffhaenn

A couple questions:

1.  On the initial "GET" of a page do you need to 
explicitly add a FormBean to session with all fields set 
to "" so it doesn't complain on null values?

2.  When using the  taglib, does the 
accessor method have to return a collection to create 
the  tags?  Same for  with 
booleans?

Problem is that the page see the bean in session 'cause 
it doesn't exist yet, so I get an exception thrown in 
the taglib whenit tries to access the property.  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: