The problem is this:

I have a form, people enter values and submit, if there is an error I would like the 
form fields to be pre-populated from whatever
was entered rather than typing the form all over again. Is there any way Intake can 
help. For example: if I say
<input type="text" name="$docGroup.Name.Key" value="$!docGroup.Name"> will the value 
be retained with what was submitted. Or do I
have to say $data.parameters.getString($docGroup.Name.Key)?

The problem is not that I have to write this function but during modification of 
object attributes. In that case, the first time the
data should be populated from the bean but later on from the parameter parser. For 
example let's say that Description attribute was
"foo", so the first time the form screen will show "foo" in the text box. Now the user 
changes it to "bar" and submits and lets say
that there was an error in a different field so that the form gets shown again. 
However, we still want "bar" to be shown, not foo.
If there was a way to specify how the group gets populated from a parameter parser (we 
already know howfrom Bean) this problem can
be solved very easily.

Am I making sense?

Thanks.

----- Original Message -----
From: "Weaver, Scott" <[EMAIL PROTECTED]>
To: "'Turbine Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 7:56 PM
Subject: RE: Intake group fields don't get populated from ParameterParser


: > Doesn't the group automatically get
: > populated from
: > the parameter parser?
:
: No.  You must create an instance of the IntakeTool, retrieve your Group and
: then explicitly call the Group.setProperties(Retrievable).
:
: Group.setProperties(Retrievable) where Retrievable is the Object to which
: you want set the values of based on the form data.  It is EXTREMELY
: important that the java object you are trying to map values into implements
: the Retrievable interface or this will not work.
:
: Also, some code would also be nice to help us assist you in the debugging of
: this issue.
:
: hth,
: Scott
:
:
:
:
: > -----Original Message-----
: > From: Nikhil G. Daddikar [mailto:[EMAIL PROTECTED]]
: > Sent: Friday, May 17, 2002 4:25 AM
: > To: Turbine Users List
: > Subject: Intake group fields don't get populated from ParameterParser
: >
: >
: > When there is an error i.e. when intake.isAllValid is false,
: > i re-show the orginal form as described in the Intake HowTo. However
: > when I print something like
: >
: > $docGroup.Name when field Name was actually set correctly it
: > still returns blank. Doesn't the group automatically get
: > populated from
: > the parameter parser?
: >
: > Thanks for any input.
: > Nikhil
: >
: >
: > --
: > To unsubscribe, e-mail:
: > <mailto:[EMAIL PROTECTED]>
: > For additional commands, e-mail:
: > <mailto:[EMAIL PROTECTED]>
: >
:


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to