@Override
 public void renderHead(Component component, IHeaderResponse response) {
   response.renderCSSReference(
       new CssResourceReference(getClass(), "css/multiboxes-selection.css"));
   response.renderJavaScriptReference(WidgetJavaScriptResourceReference.get());
   response.renderJavaScriptReference(CoreEffectJavaScriptResourceReference.get());
   response.renderJavaScriptReference(
       new PackageResourceReference(getClass(), "js/multiboxes.selection.js"));
 }
Beispiel #2
0
 @Override
 public void renderHead(IHeaderResponse response) {
   response.renderJavaScriptReference(WidgetJavaScriptResourceReference.get());
   response.renderJavaScriptReference(MouseJavaScriptResourceReference.get());
   response.renderJavaScriptReference(PositionJavaScriptResourceReference.get());
   response.renderJavaScriptReference(DialogJavaScriptResourceReference.get());
   response.renderJavaScriptReference(DraggableJavaScriptResourceReference.get());
   response.renderJavaScriptReference(ResizableJavaScriptResourceReference.get());
 }
  @Override
  public void renderHead(Component c, IHeaderResponse response) {

    String url = getURL(developmentMode, openLayersVersion);

    response.renderJavaScriptReference(url);
    response.renderJavaScriptReference(WicketEventReference.INSTANCE);
    response.renderJavaScriptReference(WicketAjaxReference.INSTANCE);
    response.renderJavaScriptReference(WICKET_OMAP_JS);
  }
Beispiel #4
0
  @Override
  public void renderHead(IHeaderResponse response) {
    response.renderCSSReference(
        new PackageResourceReference(BaseUserWeavePage.class, "configBase.css"));

    response.renderJavaScriptReference(JQuery.getLatest());

    response.renderJavaScriptReference(
        new JavaScriptResourceReference(BaseUserWeavePage.class, "hover.js"));
  }
  /**
   * Add the required css and js files to the page
   *
   * <p>Also add the javascript to create the tooltip
   */
  @Override
  public void renderHead(Component c, final IHeaderResponse response) {
    response.renderJavaScriptReference(
        new PackageResourceReference(MootipBehaviour.class, "mootools.v1.11.js"));
    response.renderJavaScriptReference(
        new PackageResourceReference(MootipBehaviour.class, "mootips.v1.11.js"));
    if (contributeCSS)
      response.renderCSSReference(new PackageResourceReference(MootipBehaviour.class, "tip.css"));

    response.renderOnLoadJavaScript(generateJS(mooTipTemplate));
  }
Beispiel #6
0
 @Override
 public void renderHead(final IHeaderResponse response) {
   // response.renderJavaScriptReference(new JavaScriptResourceReference(
   // BasePage.class, "js/jquery.tools.min.js"));
   // response.renderJavaScriptReference(new JavaScriptResourceReference(
   // BasePage.class, "js/tooltips.js"));
   // response.renderCSSReference(new PackageResourceReference(
   // BasePage.class, "css/wicket.css"));
   response.renderJavaScriptReference(
       new JavaScriptResourceReference(BaseUsersPage.class, "js/widgets.js"));
   response.renderJavaScriptReference(
       new JavaScriptResourceReference(BaseUsersPage.class, "js/jquery.js"));
 }
Beispiel #7
0
  @Override
  public void renderHead(final Component component, final IHeaderResponse response) {
    super.renderHead(component, response);

    response.renderCSSReference(TAG_IT_CSS);
    response.renderJavaScriptReference(TAG_IT_JS);

    component.setOutputMarkupId(true);
    String id = component.getMarkupId();

    TextTemplate tagItConfig = getTagItConfig();

    Map<String, CharSequence> variables = new HashMap<String, CharSequence>();
    variables.put("componentId", id);
    variables.put("callbackUrl", getCallbackUrl());

    String script = tagItConfig.asString(variables);

    response.renderOnDomReadyJavaScript(script);
  }
Beispiel #8
0
  @Override
  public void renderHead(HtmlHeaderContainer container) {
    IHeaderResponse response = container.getHeaderResponse();

    // shouldn't be using MarkupAttributes as it's an internal method, but
    // have to, no other way to
    // find out if the user put an id attribute on the tag,
    // getMarkupId(false) should tell us, but it doens't
    // at this stage in rendering it seems
    String tmpId = this.getMarkupAttributes().getString("id");
    // if they haven't set the id on the component tag, we'll set one for
    // them
    if (Strings.isEmpty(tmpId)) {
      this.setOutputMarkupId(true);
      tmpId = this.getMarkupId(true);
    }
    final String id = tmpId;

    // add prototype
    response.renderJavaScriptReference(PrototypeResourceReference.INSTANCE);
    // add this components javascript
    response.renderJavaScriptReference(
        new PackageResourceReference(this.getClass(), "res/scripts/tag.js"));
    // add component css
    if (properties.isBrowserInternetExplorer()) {
      response.renderCSSReference(
          new PackageResourceReference(this.getClass(), "res/stylesheets/tag-ie.css"));
    } else if (properties.isBrowserSafari()) {
      response.renderCSSReference(
          new PackageResourceReference(this.getClass(), "res/stylesheets/tag-webkit.css"));
    } else {
      response.renderCSSReference(
          new PackageResourceReference(this.getClass(), "res/stylesheets/tag-moz.css"));
    }

    // render the javascript to setup the component
    IModel variablesModel =
        new AbstractReadOnlyModel() {
          @Override
          public Map getObject() {
            Map<String, CharSequence> variables = new HashMap<String, CharSequence>(2);
            variables.put("id", id);
            StringBuffer arr = new StringBuffer();
            // join our collection into a comma delimeted string
            Collection<T> model =
                (Collection<T>) MultiTextInput.this.getInnermostModel().getObject();
            if (model != null) {
              Iterator<?> iter = model.iterator();
              while (iter.hasNext()) {
                arr.append('\'');
                // looks like a weird substitution, but regexp in java
                // ftl.
                arr.append(
                    iter.next().toString().replaceAll("'", "\\\\'").replaceAll("\"", "\\\\\""));
                arr.append('\'');
                if (iter.hasNext()) {
                  arr.append(',');
                }
              }
            }
            variables.put("model", arr.toString());
            variables.put("length", String.valueOf(MultiTextInput.this.inputLength));
            return variables;
          }
        };
    // merge the javascript from the properties file with the properties we
    // set above
    String js =
        new StringBuffer().append(getString("javascript.tagEntry", variablesModel)).toString();
    response.renderOnDomReadyJavaScript(js.toString());

    super.renderHead(container);
  }
 /**
  * Render CSS and JavaScript references for this component.
  *
  * @param response
  */
 private void renderReferences(IHeaderResponse response) {
   // render reference to Cool Button JavaScript file
   response.renderJavaScriptReference(
       new PackageResourceReference(CoolButton.class, "cool-button.js"));
 }