Search in sources :

Example 1 with IPortalComponent

use of com.servoy.j2db.ui.IPortalComponent in project servoy-client by Servoy.

the class ComponentFactory method createPortal.

private static IComponent createPortal(IApplication application, Form form, Portal meta, IDataProviderLookup dataProviderLookup, IScriptExecuter el, boolean printing) {
    RuntimePortal scriptable = new RuntimePortal(application.getItemFactory().createChangesRecorder(), application);
    IPortalComponent portalComponent = application.getItemFactory().createPortalComponent(scriptable, meta, form, dataProviderLookup, el, printing);
    scriptable.setComponent(portalComponent, meta);
    IStyleSheet ss = ComponentFactory.getCSSStyleForForm(application, form);
    if (ss != null) {
        String lookupname = "portal";
        if (meta.getStyleClass() != null && !"".equals(meta.getStyleClass())) {
            lookupname += '.' + meta.getStyleClass();
        }
        portalComponent.setRowStyles(ss, ss.getCSSRule(lookupname + " " + ISupportRowStyling.CLASS_ODD), ss.getCSSRule(lookupname + " " + ISupportRowStyling.CLASS_EVEN), ss.getCSSRule(lookupname + " " + ISupportRowStyling.CLASS_SELECTED), ss.getCSSRule(lookupname + " " + ISupportRowStyling.CLASS_HEADER));
    }
    return portalComponent;
}
Also used : IStyleSheet(com.servoy.j2db.util.IStyleSheet) RuntimePortal(com.servoy.j2db.ui.scripting.RuntimePortal) IPortalComponent(com.servoy.j2db.ui.IPortalComponent)

Aggregations

IPortalComponent (com.servoy.j2db.ui.IPortalComponent)1 RuntimePortal (com.servoy.j2db.ui.scripting.RuntimePortal)1 IStyleSheet (com.servoy.j2db.util.IStyleSheet)1