If there are 2 actions, one to prepare the page and
one to process the user input, we define the input attribute
value of the process action mapping to be the URL of the
prepare action. I think it's right,
I think it's right only in simple cases
If your prepare means:
- Putting in the
I think it's right only in simple cases
If your prepare means:
- Putting in the request a collection for a select (for example)
- Initializing the form with data from DB or any other source
You are doing 2 things completely different (logically)
in the same action and that's why you need a
Ok. So an action prepares the collection for the select.
The other one initializes the form with data from DB.
To which one should I set the input property of the save action?
If I set it to the second one (which initializes the form) I will
have the same problem... should this action
The input for the save action is the second action or the jsp
page if you use a filter.
Am i missing something?
No! Yu're right! Why didn't I think about it!?
THANK YOU
(grazie...)
-
To unsubscribe, e-mail: [EMAIL
in other words, your setup action will be called only when you enter
the page for the first time
Suppose I have:
1) A listbox with values retrieved from db
2) a form with values retrieved from db that the user can change.
Now, if I don't call the setup action when there's a validation error,
I'm sorry, I'll try to explain better.
If I used your solution in case of a validation error my list box
would not be filled.
When you have a validation error it returns to the page where you
filled the
list box and these values are the same that the user introduced.
The listbox and
: repost: validator retrieving data
I'm sorry, I'll try to explain better.
If I used your solution in case of a validation error my list box
would not be filled.
When you have a validation error it returns to the page where you
filled the
list box and these values are the same that the user
When an error occur, it doesnt return to preprare action. It just back to
the page selected in the tag input (input=/prepare.jsp )
You dont need to write code like this...
if (!comingFromAValidationError())
form.fillfromDB();
else
// leave form as is, with data entered by the user
}
Ok,
I understand you...
Let me I think it...
- Original Message -
From: Leonardo Francalanci [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 06, 2004 10:21 AM
Subject: R: repost: validator retrieving data
When an error occur, it doesnt return
Ok,
I understand you...
Let me I think it...
I found 2 solutions so far:
1) hidden field in the form
(extending a Form that has an hidden field and extending an action that has
a method
like isComingFromAValidatorError() that looks for the value of the hidden
par)
2) If the request is a GET
: Leonardo Francalanci [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 06, 2004 10:44 AM
Subject: R: repost: validator retrieving data
Ok,
I understand you...
Let me I think it...
I found 2 solutions so far:
1) hidden field in the form
(extending a Form
You don't need 2 actions only 3 mappings yes
But action would only be 1 Single Class
-Original Message-
From: Leonardo Francalanci [mailto:[EMAIL PROTECTED]
Sent: Friday, February 06, 2004 3:15 PM
To: Struts Users Mailing List
Subject: R: repost: validator retrieving data
Ok,
I
I'm sorry but nobody answered my question...
Could somebody help me?
I'm using validator for my pages. Searching the mailing list I found
that I should use 2 actions:
If there are 2 actions, one to prepare the page and one to process the
user input, we define the input attribute value of the
PROTECTED]
Subject: repost: validator retrieving data
I'm sorry but nobody answered my question...
Could somebody help me?
I'm using validator for my pages. Searching the mailing list I found
that I should use 2 actions:
If there are 2 actions, one to prepare the page and one to process
the user
, February 05, 2004 5:44 PM
To: [EMAIL PROTECTED]
Subject: repost: validator retrieving data
I'm sorry but nobody answered my question...
Could somebody help me?
I'm using validator for my pages. Searching the mailing list I found
that I should use 2 actions:
If there are 2 actions, one to prepare
febbraio 2004 15.53
A: [EMAIL PROTECTED]
Oggetto: RE: repost: validator retrieving data
Sorry there was a typo in last one
Hi,
You don't need to have two actions but you can have different mappings
for the same action class
For e.g.
action name=formbean path=abcdisplay type
05, 2004 5:44 PM
To: [EMAIL PROTECTED]
Subject: repost: validator retrieving data
I'm sorry but nobody answered my question...
Could somebody help me?
I'm using validator for my pages. Searching the mailing list I found
that I should use 2 actions:
If there are 2 actions, one to prepare
05, 2004 5:44 PM
To: [EMAIL PROTECTED]
Subject: repost: validator retrieving data
I'm sorry but nobody answered my question...
Could somebody help me?
I'm using validator for my pages. Searching the mailing list I found
that I should use 2 actions:
If there are 2 actions, one to prepare
Francalanci [mailto:[EMAIL PROTECTED]
Sent: 05 February 2004 14:44
To: Struts Users Mailing List
Subject: R: repost: validator retrieving data
It seems a good solution, but compared to the hidden field:
1) I have to set up an action just to show the error. With
the hidden field I could use 2
:[EMAIL PROTECTED]
Inviato: venerdì 5 dicembre 2003 16.56
A: Struts Users Mailing List
Oggetto: Re: repost: validator retrieving data
I don't know if the proposal of Anant works. I know my proposal
works well.
You must use the same bean in the page proccess and the page prepare.
For e.g
a validation error or a simple GET.
Did I make myself clearer?
Thank you
-Messaggio originale-
Da: Alvaro Martinez [mailto:[EMAIL PROTECTED]
Inviato: venerdì 5 dicembre 2003 16.56
A: Struts Users Mailing List
Oggetto: Re: repost: validator retrieving data
I don't know
[mailto:[EMAIL PROTECTED]
Inviato: venerdì 5 dicembre 2003 16.56
A: Struts Users Mailing List
Oggetto: Re: repost: validator retrieving data
I don't know if the proposal of Anant works. I know my proposal
works well.
You must use the same bean in the page proccess and the page prepare.
For e.g
You would have to hard code the values in your action class
-Original Message-
From: Leonardo Francalanci [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 05, 2004 8:14 PM
To: Struts Users Mailing List
Subject: R: repost: validator retrieving data
It seems a good solution
23 matches
Mail list logo