Here's my usecase:
I create a user. it has ds fields like first name, last name etc.
I have an additional field called "password send method". This is not part of the user itself, but part of the add operation. i have it as a popup parameter when the user presses save - "How do you want to send the password"
- So, i'm trying to, when i call form.save to add an additional field, which i do like 'form.setValue("passwordSendMethod", "BANANA");'
On the server, i have a spring bean method, add(UserTO user). The TO is just a javabean, and it has the passwordSendMethod.
---
Now, i can see that the passwordSendMethod appears on the server, it becomes a field in both the "values" and "clientSuppliedValues" maps of the dsRequest. However, it does not get set in the UserTO, probably because it's not one of the fields in the user.ds.xml?
I tried debugging a bit and in DataTools, a property seems to be not inserted into the "tryAsBean" map if the field is not in the datasource?
So, pretty basic question:
Is there for me to have a submitted property value added to my transferobject automatically even if it's not declared in the ds.xml?
I am doing this for 2 reasons:
1. is don't want the field in the ds.xml if i can avoid it since it's not really a part of the user.
2. i would still like it to be added to the transfer object, since then i don't have to declare the datasource and/or the values map as a method parameter and do manual digging out of the parameter.
Pointers appreciated
I create a user. it has ds fields like first name, last name etc.
I have an additional field called "password send method". This is not part of the user itself, but part of the add operation. i have it as a popup parameter when the user presses save - "How do you want to send the password"
- So, i'm trying to, when i call form.save to add an additional field, which i do like 'form.setValue("passwordSendMethod", "BANANA");'
On the server, i have a spring bean method, add(UserTO user). The TO is just a javabean, and it has the passwordSendMethod.
---
Now, i can see that the passwordSendMethod appears on the server, it becomes a field in both the "values" and "clientSuppliedValues" maps of the dsRequest. However, it does not get set in the UserTO, probably because it's not one of the fields in the user.ds.xml?
I tried debugging a bit and in DataTools, a property seems to be not inserted into the "tryAsBean" map if the field is not in the datasource?
So, pretty basic question:
Is there for me to have a submitted property value added to my transferobject automatically even if it's not declared in the ds.xml?
I am doing this for 2 reasons:
1. is don't want the field in the ds.xml if i can avoid it since it's not really a part of the user.
2. i would still like it to be added to the transfer object, since then i don't have to declare the datasource and/or the values map as a method parameter and do manual digging out of the parameter.
Pointers appreciated
Comment