RE: Accessing form beans

2002-04-30 Thread Galbreath, Mark

If your bean is defined and named in struts-config, is in
session/application scope, and associated with the action for the instant
JSP, you can simply:



Mark

-Original Message-
From: Michael Dingler [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 9:30 AM
To: [EMAIL PROTECTED]
Subject: Accessing form beans


Hi there, yet another question...

Is there an easy way to just display some form bean
properties? 
Let's say I've got a form defined as





Now I just want to display an additional value from
the form bean as configured in the struts-config.xml
file.
As there's no  I have to use 
which on the other hand requires a "name".
To get things working I have to change the first line
to 


Is there a more elegant and less redundant way?

...Michael...

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

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




Re: Accessing form beans

2002-04-30 Thread Michael Dingler

Nicolas De Loof wrote:
> 
> If "/foo" is mapped to "FooForm" bean, you can use
> 
> 
> 
> without changes to your . bean:write will look in scopes for an
> object called "FooForm". This has no effect with using html:form or not -
> assuming FooForm is in session or request scope !
> 
> If you've got problem with this, perhaps you don't have such an existing
> bean in scope. (look at the scope you setted in struts-config.xml).
>  with a type attribute will create one if there's none.  tags can work without such a bean, just displaying no initial data.

Okay, thanks, that works. At least that saves me from putting too
much in the  tag, although I still have to repeat the
information from the struts-config in the bean:write tag.

Well, you can't have everything...

...Michael...

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




Re: Accessing form beans

2002-04-30 Thread Nicolas De Loof


If "/foo" is mapped to "FooForm" bean, you can use



without changes to your . bean:write will look in scopes for an
object called "FooForm". This has no effect with using html:form or not -
assuming FooForm is in session or request scope !

If you've got problem with this, perhaps you don't have such an existing
bean in scope. (look at the scope you setted in struts-config.xml).
 with a type attribute will create one if there's none.  Hi there, yet another question...
>
> Is there an easy way to just display some form bean
> properties?
> Let's say I've got a form defined as
>
> 
> 
> 
>
> Now I just want to display an additional value from
> the form bean as configured in the struts-config.xml
> file.
> As there's no  I have to use 
> which on the other hand requires a "name".
> To get things working I have to change the first line
> to
>   action="/foo">
>
> Is there a more elegant and less redundant way?
>
> ...Michael...
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



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




Accessing form beans

2002-04-30 Thread Michael Dingler

Hi there, yet another question...

Is there an easy way to just display some form bean
properties? 
Let's say I've got a form defined as





Now I just want to display an additional value from
the form bean as configured in the struts-config.xml
file.
As there's no  I have to use 
which on the other hand requires a "name".
To get things working I have to change the first line
to 


Is there a more elegant and less redundant way?

...Michael...

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