> Like I said, I'm not really sure why the
> redirect = "true" would give me
> problems, but as soon as I changed it to
> false everything worked.
Joel,
In a nutshell: the 'redirect="true"' causes a message to go back to the
client's browser telling it to ask for another page. This causes the
re
Thanks, that makes sense.
> -Original Message-
> From: Jeff Beal [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 17, 2005 2:07 PM
> To: Struts Users Mailing List
> Subject: Re: Correct Prepopulate Method
>
> With redirect="true", Struts sends an
With redirect="true", Struts sends an HTTP redirect command to the
browser, which then makes a request directly to the JSP page. That
means that your action and your JSP page are in two *different*
requests. Thus, anything that your Action placed into request scope
is gone.
(I'm surprised that n
f your patience reading all this.
> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 17, 2005 10:14 AM
> To: Struts Users Mailing List
> Subject: Re: Correct Prepopulate Method
>
> Hi Joel,
>
> From the message y
Form available to the jsp but it was empty.. Not
> the same one that I had linked to the request above.
>
> It seems to me that really it shouldn't be able to work since the request
> form my RunTestsAction is a totally different object than the request for
> the jsp page. Thus the example from
bago [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 11, 2005 9:36 AM
> To: Struts Users Mailing List
> Subject: Re: Correct Prepopulate Method
>
> You would usually do prepopulation in a setup form. Which
> scope you place the form in depends on how you configure the
> action
Hi Jack,
I have been thinking of posting the same problem but
was watching this thread to arrive at something that
would help me..
Anyways, as you mentioned in this reply that it can be
done using single Action, I am into the same.
I want to populate the form using dispatch action.
All the thin
Okay, after some review of my code and such, it is now working! There is
not one definite thing, I just double-checked everything I had after
taking a break.
I want to thank everyone for their input (and patience) and the side
emails making sure I was up and running. This is a great community,
Note that the key is not to think of the ActionForm as somehow being
wedded to the page form. That is a crazy way to think. ///;-)
On Mon, 14 Mar 2005 12:43:18 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> No problem, Nic. Just trying to see what the problem is. Glad I
> asked. I would not
No problem, Nic. Just trying to see what the problem is. Glad I
asked. I would not have know this was it. So, your client on a
browser is seeing a list of users, chooses a user, then has that users
attributes displayed and can update them. Right? If so, this is
easy.
You can use one JSP page
On Mon, 14 Mar 2005 11:53:12 -0800, Nic Werner <[EMAIL PROTECTED]> wrote:
> Reading the replies here and the Struts FAQ, everyone says "Create two
> actions, one to pre-populate the data, and the other to save that data"
> - So, the first action populates the data in the Execute() function,
> retur
I apologize as I seem to have hijacked this thread in a direction I
didn't intend. Jack, I didn't mean for you to pick through my code, it
was just in response to Joe helping me.
To answer your question Dakota Jack, in an overall view what you have
said is correct:
From a page of Users, I want
I am just going to hold out, Nic, until you merely say what you want
the client to do without giving any code. If you want to know what to
do from me, just tell me what you want the client to do. As I said,
this is simple stuff, but dealing with your code just complicates it.
If you don't just w
This is where I must be doing something wrong, my UserUpdateAction
isn't finding the pre-populated form. Here is my code for both:
Hm. is UserUpdateAction expecting certain properties to survive
between the requests which are not in the request parameters? By
default, form beans have request s
See my comments in-line. You've got the idea of what I want to do, Joe.
Joe Germuska wrote:
At 11:08 PM -0800 3/13/05, Nic Werner wrote:
Is what I am doing calling JSP pages directly? From my struts-config
below I show them being mapped to Actions.
My question was that I have to set the html:form a
At 11:08 PM -0800 3/13/05, Nic Werner wrote:
Is what I am doing calling JSP pages directly? From my struts-config
below I show them being mapped to Actions.
My question was that I have to set the html:form action to be the
calling Action in order to populate it, but I want it to submit to a
differe
Nic, the pages don't matter in a real sense. Actions process requests
using the data from ActionForms and then return an ActionForward.
Anytime you want to process a request use them. It is that simple.
If you just explain what you want to do, we can give you a dozen ways
to do it in all probab
But, Craig has indicated in other places that he thinks my way of
doing it resonates with him fine and is consistent with OOP
principles. Anyway, who created it and why is a historical answer.
The question, I thought, was about logic? ///;-)
On Sun, 13 Mar 2005 21:31:43 -0800, Craig McClanah
with different actions for new form and edit forms. The same save actions then work either way.
-Original Message-
From: Nic Werner <[EMAIL PROTECTED]>
Date: Sun, 13 Mar 2005 18:13:05
To:Struts Users Mailing List
Subject: Re: Correct Prepopulate Method
Okay, from the FAQ:
On Fri, 11 Mar 2005 09:31:33 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
>
> If you do this, you won't think of the ActionForm as some sort of
> mirror of the JSP/HTML form which stands between the Action and the
> form.
The fact that ActionForm was designed originally *precisely* to be a
conta
struts. How do you get to the point of
having a
person select inventory and purchase it if you can't first display that
inventory?
- Joel
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Friday, March
11, 2005 12:02 PM
To: Struts Users Mailing List
Subject: Re: Corr
I don't know what to say if you don't see the difference between a
page-centric view and a view that uses OOP principles. Page-centric
talks about the Actions as if they were serving the pages. The pages
are pages. The Actions are Actions.
On Sat, 12 Mar 2005 11:43:39 -0800, Jesse Clark <[EMAI
Oops, as I had said in the paragraph that got snipped out, I am still
trying to figure out the best way to fit everything together and
obviously I misunderstood your comment to Joel.
I am very interested to learn more about how to approach struts
application design in a less page centric manner
As an aside and merely as a suggestion, Joel, you might want to cut
out parts of the emails that are not relevant to your point. This
cuts down on the size of the output stream and makes things easier to
read too. See within:
On Fri, 11 Mar 2005 12:39:49 -0700, Schuster Joel M Contr ESC/NDC
<[E
On Fri, 11 Mar 2005 12:09:25 -0800, Jesse Clark <[EMAIL PROTECTED]> wrote:
> Joel,
>
> Here is a short description from the FAQ that starts to describe the
> alternative that Jack mentioned below:
> http://struts.apache.org/faqs/newbie.html#prepopulate.
>
> This approach basically means that you
--- I keep getting the impression that I've missed something in my
understanding of how and more importantly why --- I want to understand, not
just do things blindly.
I understand that the ActionForm is intended to STORE and VALIDATE
USER-ENTERED data (off the struts page)... but then there seems t
irst display that
inventory?
- Joel
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 12:02 PM
To: Struts Users Mailing List
Subject: Re: Correct Prepopulate Method
I may be wrong, Joel, but I think Joe and Hubert are thinking of you
instantiating
How do you get to the point of having a
person select inventory and purchase it if you can't first display that
inventory?
- Joel
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 12:02 PM
To: Struts Users Mailing List
Subject: Re: Correct Pr
ginal Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 11, 2005 10:13 AM
> To: Struts Users Mailing List
> Subject: Re: Correct Prepopulate Method
>
> On Fri, 11 Mar 2005 09:50:59 -0700, Schuster Joel M Contr ESC/NDC
> <[EMAIL PROTECTED]&g
again.
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 10:13 AM
To: Struts Users Mailing List
Subject: Re: Correct Prepopulate Method
On Fri, 11 Mar 2005 09:50:59 -0700, Schuster Joel M Contr ESC/NDC
<[EMAIL PROTECTED]> wrote:
> I'm not sure I
Hubert has already pretty well described good coding practice for
getting an ActionForm instance. Note that the pages you cited may
have been written before the FormBeanConfig object acted as a
factory, which is a relatively recent enhancement.
Really, though, I think there should probably be
t; To: Struts Users Mailing List
> Subject: Re: Correct Prepopulate Method
>
> On Fri, 11 Mar 2005 09:50:59 -0700, Schuster Joel M Contr ESC/NDC
> <[EMAIL PROTECTED]> wrote:
> > I'm not sure I understand the need for the moduleConfig and such for
> > creating the Dy
There is no right way. However, if you think Action-centric rather
than page-centric everything is really easy.
If you do this, you won't think of the ActionForm as some sort of
mirror of the JSP/HTML form which stands between the Action and the
form.
Think, rather, of the Action as something th
Thanks... I'll keep playing around using your suggestions.
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 10:13 AM
To: Struts Users Mailing List
Subject: Re: Correct Prepopulate Method
On Fri, 11 Mar 2005 09:50:59 -0700, Schuster J
efault, which
is why that's what I mentioned first. You can choose to use request
scope.
hth,
Hubert
>
>
> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 11, 2005 9:36 AM
> To: Struts Users Mailing List
> Subject: Re: Correc
Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 9:48 AM
To: Struts Users Mailing List
Subject: Re: Correct Prepopulate Method
Too bad ActionForms were called "ActionForms" rather than something
like "ActionData", "ActionState",
ession scope
that we added it into... it just copies it into the request scope too.
--- so back to sqare one. :P
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 9:36 AM
To: Struts Users Mailing List
Subject: Re: Correct Prepopulate Method
You w
Too bad ActionForms were called "ActionForms" rather than something
like "ActionData", "ActionState", or "ActionContext". The html pages
are "populated", I guess, with data. If you try to map ActionForms to
html or JSP forms, I think your whole way of looking at the problems
becomes completely sk
You would usually do prepopulation in a setup form. Which scope you
place the form in depends on how you configure the action that the
form will be submitted to. For example, if you have "/showPage.do"
and "/submitForm.do", where submitForm is configured as:
Then in the action for showPage
39 matches
Mail list logo