Search in sources :

Example 1 with FlattenedLayoutContainer

use of com.servoy.j2db.persistence.FlattenedLayoutContainer in project servoy-client by Servoy.

the class PersistHelper method getFlattenedPersist.

public static ISupportChilds getFlattenedPersist(FlattenedSolution flattenedSolution, Form parent, ISupportChilds persist) {
    ISupportChilds flattenedPersist = persist;
    if (flattenedPersist instanceof Form) {
        flattenedPersist = flattenedSolution.getFlattenedForm(flattenedPersist);
    }
    if (flattenedPersist instanceof LayoutContainer && !(flattenedPersist instanceof FlattenedLayoutContainer)) {
        FlattenedForm ff = flattenedSolution.getFlattenedForm(parent) instanceof FlattenedForm ? (FlattenedForm) flattenedSolution.getFlattenedForm(parent) : flattenedSolution.createFlattenedForm(parent);
        flattenedPersist = new FlattenedLayoutContainer(ff, (LayoutContainer) flattenedPersist);
    }
    return flattenedPersist;
}
Also used : FlattenedForm(com.servoy.j2db.persistence.FlattenedForm) ISupportChilds(com.servoy.j2db.persistence.ISupportChilds) Form(com.servoy.j2db.persistence.Form) FlattenedForm(com.servoy.j2db.persistence.FlattenedForm) FlattenedLayoutContainer(com.servoy.j2db.persistence.FlattenedLayoutContainer) LayoutContainer(com.servoy.j2db.persistence.LayoutContainer) FlattenedLayoutContainer(com.servoy.j2db.persistence.FlattenedLayoutContainer)

Aggregations

FlattenedForm (com.servoy.j2db.persistence.FlattenedForm)1 FlattenedLayoutContainer (com.servoy.j2db.persistence.FlattenedLayoutContainer)1 Form (com.servoy.j2db.persistence.Form)1 ISupportChilds (com.servoy.j2db.persistence.ISupportChilds)1 LayoutContainer (com.servoy.j2db.persistence.LayoutContainer)1