Package uk.ac.osswatch.simal.wicket.widgets

Examples of uk.ac.osswatch.simal.wicket.widgets.WookieServerConnection


   * @param forceNew to indicate if always a new connection should be made.
   * @return
   */
  public static WookieServerConnection getWookieServerConnection(boolean forceNew) {
    if (wookieServerConnection == null || forceNew) {
      wookieServerConnection = new WookieServerConnection();
    }
    return wookieServerConnection;
  }
View Full Code Here


  /**
   * Add Wookie widgets to the page if the server is available.
   */
  private void populateWookiePanel() {

    WookieServerConnection wookieServerConnection = UserApplication
        .getWookieServerConnection(true);
   
    // Trick to (re)connect to Wookie server in case it has
    // been (re)started after Simal's initial connection setup.
    if(!wookieServerConnection.isAvailable()) {
      wookieServerConnection.initialise();
    }

    // Show all widgets in a gallery
    try {
      add(new WookieWidgetGalleryPanel("widgetGallery"));
    } catch (SimalException e) {
      UserReportableException ure = new UserReportableException(
          "Unable to retrieve widgets from Woookie for Gallery",
          ToolsPage.class, e);
      setResponsePage(new ErrorReportPage(ure));
    }
    // all instantiated widgets
    try {
      RepeatingView repeating = new RepeatingView("instantiatedWidgets");
      Iterator<Widget> itr = wookieServerConnection.getAvailableWidgets()
          .values().iterator();
      Widget widget;
      while (itr.hasNext()) {
        widget = itr.next();
        Iterator<WidgetInstance> instances = widget.getInstances().iterator();
View Full Code Here

TOP

Related Classes of uk.ac.osswatch.simal.wicket.widgets.WookieServerConnection

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.