Package widgets

Examples of widgets.Widget


    }
  }

  public static void json(String className, String endPointName)
      throws Exception {
    Widget widget = null;
    try {
      widget = WidgetManager.getWidget(className);
      Object o = widget.endpoint(endPointName, params);
      response.contentType = "text/plain";
      renderJSON(o);
    } catch (Exception e) {
      notFound(className);
    }
View Full Code Here


    return VirtualFile.search(Play.javaPath, genericPath);
  }

  public static Widget getWidget(String name) throws InvalidWidgetException {
    try {
      Widget w = (Widget) Class.forName(basePath + name).newInstance();
      checkForDefaultInstances(w);
      return w;
    } catch (ClassNotFoundException e) {
      throw new InvalidWidgetException(basePath + name);
    } catch (InstantiationException e) {
View Full Code Here

  public static String widgetPath(Widget w) {
    return (basePath + w.packageName() + ".").replace(".", File.separator);
  }

  public void add(String widgetName) throws InvalidWidgetException {
    Widget w = getWidget(widgetName);
    widgets.put(w.fullName(), w);
  }
View Full Code Here

   
    render(widgets, instances, deleted);
  }

  public static void descConfig(String className) {
    Widget widget = null;
    try {
      widget = WidgetManager.getWidget(className);
    } catch (Exception e) {
      notFound(className);
    }

    renderText(widget.describeConfig());
  }
View Full Code Here

TOP

Related Classes of widgets.Widget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.