From the module, you may recover the root form.
public void data_getRootForm( IDocumentManagementModule module, IContext context ) throws Exception
{
// retrieving the root element of data
IDataForm form = module.getRootDataForm();
}Example of browsing the forms and retrieving the menu form.
public void data_getMenuForm( IDocumentManagementModule module, IContext context ) throws Exception
{
IDataForm form = module.getRootDataForm();
IMenuDataForm menuForm = module.GetMenuDataFormByName( form, "Menu SDK" );
}Example of browsing the forms and retrieving the standard form.
public void data_getSimpleForm( IDocumentManagementModule module, IContext context ) throws Exception
{
IDataForm form = module.getRootDataForm();
ISimpleDataForm simpleForm = module.GetSimpleDataFormByName( form, "Form SDK" );
}Example of browsing the forms and retrieving the view form.
public void data_getViewForm( IDocumentManagementModule module, IContext context ) throws Exception
{
IDataForm form = module.getRootDataForm();
IViewDataForm viewForm = module.GetViewDataFormByName( form, "View SDK" );
}Example of browsing the sub-forms.
public void data_getForms( IDocumentManagementModule module, IContext context ) throws Exception
{
_DataFormCollection forms = module.getRootDataForm().getDataForms();
for ( int index = 0 ; index < forms.getCount() ; index++ )
{
IDataForm form = forms.getItem( index );
if ( form.getIsMenu() )
// is a menu form
{
IMenuDataForm menuDataForm = form.getMenuDataForm();
// retrieving the child forms (standard,menu or view)
DataFormCollection dataForms = menuDataForm.getDataForm().getDataForms();
}
else if ( form.getIsSimple() )
// is a standard form
{
ISimpleDataForm simpleDataForm = form.getSimpleDataForm();
// retrieving the child forms (standard,menu or view)
DataFormCollection dataForms = simpleDataForm.getDataForm().getDataForms();
// retrieving the data in a standard form
DataUnitCollection dataUnits = simpleDataForm.getDataUnits();
}
else if ( form.getIsView() )
// is a view form
{
IViewDataForm viewDataForm = form.getViewDataForm();
// retrieving the child forms (standard,menu or view)
DataFormCollection dataForms = viewDataForm.getDataForm().getDataForms();
// retrieving the data in a view form
DataUnitCollection dataUnits = viewDataForm.getDataUnits();
}
}
}