Search in sources :

Example 1 with WebAbstractComponent

use of com.haulmont.cuba.web.gui.components.WebAbstractComponent in project cuba by cuba-platform.

the class WebWindowManager method initDebugIds.

@Override
public void initDebugIds(final Frame frame) {
    if (ui.isTestMode()) {
        ComponentsHelper.walkComponents(frame, (component, name) -> {
            if (component.getDebugId() == null) {
                Frame componentFrame = null;
                if (component instanceof BelongToFrame) {
                    componentFrame = ((BelongToFrame) component).getFrame();
                }
                if (componentFrame == null) {
                    log.warn("Frame for component {} is not assigned", component.getClass());
                } else {
                    if (component instanceof WebAbstractComponent) {
                        WebAbstractComponent webComponent = (WebAbstractComponent) component;
                        webComponent.assignAutoDebugId();
                    }
                }
            }
        });
    }
}
Also used : BelongToFrame(com.haulmont.cuba.gui.components.Component.BelongToFrame) BelongToFrame(com.haulmont.cuba.gui.components.Component.BelongToFrame) WebAbstractComponent(com.haulmont.cuba.web.gui.components.WebAbstractComponent)

Aggregations

BelongToFrame (com.haulmont.cuba.gui.components.Component.BelongToFrame)1 WebAbstractComponent (com.haulmont.cuba.web.gui.components.WebAbstractComponent)1