Examples of YuiPanel


Examples of org.wicketstuff.yui.markup.html.container.YuiPanel

            + "  constraintoviewport : true, \n" + "  iframe : false, \n"
            + "  autofillheight :'body' \n" + "}";

    @SuppressWarnings("serial")
    public YuiPanelAsWindowPage() {
        add(new YuiPanel("yuiPanelConfigure") {
            @Override
            protected String getOpts() {
                return "{ " + "close:false, " + "draggable : false,"
                        + "width: '520px', height : '440px', "
                        + "autofillheight:'body', constraintoviewport : true"
View Full Code Here

Examples of org.wicketstuff.yui.markup.html.container.YuiPanel

            form.add(new AjaxSubmitLink("show") {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                    final String panelMarkupId = "yuiPanel" + YuiPanelAsWindowPage.this.panelId;

                    YuiPanel panel = new YuiPanel(panelMarkupId) {
                        @Override
                        protected String getOpts() {
                            return YuiPanelAsWindowPage.this.opts;
                        }

                        protected Component newBodyPanel(String id) {
                            return new Label(id, "Hi from panel no " +  YuiPanelAsWindowPage.this.panelId);
                        }

                        protected String getResizeOpts() {
                            return "{ handles : ['br'], proxy: true, status: true, animate: false}";
                        }

            @Override
            protected void onHide(AjaxRequestTarget target, String type)
            {
              super.onHide(target, type);
              YuiPanelAsWindowPage.this.replace(new EmptyPanel(panelMarkupId));
            }
                    };
                    panel.setOutputMarkupId(true);

                    //
                    // uses overlay manager to make sure the active panel is on top
                    //
                    panel.setUsesOverlayManager(true);

                    YuiPanelAsWindowPage.this.replace(panel);

                    target.addComponent(panel);
                }
View Full Code Here

Examples of org.wicketstuff.yui.markup.html.container.YuiPanel

      + "  autofillheight :'body' \n" + "}";

  @SuppressWarnings("serial")
  public YuiPanelPage()
  {
    add(new YuiPanel("yuiPanelConfigure")
    {
      @Override
      protected String getOpts()
      {
        return "{ " + "close:false, " + "draggable : false,"
View Full Code Here

Examples of org.wicketstuff.yui.markup.html.container.YuiPanel

      {

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form)
        {
          YuiPanelPage.this.replace(new YuiPanel("yuiPanel")
          {

            @Override
            protected String getOpts()
            {
View Full Code Here

Examples of org.wicketstuff.yui.markup.html.container.YuiPanel

   *
   * @param window the new window (not null)
   * @return the component id of the new window (used to remove it)
   */
  public String addWindow(final IYuiWindow window) {
    YuiPanel yuiPanel = new YuiPanel(getRepeater().newChildId()) {
      @Override
      protected String getOpts() {
        return newOptions(window.getDimension(), window.getAdditionalOpts());
      }

      @Override
      protected String getResizeOpts() {
        return "{handles : ['br'], proxy: true, status: true, animate: false}";
      }

      @Override
      protected Component newBodyPanel(String id) {
        return window.newBody(id);
      }

      @Override
      protected Component newFooterPanel(String id) {
        return window.newFooter(id);
      }

      @Override
      protected Component newHeaderPanel(String id) {
        return window.newHeader(id);
      }

      @Override
      protected void onHide(AjaxRequestTarget target, String type) {
        getRepeater().remove(this);
        removeElementFromDom(target, getMarkupId());
      }
    };
    yuiPanel.setOutputMarkupId(true);
    yuiPanel.setUsesOverlayManager(true);
    getRepeater().add(yuiPanel);

    AjaxRequestTarget target = AjaxRequestTarget.get();
    if (target != null) {
      String createDiv = "(function(){var c=document.createElement('div');c.id='%s';Wicket.$('%s').appendChild(c)})();";
      target.prependJavascript(String.format(createDiv, yuiPanel.getMarkupId(), getMarkupId()));
      target.addComponent(yuiPanel);
      // TODO: find out why javascript of yuiPanel's header contributor
      // fails during the AJAX update in FireFox, works fine in IE.
    }

    return yuiPanel.getId();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.