Package org.apache.wicket

Examples of org.apache.wicket.Component$ComponentBorderChange


        }

        public void populateItem(Item cellItem, String componentId, IModel rowModel)
        {
            Object bean = rowModel.getObject();
            Component component;
            BeanMetaData beanMetaData = element.getBeanMetaData();
            if (element.isAction()) {
                Form form = parentComponent.findParent(Form.class);
                component = new BeanActionButton(componentId, element, form, bean);
            }
View Full Code Here


        IFeedbackMessageFilter feedbackFilter = new IFeedbackMessageFilter() {
                public boolean accept(FeedbackMessage message)
                {
                    // If the reporter is a field and this is refreshing because of a non-Ajax form submit, it's very likely that the field has been detached
                    // from its parent because it is in a list view. As a result, findParent doesn't return the BeanForm.
                    Component reporter = message.getReporter();
                    AbstractField reporterField = (AbstractField)(reporter instanceof AbstractField ? reporter : reporter.findParent(AbstractField.class));
                    if (reporterField != null) {
                        return reporterField.getBeanForm().getId().equals(BeanForm.this.getId());
                    }
                   
                    Component parent = (reporter instanceof BeanForm ? reporter : reporter.findParent(BeanForm.class));
                    return reporter == BeanForm.this || parent == null || parent == BeanForm.this;
                }
        };
       
        feedback = new FeedbackPanel("feedback", feedbackFilter);
View Full Code Here

      // already current
      return;
    }
    this.currentTab = index;

    final Component component;

    if (currentTab == -1 || (tabs.size() == 0) || !getVisiblityCache().isVisible(currentTab))
    {
      // no tabs or the current tab is not visible
      component = newPanel();
    }
    else
    {
      // show panel from selected tab
      T tab = tabs.get(currentTab);
      component = tab.getPanel(TAB_PANEL_ID);
      if (component == null)
      {
        throw new WicketRuntimeException("ITab.getPanel() returned null. TabbedPanel [" +
          getPath() + "] ITab index [" + currentTab + "]");
      }
    }

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

    addOrReplace(component);
View Full Code Here

    MarkupContainer junction = createJunctionComponent("junction");
    junction.add(new StyleBehavior());
    add(junction);

    Component content = createContent(CONTENT_ID, model);
    if (!content.getId().equals(CONTENT_ID))
    {
      throw new IllegalArgumentException(
        "content must have component id equal to Node.CONTENT_ID");
    }
    add(content);
View Full Code Here

  @Override
  protected void onBeforeRender()
  {
    super.onBeforeRender();
    Component buttonBar = form.get(BUTTONS_ID);
    if (buttonBar instanceof IDefaultButtonProvider)
    {
      IFormSubmittingComponent defaultButton = ((IDefaultButtonProvider)buttonBar).getDefaultButton(wizardModel);
      form.setDefaultButton(defaultButton);
    }
View Full Code Here

   * @see org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn#getHeader(java.lang.String)
   */
  @Override
  public Component getHeader(final String componentId)
  {
    Component header = super.getHeader(componentId);
    return header.setEscapeModelStrings(false);
  }
View Full Code Here

   * @see Component#setOutputMarkupId(boolean)
   */
  @Override
  public Component newNodeComponent(String id, IModel<T> model)
  {
    Component node = super.newNodeComponent(id, model);

    node.setOutputMarkupId(true);

    return node;
  }
View Full Code Here

      @Override
      protected void populateItem(Item<T> item)
      {
        IModel<T> model = item.getModel();

        Component node = tree.newNodeComponent("node", model);
        item.add(node);

        item.add(tree.newSubtree("subtree", model));
      }
    };
View Full Code Here

  protected final void onRender()
  {
    Iterator<? extends Component> it = renderIterator();
    while (it.hasNext())
    {
      Component child = it.next();
      if (child == null)
      {
        throw new IllegalStateException(
          "The render iterator returned null for a child. Container: " + this.toString() +
            "; Iterator=" + it.toString());
View Full Code Here

    if (getApplication().usesDevelopmentConfig())
    {
      Iterator<? extends Component> i = iterator();
      while (i.hasNext())
      {
        Component c = i.next();
        Matcher matcher = SAFE_CHILD_ID_PATTERN.matcher(c.getId());
        if (!matcher.matches())
        {
          log.warn("Child component of repeater " + getClass().getName() + ":" + getId() +
            " has a non-safe child id of " + c.getId() +
            ". Safe child ids must be composed of digits only.");
          // do not flood the log
          break;
        }
View Full Code Here

TOP

Related Classes of org.apache.wicket.Component$ComponentBorderChange

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.