No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Assign value to field from another existing field in the datasource

    Hi again.

    I just want to know if in GWT there is a way to assign a value for a field from another existing field in .ds.xml datasource.


    * I have name, lastname, gender and hiddenField in my datasource.
    * I have gender field as mandatory.
    * When the user execute the operation binding save, the hiddenField gets a copy of the value from the gender field.

    It's is possible do this in the .ds.xml file?

    You could do this via operationBinding.values or via Server Scripting. See the docs for examples.


      Hi Isomorphic,

      I'm interested in the first solution. I saw this site but honestly didn't get it how works. I tried but the site keeps saying that the value is null when is saved to the database.

      The column that I'm trying to save the record is a not null column.

      I tried like the example of the page:

      <binding operationType="add" serverMethod="saveRole">
                  <serverObject lookupStyle="spring" bean="tprUIHandler" />
                  <values fieldName="role_description" value="$responseData.last('tprRole','add').description_en" />    
      but it didn't worked.


        That won't work because you are trying to refer to the value from the last response but there is no last response - you are only executing one request. Instead, refer to the other field in the request: $dsRequest.values.description_en


          Thank you very much for your quick support ! Now I can understand a little more this framework.