Search in sources :

Example 1 with FormView

use of com.axelor.meta.schema.views.FormView in project axelor-open-suite by axelor.

the class ReportBuilderService method processView.

/**
 * Method parse given xml to create html.
 *
 * @param xml View xml passed.
 * @throws JAXBException Xml parsing exception.
 */
private void processView(String xml) throws JAXBException {
    ObjectViews objectViews = XMLViews.fromXML(xml);
    AbstractView view = objectViews.getViews().get(0);
    FormView formView = (FormView) view;
    for (AbstractWidget widget : formView.getItems()) {
        if (widget instanceof PanelTabs) {
            PanelTabs panelTabs = (PanelTabs) widget;
            AbstractWidget tabItem = panelTabs.getItems().get(0);
            processAbstractWidget(tabItem, false);
            continue;
        }
        processAbstractWidget(widget, false);
    }
}
Also used : AbstractView(com.axelor.meta.schema.views.AbstractView) PanelTabs(com.axelor.meta.schema.views.PanelTabs) ObjectViews(com.axelor.meta.schema.ObjectViews) AbstractWidget(com.axelor.meta.schema.views.AbstractWidget) FormView(com.axelor.meta.schema.views.FormView)

Aggregations

ObjectViews (com.axelor.meta.schema.ObjectViews)1 AbstractView (com.axelor.meta.schema.views.AbstractView)1 AbstractWidget (com.axelor.meta.schema.views.AbstractWidget)1 FormView (com.axelor.meta.schema.views.FormView)1 PanelTabs (com.axelor.meta.schema.views.PanelTabs)1