Search in sources :

Example 6 with ComponentTraverser

use of org.olat.core.util.component.ComponentTraverser in project OpenOLAT by OpenOLAT.

the class ComponentHelper method findWindowWithComponentInIt.

/**
 * REVIEW:pb: 2008-05-05 -> not referenced from .html or .java
 * @param wins
 * @param compToFind
 * @return
 * @deprecated
 */
protected static Window findWindowWithComponentInIt(Windows wins, final Component compToFind) {
    Window awin = null;
    for (Iterator<Window> it_wins = wins.getWindowIterator(); it_wins.hasNext(); ) {
        awin = it_wins.next();
        // find the correct component within the window
        MyVisitor v = new MyVisitor(compToFind);
        ComponentTraverser ct = new ComponentTraverser(v, awin.getContentPane(), false);
        ct.visitAll(null);
        if (v.f != null)
            return awin;
    }
    return null;
}
Also used : ComponentTraverser(org.olat.core.util.component.ComponentTraverser)

Aggregations

ComponentTraverser (org.olat.core.util.component.ComponentTraverser)6 IOException (java.io.IOException)4 ArrayList (java.util.ArrayList)4 GlobalSettings (org.olat.core.gui.GlobalSettings)4 InvalidRequestParameterException (org.olat.core.gui.components.form.flexible.impl.InvalidRequestParameterException)4 Command (org.olat.core.gui.control.winmgr.Command)4 JSCommand (org.olat.core.gui.control.winmgr.JSCommand)4 AsyncMediaResponsible (org.olat.core.gui.media.AsyncMediaResponsible)4 RenderResult (org.olat.core.gui.render.RenderResult)4 Renderer (org.olat.core.gui.render.Renderer)4 StringOutput (org.olat.core.gui.render.StringOutput)4 URLBuilder (org.olat.core.gui.render.URLBuilder)4 InterceptHandler (org.olat.core.gui.render.intercept.InterceptHandler)4 InterceptHandlerInstance (org.olat.core.gui.render.intercept.InterceptHandlerInstance)4 AssertException (org.olat.core.logging.AssertException)4 OLATRuntimeException (org.olat.core.logging.OLATRuntimeException)4 HttpServletRequest (javax.servlet.http.HttpServletRequest)2 HttpServletResponse (javax.servlet.http.HttpServletResponse)2 JSONArray (org.json.JSONArray)2 JSONException (org.json.JSONException)2