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

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


    assertNotNull(label);
    ValueMap attr = label.getMarkupAttributes();
    assertNotNull(attr);
    assertEquals("myLabel", attr.getString("wicket:id"));

    Panel panel = (Panel)page.get("myPanel");
    assertNotNull(panel);
    attr = panel.getMarkupAttributes();
    assertNotNull(attr);
    assertEquals("myPanel", attr.getString("wicket:id"));

    label = (Label)page.get("myPanel:label");
    assertNotNull(label);
View Full Code Here


   */
  public void testRenderHomePage_10() throws Exception
  {
    executeTest(SimplePage_10.class, "SimplePageExpectedResult_10.html");

    Panel panel = (Panel)tester.getLastRenderedPage().get("myPanel");
    assertNotNull(panel);
    // we need to setup request/response before calling setvisible
    tester.setupRequestAndResponse();
    tester.createRequestCycle();

    panel.setVisible(true);
    tester.processRequestCycle(panel);
    String document = tester.getServletResponse().getDocument();
    assertNotNull(document);
    assertEquals(
      "<wicket:panel>Inside the panel<span wicket:id=\"label\">mein Label</span></wicket:panel>",
View Full Code Here

                    editProfileModalWin.show(target);
                }
            };
            selfRegLink.add(new Label("linkTitle", getString("selfRegistration")));

            Panel panel = new LinkPanel("selfRegistration", new ResourceModel("selfRegistration"));
            panel.add(selfRegLink);
            selfRegFrag.add(panel);
        } else {
            selfRegFrag = new Fragment("selfRegistration", "selfRegNotAllowed", this);
        }
        add(selfRegFrag);
View Full Code Here

                }

                BeanWrapper wrapper = PropertyAccessorFactory
                        .forBeanPropertyAccess(ReportletConfModalPage.this.reportletConf);

                Panel panel;

                if (NodeCond.class.equals(field.getType())) {
                    panel = new UserSearchPanel("value", (NodeCond) wrapper.getPropertyValue(fieldName), false);
                    // This is needed in order to manually update this.reportletConf with search panel selections
                    panel.setDefaultModel(new Model(fieldName));
                } else if (List.class.equals(field.getType())) {
                    if (wrapper.getPropertyValue(fieldName) == null) {
                        wrapper.setPropertyValue(fieldName, new ArrayList());
                    }
View Full Code Here

            final UserTO userTO) {

        super(id);

        // shortcut to retrieve fragments inside inner classes
        final Panel panel = this;

        final WebMarkupContainer container = new WebMarkupContainer("container");
        container.setOutputMarkupId(true);
        add(container);
View Full Code Here

                }

                BeanWrapper wrapper = PropertyAccessorFactory
                        .forBeanPropertyAccess(ReportletConfModalPage.this.reportletConf);

                Panel panel;

                if (NodeCond.class.equals(field.getType())) {
                    panel = new UserSearchPanel.Builder("value")
                            .nodeCond((NodeCond) wrapper.getPropertyValue(fieldName)).required(false).build();
                    // This is needed in order to manually update this.reportletConf with search panel selections
                    panel.setDefaultModel(new Model<String>(fieldName));
                } else if (List.class.equals(field.getType())) {
                    if (wrapper.getPropertyValue(fieldName) == null) {
                        wrapper.setPropertyValue(fieldName, new ArrayList());
                    }
View Full Code Here

    init(wmodel);
  }
 
  @Override
  protected Component newButtonBar(String id) {
    final Panel bBar = (Panel)super.newButtonBar(id);
    AjaxButton finish = new AjaxButton("finish", new ResourceModel("org.apache.wicket.extensions.wizard.finish")) {
      private static final long serialVersionUID = 1L;

      public boolean isEnabled() {
        IWizardStep activeStep = getWizardModel().getActiveStep();
        return ((activeStep != null) && getWizardModel().isLastStep(activeStep));
      }
     
      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
        installStep.startInstallation(target);
        target.add(bBar.setEnabled(false));
      }
    };
    return bBar.replace(finish).setOutputMarkupId(true);
  }
View Full Code Here

                }

                BeanWrapper wrapper = PropertyAccessorFactory.
                        forBeanPropertyAccess(ReportletConfModalPage.this.reportletConf);

                Panel panel;

                if (NodeCond.class.equals(field.getType())) {
                    panel = new UserSearchPanel.Builder("value")
                            .nodeCond((NodeCond) wrapper.getPropertyValue(fieldName)).required(false).build();
                    // This is needed in order to manually update this.reportletConf with search panel selections
                    panel.setDefaultModel(new Model<String>(fieldName));
                } else if (List.class.equals(field.getType())) {
                    if (wrapper.getPropertyValue(fieldName) == null) {
                        wrapper.setPropertyValue(fieldName, new ArrayList());
                    }
View Full Code Here

    setModelObject(new Integer(index));

    ITab tab = (ITab)tabs.get(index);

    Panel panel = tab.getPanel(TAB_PANEL_ID);

    if (panel == null)
    {
      throw new WicketRuntimeException("ITab.getPanel() returned null. TabbedPanel ["
          + getPath() + "] ITab index [" + index + "]");

    }

    if (!panel.getId().equals(TAB_PANEL_ID))
    {
      throw new WicketRuntimeException(
          "ITab.getPanel() returned a panel with invalid id ["
              + panel.getId()
              + "]. You must always return a panel with id equal to the provided panelId parameter. TabbedPanel ["
              + getPath() + "] ITab index [" + index + "]");
    }

View Full Code Here

            // update objects ....
            eventCategoryTO.getEvents().clear();

            final ChangeCategoryEvent change = (ChangeCategoryEvent) event.getPayload();

            final Panel changedPanel = change.getChangedPanel();
            if ("type".equals(changedPanel.getId())) {
                eventCategoryTO.setType(type.getModelObject());
                eventCategoryTO.setCategory(null);
                eventCategoryTO.setSubcategory(null);

                if (type.getModelObject() == EventCategoryType.CUSTOM) {
                    category.setChoices(Collections.<String>emptyList());
                    subcategory.setChoices(Collections.<String>emptyList());
                    category.setEnabled(false);
                    subcategory.setEnabled(false);
                    custom.setVisible(true);
                    custom.setEnabled(true);
                    actionPanel.setVisible(true);
                    actionPanel.setEnabled(true);

                } else {
                    category.setChoices(filter(eventCategoryTOs, type.getModelObject()));
                    subcategory.setChoices(Collections.<String>emptyList());
                    category.setEnabled(true);
                    subcategory.setEnabled(true);
                    custom.setVisible(false);
                    custom.setEnabled(false);
                    actionPanel.setVisible(false);
                    actionPanel.setEnabled(false);
                }
                change.getTarget().add(categoryContainer);
            } else if ("category".equals(changedPanel.getId())) {
                subcategory.setChoices(filter(eventCategoryTOs, type.getModelObject(), category.getModelObject()));
                eventCategoryTO.setCategory(category.getModelObject());
                eventCategoryTO.setSubcategory(null);
                change.getTarget().add(categoryContainer);
            } else {
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.