You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Philip Tucker <ph...@valtech.com> on 2001/07/17 18:39:00 UTC

struts-example persistence

The struts-example walking tour says "When the application is shut down, the
database servlet unloads the database by writing a fresh database.xml file."
When I run it, it reads in the data from database.xml fine, but it doesn't
persist any changes I make.  Looking through DatabaseServlet.java, it's got
a load() method but no save().  

Does the Digester handle writing the data back out at shutdown?  If so,
where is there documentation on Digester?  The online doc
(http://jakarta.apache.org/struts/userGuide/building_controller.html) refers
to the javadoc (http://jakarta.apache.org/struts/api/index.html) for
Digester documentation, but unless I'm blind it's not there.

Thanks,
Philip

Re: Begginer: how do i know what button is clicked from a strut form

Posted by William Jaynes <wj...@mediaone.net>.
If your jsp has a submit tag like:

<shtml:submit property="OK" value="Press Here if OK"/>

then your Action would contain something like

String okButton = request.getParameter("OK");
    if (null != okButton) { ...code... }

However, RESET and CANCEL are generally something different. A standard reset
button is handled by the browser. The standard cancel button can be detected by
a call to isCancelled(request).

Will


----- Original Message -----
From: "BinhMinh Nguyen" <st...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, July 18, 2001 3:02 PM
Subject: Begginer: how do i know what button is clicked from a strut form


> I am new to struts and got stuck.
>
> Please anyone tell me how do i know what button is
> clicked to detect the event from a strut:form.
> For example, my form have three buttons: OK, RESET,
> CANCEL, I would like to perform tasks that are
> associated with these button, but I dont know how to
> detect what button is clicked.
>
> Please give me example if possible thank you
>
> BM Nguyen
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/


Begginer: how do i know what button is clicked from a strut form

Posted by BinhMinh Nguyen <st...@yahoo.com>.
I am new to struts and got stuck.

Please anyone tell me how do i know what button is
clicked to detect the event from a strut:form.
For example, my form have three buttons: OK, RESET,
CANCEL, I would like to perform tasks that are
associated with these button, but I dont know how to
detect what button is clicked.

Please give me example if possible thank you

BM Nguyen

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/