> Would you describe what you mean by "faking a property"?
public User getUpdateuser(){
 updateuser = userManager.getCurrent();
 return updateuser;
}

> ... Would you be able to suggest
>> some
>> other way to bind the new properties into the old one?
>>
http://www.stripesframework.org/display/stripes/Binding+Into+Domain+Models

This approach really requires the use of carefully chosen @Validate
annotations and @StrictBinding otherwise the action bean may be used
to update all the references of the domain object.

>>
>>
>>
>> Richard23 wrote:
>>>
>>> I'm not sure. IMO the problem is that you are "faking" a property -
>>> thats just a blind shot. Try to set the log level of the stripes
>>> framework to debug. Then stripes will tell you about binding
>>> problems.
>>>
>>> Last but not least try to improve the code by:
>>> - Try to not break the Property Pattern. This means private member
>>> with a setter and getter. The automatic binding mechanism of stripes
>>> depends on this convention.
>>> - Try to use <input type="text" name="updateuser.name" /> instead of
>>> <input type="text" name="updateuser.name" value="someOtherVariable"/
>>> >.
>>> Stripes automatically invokes the getter for you, so there is no need
>>> to explicitly set the value.
>>> - Try to do clean MVC. This meas load the data from your service
>>> classes and store it in actionBean properties. In your jsp access the
>>> actionBean properties
>>> - Try to make use of StrictBinding annotation to avoid security
>>> issues
>>> and annotate all bindable setters with @Validate
>>>
>>> Regards,
>>> Richard
>>>
>>> On Fri, Apr 30, 2010 at 10:34 PM, rplus <bariskar...@gmail.com>
>>> wrote:
>>>>
>>>>
>>>>
>>>> Richard23 wrote:
>>>>>
>>>>> Wold you be so kind to post the relevant parts of the jsp and the
>>>>> setUser method?
>>>>>
>>>>> Are you using @StrictBinding?
>>>>>
>>>>>
>>>>
>>>> this is the action bean and there is no strict binding.
>>>>
>>>> public Resolution update() {
>>>>  System.out.println(updateuser.getLastName());
>>>>  System.out.println(updateuser.getFirstName());
>>>>  System.out.println(updateuser.getName());
>>>>  userManager.updateUser( updateuser);
>>>>
>>>>  return new JavaScriptResolution(resolutionObject);
>>>> }
>>>> private User updateuser;
>>>> public User getUpdateuser(){
>>>>  updateuser = userManager.getCurrent();
>>>>  return updateuser;
>>>> }
>>>>
>>>> public void setUpdateuser(User user){
>>>>  this.updateuser = user;
>>>> }
>>>>
>>>>
>>>> this is jsp :
>>>>
>>>> <s:form action="${contextPath}/settings/profile/update"
>>>> onsubmit='ajaxify({e: event, form: this});'>
>>>> <input type="text" name="updateuser.firstName"
>>>> value="${actionBean.currentUser.firstName}" />
>>>> <input type="text" name="updateuser.name"
>>>> value="${actionBean.currentUser.name}" />
>>>> <input type="text" name="updateuser.lastName"
>>>> value="${actionBean.currentUser.lastName}" />
>>>> <s:submit name="update">update</s:submit>
>>>> </s:form>
>>>>
>>>> and this is model
>>>>
>>>> public class User extends ProfileBase {
>>>>
>>>> @Column(name = "first_name", length = 40)
>>>> private String firstName;
>>>> @Column(name = "last_name", length = 40)
>>>> private String lastName;
>>>>
>>>> }
>>>>
>>>> only one of the firstname or lastname fields bind. userManager is
>>>> also an
>>>> ejb local interface.
>>>> What can be the problem?
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Stripes-Binding-Problem-tp28411715p28416439.html
>>>> Sent from the stripes-users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---
>>>> ---
>>>> ---
>>>> ---
>>>> ------------------------------------------------------------------
>>>> _______________________________________________
>>>> Stripes-users mailing list
>>>> Stripes-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>>>
>>>
>>>
>>>
>>> --
>>> Richard Hauswald
>>> Blog: http://tnfstacc.blogspot.com/
>>> LinkedIn: http://www.linkedin.com/in/richardhauswald
>>> Xing: http://www.xing.com/profile/Richard_Hauswald
>>>
>>> ---
>>> ---
>>> ---
>>> ---------------------------------------------------------------------
>>> _______________________________________________
>>> Stripes-users mailing list
>>> Stripes-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>>
>>>
>>
>> --
>> View this message in context: 
>> http://old.nabble.com/Stripes-Binding-Problem-tp28411715p28421700.html
>> Sent from the stripes-users mailing list archive at Nabble.com.
>>
>>
>> ---
>> ---
>> ---
>> ---------------------------------------------------------------------
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>



-- 
Richard Hauswald
Blog: http://tnfstacc.blogspot.com/
LinkedIn: http://www.linkedin.com/in/richardhauswald
Xing: http://www.xing.com/profile/Richard_Hauswald

------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to