Re: Initializing formBeans

2002-05-02 Thread Thierry Ruiz

At 09:25 AM 5/2/02 +0200, you wrote:
Hi !

I'm a newbie with struts and I cannot find the right way to do a simple
thing like this :

I would like to create an HTML form to modify the user information I
recorded in my database.

I didn't find how to initialize my form on a user-basis (the userId is
stored in the session).

Thanks

Arnaud

---
Arnaud GADBY

EILEO
9ter rue Carnot
94270 Le Kremlin Bicetre
FRANCE

Hi Arnaud,

I guess that you're searching a way to initialise the form with the 
informations
of the existing user. I've been faced with something similar. Here is what 
I did :

The thing is that I haven't found a built-in way to pass the session 
(containing the user id)
to the form implementation, and the ActionForm.reset() method  that could 
have been
used to populate the form with user data is not called (If somedy knows 
why...).

So I created a specific Action in that goal. In the doPerfom method I 
create a new instance of the form
bean and populate it with the user informations (that is in your session I 
guess).
The key is that this new form instance should be set in your session with 
the same attibute name
defined in struts-config form-bean


This Action is called by an 'edit user' link or button and forwards to the 
user form page.


Hope this help.

Thierry Ruiz
SchlumbergerSema.



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




Templates with frame

2002-01-11 Thread Thierry Ruiz


Hi all,

Thanks to Cedric Dumoulin, find here a way to create Struts templates with 
frames.
http://archive.covalent.net/jakarta/struts-user/2001/04/0095.xml


-Th. 


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




Advice needed for frame templating

2002-01-10 Thread Thierry Ruiz


Hi all,

Reading severall articles, It seems to be a better solution to avoid
the use of frames in web project. However I'm afraid not to have
the choice (I need an applet running in background).

Could someone give advice on frame templating using Struts.

Thanks in advance.

-Th.


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




How use bean:message with custom arguments

2002-01-09 Thread Thierry Ruiz

Hi all,

I'm currently trying to display an i18n customised welcome
message like 'Hello name.' where name value is stored in
a bean session context. So far I couldn't find the proper syntax using

bean:message key=message.hello arg0=' ' /

I'd like to know how to attach the arg {0} of the resourse message
to this bean value.

I've just joint the mailing list so I apologie if the answer has already been
done.

Thanks for your help.
Thierry.


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