This is how I did it, and it seems to work well:
In my form I have the following:
Add
Save
Delete
In my action, I check for the existance of one of these properties and act
accordingly. For example,
String value = request.getParameter("add");
if (value != null) {
//do something...
}
Anthony,
Here's another option. If, in your Action, it's determined that the popup
is needed, set a request attribute. Then in your JSP, check for the
existence of the request attribute, using for example, and
create a custom tag to generate the required Javascript. The custom tag
could even
I wrote my own "errors" custom tag that sends back the javascript to display
the error in a popup window rather than the html sent back by the struts
error tag. It still uses the ActionErrors that the struts error tag uses,
so none of your other code has to change.
-Karen
-Original Message-
, this helped
Thomas
-Original Message-
>From : Prengaman.Karen <[EMAIL PROTECTED]>
To : "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Date : 04 December 2001 00:49:13
Subject : mapping.getInput() and request scope beans
Hello,
>
>I have a jsp that display
Hello,
I have a jsp that displays data and has a very simple one-button form with
one hidden field. When this form is submitted, ExitAction is called. In
ExitAction's perform method, if a certain condition occurs, I want to return
to the calling page. I do this with the following code:
return
You can define an action that has an action class, but no form-bean. Here's
an example of an action that I am using, and it works great:
Karen Prengaman
Software Engineer
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 8
Rob,
I did something similar today. I went through a lot of the same steps as
you and here is what I finally came up with (using your code):
Name:
I'm not sure if this is the best solution, but it's working.
-Karen
-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Hi,
I've searched the struts-user archives and have not found what I am looking
for. Here is what I am trying to do:
In my action classes, I am forcing a user to log in by checking to see if a
user is logged in before processing the action. If they are not logged in,
they are forwarded to the
Cameron, are you still experiencing this problem? I just ran into the same
thing and thought I would share how I solved it.
I too was creating a form bean and then adding it to the session. When the
corresponding jsp was loaded, all the values were reset to the default.
Upon examining my stru
Hi Ted,
I joined the Struts Mailing List yesterday and have already learned some
valuable information. I have seen Tiles refered to in several different
posts and am wondering where I can find out more information about it (I
couldn't find a Contrib folder, but wasn't sure where to look for it).
Scott,
In your Action object, get your DataSource using the call to
servlet.getServletContext()..., and then pass the DataSource to your
JavaBean object where you allocate your connection. This way you avoid
tying your JavaBean to the web application, and also remove the business
logic from your
11 matches
Mail list logo