Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.apache.tapestry.pageload;
 
 import  org.apache.hivemind.PoolManageable;
Looks for components of type org.apache.tapestry.IForm and org.apache.tapestry.dojo.IWidget so that the appropriate javascript includes can be made on an as needed basis by org.apache.tapestry.dojo.AjaxShellDelegate.
public class ComponentTypeVisitor implements IComponentVisitor, PoolManageable {
    IPage _page;
    public void visitComponent(IComponent component)
    {
        if (IPage.class.isInstance(component)) {
             = (IPagecomponent;
            return;
        }
        if (IForm.class.isInstance(component) &&  != null) {
            .setHasFormComponents(true);
        }
        if (IWidget.class.isInstance(component) &&  != null) {
            .setHasWidgets(true);
        }
    }
    public void activateService()
    {
         = null;
    }
    public void passivateService()
    {
         = null;
    }
New to GrepCode? Check out our FAQ X