I’m developing a simple application where I have two date fields. When I enter a date in the first field the second date field should automatically be set to the value of the first field + 70 days. I’ve tried using the example found on this post, but I haven’t figured it out.
Sorry for the lack of details. Yes, the fields are connected to a datasource called Processo. So I have a field called dataCativacao and another one called dataExpiracao on this datasource. When I’m editing the datasource I want to automatically change the value of the field dataExpiracao based on the data entered on the field dataCativacao.
Use the “addItemPropertyChangeListener” Method of the Processo Datasource, to automatically change the value of dataExpiracao, after changing the dataCativacao.
Have a look here for information about the Datasource Listeners
Thanks for the reply. Could you please give me some code examples? I’m new to Cuba and I’m not sure how to do what you suggest. How do I injet the datasource in the editor? I have a generic UI Edit screen for the Processo datasource. Should I put the code in the controller section?