Hello, I have a doubt about DynamicForms. I'm using SmartGWT LGPL and the problem is that I have multiple TextItem in a Window, but these fields are divided into two Layouts. To do this I had to put two DynamicForms due to Items are not added directly to the panel.
In my application I have a DataSource bound to the two DynamicForms but when I perform fetchdata() action, these DynamicForms show all the fields contained in the Datasource.
I have try:
dfNForm1.setUseAllDataSourceFields(false);
dfNForm2.setUseAllDataSourceFields(false);
dfNForm1.setFields(getTxtCif(),getTxtName(),getTxtLastName());
dfNForm2.setFields(getTxtEmail(),getTxtUser(),getTxtPassword());
and then,
dfNForm1.setDataSource(ClientDS.getInstance());
dfNForm2.setDataSource(ClientDS.getInstance());
But this doesn't work. Both dynamicforms show all fields.
----
By other hand, I have try to bind DataSource directly to the fields:
txtName.setOptionDataSource(ClientDS.getInstance());
txtName.setDisplayField("name");
But this doesn't show nothing in txtName... :(
Can anyone help me? Thanks
In my application I have a DataSource bound to the two DynamicForms but when I perform fetchdata() action, these DynamicForms show all the fields contained in the Datasource.
I have try:
dfNForm1.setUseAllDataSourceFields(false);
dfNForm2.setUseAllDataSourceFields(false);
dfNForm1.setFields(getTxtCif(),getTxtName(),getTxtLastName());
dfNForm2.setFields(getTxtEmail(),getTxtUser(),getTxtPassword());
and then,
dfNForm1.setDataSource(ClientDS.getInstance());
dfNForm2.setDataSource(ClientDS.getInstance());
But this doesn't work. Both dynamicforms show all fields.
----
By other hand, I have try to bind DataSource directly to the fields:
txtName.setOptionDataSource(ClientDS.getInstance());
txtName.setDisplayField("name");
But this doesn't show nothing in txtName... :(
Can anyone help me? Thanks
Comment