CTED]> wrote:
>>
>> I would like to hear what is good practice for prepopulating forms.
>>
>> For example, I want to create a Map with options to populate a select
>> with, and this needs to be done before validation but also after failed
>> validation before
This might help:
http://struts.apache.org/2.0.6/docs/how-do-we-repopulate-controls-when-validation-fails.html
musachy
On 5/9/07, Torsten Römer <[EMAIL PROTECTED]> wrote:
I would like to hear what is good practice for prepopulating forms.
For example, I want to create a Map with opti
I would like to hear what is good practice for prepopulating forms.
For example, I want to create a Map with options to populate a select
with, and this needs to be done before validation but also after failed
validation before the form is redisplayed.
Right now I am creating the map in the
Thanks for all the answers. The problem was indeed that i used perform
instead of execute :-s
_
Kies nu de Site Van Het Jaar en win prachtige prijzen!
http://www.sitevanhetjaar.be/
--
Just a quick look and noticed you aren't being consistent with your use
of the findForward. You should be consistent in your code in regard to
whether you plan to use a Constants class or not. In one place
(EvaluatiePreAction) you are hardcoding "success" but in LoginAction you
are using the Co
Did you try changing the LogonAction to implement 'execute' instead of
the old 'perform' method?
Brij Naald wrote:
Not unless you would like to try posting
non-private parts of your action class for list members to review.
In advance: thanks for all the work you put in some 'newbie'-problems!
I'v
Not unless you would like to try posting
non-private parts of your action class for list members to review.
In advance: thanks for all the work you put in some 'newbie'-problems!
I've checked the "success"-issue, but this was'nt the problem.
Here are the java-files
**
* Evaluati
class for list members to review.
Regards,
David
-Original Message-
From: Brij Naald [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 4:41 PM
To: [EMAIL PROTECTED]
Subject: RE: prepopulating forms
No, that isn't the fault. Thanks!
>What is the signature of your execute()
No, that isn't the fault. Thanks!
What is the signature of your execute() method? I occasionally click on
the
wrong signature in my Eclipse IDE and use ServletRequest/ServletResponse
instead of HttpServltRequest/HttpServletResponse.
Regards,
David
: Wednesday, November 24, 2004 4:04 PM
To: [EMAIL PROTECTED]
Subject: RE: prepopulating forms
I just tried it, but I don't see an solution in this.
The problem is that the execute() of EvaluatiePreAction never is called.
The output of the mapping.findForward().getPath() is /EvaluatiePre.do (which
I just tried it, but I don't see an solution in this.
The problem is that the execute() of EvaluatiePreAction never is called.
The output of the mapping.findForward().getPath() is /EvaluatiePre.do (which
seems to be correct)
Thanks for the answer!
/EvaluatiePre.do
Hvae you tried logging the path
3:16 PM
To: [EMAIL PROTECTED]
Subject: prepopulating forms
Hi,
i'm trying to prepopulate a form. To do this I followed the advice on this
list to look at the mailreader-app that comes with struts. I also tried
other sollutions posted here, but still i really can't get it right.
I star
Hi,
i'm trying to prepopulate a form. To do this I followed the advice on this
list to look at the mailreader-app that comes with struts. I also tried
other sollutions posted here, but still i really can't get it right.
I started from the code of the logon-example which came with struts. This
o
Yes, I think that's a great improvement. Still, I feel like Struts
should be responsible for managing the scopes and the placement of
the form bean into the correct scope.
Also, and this may just be because I got on the "view controller"
horse a long time ago, but I feel like there should be a
Apologies Erik, its not in this version...maybe the next one.
Niall
- Original Message -
From: "Erik Weber" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, July 12, 2004 10:44 PM
Subject: Re: Prepopulatin
recently released Sruts 1.2.1 beta allows you to inherit from another
form
> > definition using the extends attribute
> >
> > Niall
> >
> > - Original Message -
> > From: "Erik Weber" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing
Awesome! Inheritance in, or parameterizing of, the Validator plugin,
will be the last step in getting a CRU (no D) use case finished the
*right* way (hopefully). This is with declarative validation,
declarative exception handling, an action layer, a business layer and a
data access layer (archi
bute
>
> Niall
>
> - Original Message -
> From: "Erik Weber" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, July 12, 2004 10:09 PM
> Subject: Re: Prepopulating forms & validation
>
>
&
On Mon, 12 Jul 2004 17:09:41 -0400, Erik Weber <[EMAIL PROTECTED]>
wrote:
Because of one or two fields being different between add and update
forms, I fear I'll have to do a nearly-redundant (and very long)
element for my update condition in validation.xml. Does anyone have a
better solut
ts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, July 12, 2004 10:09 PM
Subject: Re: Prepopulating forms & validation
> Thanks a lot! I no doubt will find that very useful.
>
> I have another question for the group at large:
>
> I am now using the same form successful
On Mon, 12 Jul 2004 17:09:41 -0400, Erik Weber <[EMAIL PROTECTED]>
wrote:
I am now using the same form successfully for adds and updates. I am
using the Validator plugin for validation, which I find to be pretty
awesome. The problem I face though is, the fields I need to validate are
sligh
On Mon, 12 Jul 2004 22:09:15 +0100, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
// Find the FormBeanConfig
FormBeanConfig config =
mapping.getModuleConfig().findFormBeanConfig("myForm");
I've only rarely ever had to create Forms in my Actions (like you're doing
in the above). I'd be curi
On Mon, 12 Jul 2004 13:02:21 -0400, Erik Weber <[EMAIL PROTECTED]>
wrote:
I recall that when I set the "value" property on any of my inputs, I ran
into a problem with user input changes being "remembered" in the case of
a page reload due to form validation failure.
This depends Erik. If you
Thanks a lot! I no doubt will find that very useful.
I have another question for the group at large:
I am now using the same form successfully for adds and updates. I am
using the Validator plugin for validation, which I find to be pretty
awesome. The problem I face though is, the fields I need t
Joe,
Do you not think that the new standard mechanism in Struts 1.2.1 for
creating ActionForms (regular or Dyna) makes this more straight forward?
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
On Mon, 12 Jul 2004 12:22:11 -0400, Erik Weber <[EMAIL PROTECTED]>
wrote:
Using BeanUtils.copyProperties(), it's a piece of cake to update your
Form bean from the ValueObject properties.
Do you have an example of this, or is there one on your site? I indeed
have some properties that are th
At 6:33 PM +0200 7/12/04, Amleto Di Salle wrote:
Hi all,
you can use the action in order to obtain the VO.
But a question: Are you using the html tags inside your jsp?
If yes, you can put the VO in the request and use the "value" (for
example value="${requestScope.anObject.aProperty}") attribute in
Joe and Wendy, thanks for all your help. Hearing the practical advice
and the theoretical advice gives me a plan for getting things done but
also keeps me thinking toward the best way of doing things!
I think what you are saying here will dawn on me more as I get deeper
into development, and I
From: "Amleto Di Salle" <[EMAIL PROTECTED]>
> But a question: Are you using the html tags inside your jsp?
> If yes, you can put the VO in the request and use the "value" (for
> example value="${requestScope.anObject.aProperty}") attribute in the
> html tags (for example "html:text).
If you do tha
ld like to appreciate some comments in order to use this solution.
BR
/Amleto
-Messaggio originale-
Da: Erik Weber [mailto:[EMAIL PROTECTED]
Inviato: lunedì 12 luglio 2004 18.17
A: Struts Users Mailing List
Oggetto: Re: Prepopulating forms
Joe, thanks for your opinion. You and Rick have co
At 12:16 PM -0400 7/12/04, Erik Weber wrote:
Joe, thanks for your opinion. You and Rick have convinced me to stay
with one form page for add/update. I did this before in a non-struts
app, and despite all the conditionals I ended up with, the ensuing
layout revisions did make it worth it.
So, Jo
ample "html:text).
I would like to appreciate some comments in order to use this solution.
BR
/Amleto
-Messaggio originale-
Da: Erik Weber [mailto:[EMAIL PROTECTED]
Inviato: lunedì 12 luglio 2004 18.17
A: Struts Users Mailing List
Oggetto: Re: Prepopulating forms
Joe, thanks for y
From: "Erik Weber" <[EMAIL PROTECTED]>
> Joe, thanks for your opinion. You and Rick have convinced me to stay
> with one form page for add/update. I did this before in a non-struts
> app, and despite all the conditionals I ended up with, the ensuing
> layout revisions did make it worth it.
Take a
Thanks Rick. As I said in another response, I think I will go with a
shared add/update form.
Also, I think we meant the same thing, as far as action mappings go, I
just didn't explain very clearly. Indeed, I think now I will just map an
action to every screen and the user will never see "*.jsp"
Joe, thanks for your opinion. You and Rick have convinced me to stay
with one form page for add/update. I did this before in a non-struts
app, and despite all the conditionals I ended up with, the ensuing
layout revisions did make it worth it.
So, Joe, I am not using Dyna Forms, just plain old
In my experience, it helps all involved to avoid redundancy and
copying. If you logically treat inserts and updates as more "same"
than "different" then you're better off making one page with
conditionals. This serves as implicit documentation of the fact that
they are more the same, while ha
On Mon, 12 Jul 2004 10:31:29 -0400, Erik Weber <[EMAIL PROTECTED]>
wrote:
1) Use two different JSPs to house these forms, even though there will
be a lot of redundancy, because the fields may have some variation, and
because I'm not fond of having conditionals in the form (if (add) { }
els
Hello. I want to solicit some advice and opinions. Working on my first
Struts app.
I have some use cases that call for typcial "add" and "update"
functionality that basically can share the same forms. Obviously when
the form is first displayed under "add" conditions, it needs to be
blank. Unde
38 matches
Mail list logo