Package org.apache.wicket.markup.html.panel

Examples of org.apache.wicket.markup.html.panel.Panel


                    editProfileModalWin.show(target);
                }
            };
            editProfileLink.add(new Label("linkTitle", getString("editProfile")));

            Panel panel = new LinkPanel("editProfile", new ResourceModel("editProfile"));
            panel.add(editProfileLink);
            editProfileFrag.add(panel);
        }
        add(editProfileFrag);
    }
View Full Code Here


                final AttributeTO prop = item.getModelObject();

                Label label = new Label("key", prop.getSchema());
                item.add(label);

                Panel field;
                if (prop.getValues().isEmpty()) {
                    field = new AjaxTextFieldPanel("value",
                            prop.getSchema(), new Model<String>());
                } else if (prop.getValues().size() == 1) {
                    field = new AjaxTextFieldPanel("value",
View Full Code Here

    {
      private static final long serialVersionUID = 1L;

      public Panel getTestPanel(String panelId)
      {
        Panel panel = new DivTestPanel(panelId);
        component = new WebMarkupContainer("anId");
        component.setMarkupId(component.getId());
        component.setOutputMarkupId(true);
        component.add(effectBehavior);
        panel.add(component);
        return panel;
      }
    });
  }
View Full Code Here

    {
      private static final long serialVersionUID = 1L;

      public Panel getTestPanel(String panelId)
      {
        Panel panel = new DivTestPanel(panelId);
        component.setMarkupId("anId");
        panel.add(component);
        return panel;
      }
    });
    assertAndLog("$('#anId');", jsStatement.$(component).render());
  }
View Full Code Here

    {
      private static final long serialVersionUID = 1L;

      public Panel getTestPanel(String panelId)
      {
        Panel panel = new DivTestPanel(panelId);
        component.setMarkupId("anId");
        panel.add(component);
        return panel;
      }
    });
    assertAndLog("$('#anId span');", jsStatement.$(component, "span").render());
  }
View Full Code Here

    {
      private static final long serialVersionUID = 1L;

      public Panel getTestPanel(String panelId)
      {
        Panel panel = new DivTestPanel(panelId);
        WebMarkupContainer component = new WebMarkupContainer("anId");
        component.setMarkupId("anId");
        panel.add(component);
        jsQuery = new JsQuery(component);
        return panel;
      }
    });
  }
View Full Code Here

    public SecurityPanel(String id, final PortletApplicationNodeBean paNodeBean)
    {
        super(id);
        this.paNodeBean = paNodeBean;
        Panel panel = initLayout();
       
        jetspeedSecurityContraintNames = new ArrayList<String>(Arrays.asList(""));
        PageManager pageManager = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPageManager();
        try
        {
            for (Object secConstDefObj : pageManager.getPageSecurity().getSecurityConstraintsDefs())
            {
                SecurityConstraintsDef secConstDef = (SecurityConstraintsDef) secConstDefObj;
                jetspeedSecurityContraintNames.add(secConstDef.getName());
            }
        }
        catch (Exception e)
        {
            logger.error("Failed to retrieve jetspeed security constraint defs from page manager.", e);
        }
       
        PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
        PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
        PortletDefinition def = app.getPortlet(paNodeBean.getName());
        jetspeedSecurityConstraint = def.getJetspeedSecurityConstraint();
       
        Form form = (Form) panel.get("form");
        form.add(new DropDownChoice<String>("jetspeedConstraint", new PropertyModel<String>(this, "jetspeedSecurityConstraint"), jetspeedSecurityContraintNames));
        form.add(new Button("jsecSave", new ResourceModel("pam.details.action.save"))
        {
            @Override
            public void onSubmit()
View Full Code Here

        if (tabbedPanel == null) {
            visitChildren(AbstractField.class, validator);
        }
        else {
            for (ITab tab : tabbedPanel.getTabs()) {
                Panel panel = tab.getPanel("x");
                // Needs to be part of the page for errors.
                getPage().add(panel);
                // Cause ListViews to be populated.
                panel.beforeRender();
                panel.visitChildren(AbstractField.class, validator);
                getPage().remove(panel);
            }
        }
       
        return !validator.errorsFound;
View Full Code Here

   */
  @Test
  public void panel() throws Exception
  {
    Page page = new MyPage();
    Panel panel = new MyPanel("panel");
    page.add(panel);

    // Get the associated markup file
    IMarkupFragment markup = panel.getAssociatedMarkup();
    compareMarkupWithFile(markup, "MyPanel_ExpectedResult.html");

    // The Page is missing the tag to "call" the panel
    assertNull(panel.getMarkup());

    // Create a Page with proper markup for the panel
    page = new MyPanelPage();
    panel = (Panel)page.get("panel");

    // getMarkup() returns the "calling" tags
    markup = panel.getMarkup();
    compareMarkupWithString(markup, "<span wicket:id=\"panel\">test</span>");

    // getMarkup(null) returns the markup which is used to find a child component, which in case
    // of Panel is the <wicket:panel> tag and is thus may not be equal to the associated markup
    // file.
    markup = panel.getMarkup(null);
    compareMarkupWithString(markup,
      "<wicket:panel>  <span wicket:id=\"label\">text</span></wicket:panel>");
  }
View Full Code Here

   */
  @Test
  public void panelWithAutoComponent() throws Exception
  {
    Page page = new MyPage();
    Panel panel = new MyPanelWithAutoComponent("panel");
    page.add(panel);

    // Get the associated markup file
    IMarkupFragment markup = panel.getAssociatedMarkup();
    compareMarkupWithFile(markup, "MyPanelWithAutoComponent_ExpectedResult.html");

    // The Page is missing the tag to "call" the panel
    assertNull(panel.getMarkup());

    // Create a Page with proper markup for the panel
    page = new MyPanelWithAutoComponentPage();
    panel = (Panel)page.get("panel");

    // getMarkup() returns the "calling" tags
    markup = panel.getMarkup();
    compareMarkupWithString(markup, "<span wicket:id=\"panel\">test</span>");

    // getMarkup(null) returns the markup which is used to find a child component
    markup = panel.getMarkup(null);
    compareMarkupWithString(markup,
      "<wicket:panel><a href=\"something\"><span wicket:id=\"label\">text</span></a></wicket:panel>");
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.panel.Panel

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.