-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Working with TabbedFormManager, when double click in a table row to open the detail form, the detail form is not displayed when the form is defined in a different TabbedFormManager that the main form.
For example, if we have a form with 2 tabs and one table in every tab. If the second table form detail is defined in a different TabbedFormManager like:;
clientapplication.xml:
...
<TabbedFormManager id="managerCustomer"
form="sales/customers/xml/formcustomerlist.xml"
imanager="com.imatia.elastic.cliente.sales.customers.IMCustomerList"
resources="com/imatia/elastic/cliente/sales/resources/bundle_customer" >
<InteractionManager form="formcustomer.xml"
class="com.imatia.elastic.cliente.sales.customers.IMCustomer" />
<FManager form="formbusinessgroups.xml" fmid="managerCuentas" />
</TabbedFormManager>
<TabbedFormManager id="managerCuentas"
form="modulos/contactos/xml/formularioprincipalcontactos.xml"
imanager="com.imatia.elastic.cliente.modulos.contactos.GIFormularioPrincipalContactos"
resources="com/imatia/elastic/cliente/modulos/contactos/resources/bundle_contactos">
<InteractionManager form="formbusinessgroups.xml"
class="com.imatia.elastic.cliente.modulos.contactos.cuentas.IMBusinessGroups" />
</TabbedFormManager>
...
sales/customers/xml/formcustomerlist.xml:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Form columns="" entity="" keys="customer_id" title="LIST_CUSTOMERS" buttons="no">
<Row expand="yes">
<TabPanel attr="panel">
<Tab attr="customers_active" tabPanelName="panel">
<Table entity="ESalesCustomersActive" key="customer_id"
cols="customer_id;customer_code;customer_company_name"
visiblecols="customer_code;customer_company_name"
refreshbutton="yes" form="formcustomer.xml"
detailformat="{0} - {1};customer_code;customer_company_name" />
</Tab>
<Tab attr="customers_groups" tabPanelName="panel">
<Table entity="ECtoBusinessGroupsActive" keys="business_group_id"
cols="business_group_id;business_group_description"
visiblecols="business_group_description"
refreshbutton="yes" form="formbusinessgroups.xml"
detailformat="{0};business_group_description" />
</Tab>
</TabPanel>
</Row>
</Form>
When trying to open the detail form in the second table (the form formbusinessgroups.xml), the detail form is not displayed. What happens is that the detail form is added to a different TabbedFormManager.
The problem is in [ IFormManager formManager = this.form.getFormManager();](
ontimize-core-parent/ontimize-core-client/src/main/java/com/ontimize/gui/TabbedDetailForm.java
Line 104 in dae868c
| IFormManager formManager = this.form.getFormManager(); |
Workaround:
IFormManager formManager;
if (this.table != null && this.table.getParentForm() != null && this.table.getParentForm().getFormManager() != null) {
formManager = this.table.getParentForm().getFormManager();
} else {
formManager = this.form.getFormManager();
}
Same on
Line 653 in dae868c
| ((ITabbedFormManager) detailForm.getForm().getFormManager()).removeTab(index); |