You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Britske <gb...@gmail.com> on 2008/07/08 00:27:20 UTC
T5: beaneditform: properties don't get populated although model is
bound
I've got a beaneditform which displays a userprofile, with among other things
2 passwordsfields.
When displaying an existing userprofile all fields except the password
fields are rendered, (the password fields remain empty), although values for
the password-fields exists in the bound userprofile.
These password fields as exactly the fields that I overwrite using the
parameter-construction.
Anyone knows why this happens?
relevant snippets:
private User user;
@Persist("flash") private User userOld;
public void onActivate(Object[] list){
if(isUserExists()){
user = getSessionModel().getUser();
userOld = user.clone();
}
}
//template
<t:beaneditform t:id="beanEditForm" object="user"
submitlabel="prop:LabelForSuccess">
<t:parameter name="password">
<t:label for="password"/>
<t:passwordfield t:id="password" value="user.password"/>
</t:parameter>
<t:parameter name="passwordagain">
<t:label for="passwordagain"/>
<t:passwordfield t:id="passwordagain"
value="user.passwordagain"/>
</t:parameter>
</t:beaneditform>
Thanks a lot.
--
View this message in context: http://www.nabble.com/T5%3A-beaneditform%3A-properties-don%27t-get-populated-although-model-is-bound-tp18328072p18328072.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: beaneditform: properties don't get populated although
model is bound
Posted by "Martijn Brinkers (List)" <ma...@gmail.com>.
See:
http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/PasswordField.html
...Further, the output value for a PasswordField is always blank.
Martijn
On Mon, 2008-07-07 at 15:32 -0700, Britske wrote:
> partially answering my own question: it doens't happen when both
> passwordfields are changed from type: passwordField to type: textField.
>
> Perhaps this is a bug in passwordField?
> Kind regards,
> Britske
>
>
> Britske wrote:
> >
> > I've got a beaneditform which displays a userprofile, with among other
> > things 2 passwordsfields.
> > When displaying an existing userprofile all fields except the password
> > fields are rendered, (the password fields remain empty), although values
> > for the password-fields exists in the bound userprofile.
> >
> > These password fields as exactly the fields that I overwrite using the
> > parameter-construction.
> > Anyone knows why this happens?
> >
> > relevant snippets:
> >
> > private User user;
> > @Persist("flash") private User userOld;
> > public void onActivate(Object[] list){
> > if(isUserExists()){
> > user = getSessionModel().getUser();
> > userOld = user.clone();
> > }
> > }
> >
> > //template
> > <t:beaneditform t:id="beanEditForm" object="user"
> > submitlabel="prop:LabelForSuccess">
> > <t:parameter name="password">
> > <t:label for="password"/>
> > <t:passwordfield t:id="password" value="user.password"/>
> > </t:parameter>
> > <t:parameter name="passwordagain">
> > <t:label for="passwordagain"/>
> > <t:passwordfield t:id="passwordagain"
> > value="user.passwordagain"/>
> > </t:parameter>
> > </t:beaneditform>
> >
> > Thanks a lot.
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: beaneditform: properties don't get populated although model
is bound
Posted by Britske <gb...@gmail.com>.
partially answering my own question: it doens't happen when both
passwordfields are changed from type: passwordField to type: textField.
Perhaps this is a bug in passwordField?
Kind regards,
Britske
Britske wrote:
>
> I've got a beaneditform which displays a userprofile, with among other
> things 2 passwordsfields.
> When displaying an existing userprofile all fields except the password
> fields are rendered, (the password fields remain empty), although values
> for the password-fields exists in the bound userprofile.
>
> These password fields as exactly the fields that I overwrite using the
> parameter-construction.
> Anyone knows why this happens?
>
> relevant snippets:
>
> private User user;
> @Persist("flash") private User userOld;
> public void onActivate(Object[] list){
> if(isUserExists()){
> user = getSessionModel().getUser();
> userOld = user.clone();
> }
> }
>
> //template
> <t:beaneditform t:id="beanEditForm" object="user"
> submitlabel="prop:LabelForSuccess">
> <t:parameter name="password">
> <t:label for="password"/>
> <t:passwordfield t:id="password" value="user.password"/>
> </t:parameter>
> <t:parameter name="passwordagain">
> <t:label for="passwordagain"/>
> <t:passwordfield t:id="passwordagain"
> value="user.passwordagain"/>
> </t:parameter>
> </t:beaneditform>
>
> Thanks a lot.
>
--
View this message in context: http://www.nabble.com/T5%3A-beaneditform%3A-properties-don%27t-get-populated-although-model-is-bound-tp18328072p18328137.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: beaneditform: properties don't get populated although
model is bound
Posted by "Martijn Brinkers (List)" <ma...@gmail.com>.
You should not do this. It's insecure. On a side note: passwords should
never be stored, they should be hashed which makes it impossible to
restore the password. And thus, the password field should show the
passwords because you do not have the passwords :)
Martijn Brinkers
On Mon, 2008-07-07 at 15:50 -0700, Britske wrote:
> yeah that makes sense.
> However, when a user wants to edit his userprofile, I want the password
> fields to be filled in. How would I do this using the beaneditform? Is this
> at all possible?
>
>
>
>
> Martijn Brinkers (List)-2 wrote:
> >
> > That's intentional. You do not want your password to be sent to the
> > client.
> >
> > Martijn
> >
> >
> > On Mon, 2008-07-07 at 15:27 -0700, Britske wrote:
> >> I've got a beaneditform which displays a userprofile, with among other
> >> things
> >> 2 passwordsfields.
> >> When displaying an existing userprofile all fields except the password
> >> fields are rendered, (the password fields remain empty), although values
> >> for
> >> the password-fields exists in the bound userprofile.
> >>
> >> These password fields as exactly the fields that I overwrite using the
> >> parameter-construction.
> >> Anyone knows why this happens?
> >>
> >> relevant snippets:
> >>
> >> private User user;
> >> @Persist("flash") private User userOld;
> >> public void onActivate(Object[] list){
> >> if(isUserExists()){
> >> user = getSessionModel().getUser();
> >> userOld = user.clone();
> >> }
> >> }
> >>
> >> //template
> >> <t:beaneditform t:id="beanEditForm" object="user"
> >> submitlabel="prop:LabelForSuccess">
> >> <t:parameter name="password">
> >> <t:label for="password"/>
> >> <t:passwordfield t:id="password" value="user.password"/>
> >> </t:parameter>
> >> <t:parameter name="passwordagain">
> >> <t:label for="passwordagain"/>
> >> <t:passwordfield t:id="passwordagain"
> >> value="user.passwordagain"/>
> >> </t:parameter>
> >> </t:beaneditform>
> >>
> >> Thanks a lot.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: beaneditform: properties don't get populated although model
is bound
Posted by Britske <gb...@gmail.com>.
yeah that makes sense.
However, when a user wants to edit his userprofile, I want the password
fields to be filled in. How would I do this using the beaneditform? Is this
at all possible?
Martijn Brinkers (List)-2 wrote:
>
> That's intentional. You do not want your password to be sent to the
> client.
>
> Martijn
>
>
> On Mon, 2008-07-07 at 15:27 -0700, Britske wrote:
>> I've got a beaneditform which displays a userprofile, with among other
>> things
>> 2 passwordsfields.
>> When displaying an existing userprofile all fields except the password
>> fields are rendered, (the password fields remain empty), although values
>> for
>> the password-fields exists in the bound userprofile.
>>
>> These password fields as exactly the fields that I overwrite using the
>> parameter-construction.
>> Anyone knows why this happens?
>>
>> relevant snippets:
>>
>> private User user;
>> @Persist("flash") private User userOld;
>> public void onActivate(Object[] list){
>> if(isUserExists()){
>> user = getSessionModel().getUser();
>> userOld = user.clone();
>> }
>> }
>>
>> //template
>> <t:beaneditform t:id="beanEditForm" object="user"
>> submitlabel="prop:LabelForSuccess">
>> <t:parameter name="password">
>> <t:label for="password"/>
>> <t:passwordfield t:id="password" value="user.password"/>
>> </t:parameter>
>> <t:parameter name="passwordagain">
>> <t:label for="passwordagain"/>
>> <t:passwordfield t:id="passwordagain"
>> value="user.passwordagain"/>
>> </t:parameter>
>> </t:beaneditform>
>>
>> Thanks a lot.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/T5%3A-beaneditform%3A-properties-don%27t-get-populated-although-model-is-bound-tp18328072p18328418.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: beaneditform: properties don't get populated although
model is bound
Posted by "Martijn Brinkers (List)" <ma...@gmail.com>.
That's intentional. You do not want your password to be sent to the
client.
Martijn
On Mon, 2008-07-07 at 15:27 -0700, Britske wrote:
> I've got a beaneditform which displays a userprofile, with among other things
> 2 passwordsfields.
> When displaying an existing userprofile all fields except the password
> fields are rendered, (the password fields remain empty), although values for
> the password-fields exists in the bound userprofile.
>
> These password fields as exactly the fields that I overwrite using the
> parameter-construction.
> Anyone knows why this happens?
>
> relevant snippets:
>
> private User user;
> @Persist("flash") private User userOld;
> public void onActivate(Object[] list){
> if(isUserExists()){
> user = getSessionModel().getUser();
> userOld = user.clone();
> }
> }
>
> //template
> <t:beaneditform t:id="beanEditForm" object="user"
> submitlabel="prop:LabelForSuccess">
> <t:parameter name="password">
> <t:label for="password"/>
> <t:passwordfield t:id="password" value="user.password"/>
> </t:parameter>
> <t:parameter name="passwordagain">
> <t:label for="passwordagain"/>
> <t:passwordfield t:id="passwordagain"
> value="user.passwordagain"/>
> </t:parameter>
> </t:beaneditform>
>
> Thanks a lot.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org