Package org.apache.wicket

Examples of org.apache.wicket.MarkupContainer


   */
  private void visitChildrenInContainingBorder(final FormComponent.IVisitor visitor)
  {
    if (getParent() instanceof Border)
    {
      MarkupContainer border = getParent();
      Iterator<? extends Component> iter = border.iterator();
      while (iter.hasNext())
      {
        Component child = iter.next();
        if (child instanceof FormComponent)
        {
View Full Code Here


    if (!error[0])
    {
      if (getParent() instanceof Border)
      {
        MarkupContainer border = getParent();
        Iterator<? extends Component> iter = border.iterator();
        while (iter.hasNext())
        {
          Component child = iter.next();
          if ((child != this) && (child instanceof FormComponent))
          {
View Full Code Here

   */
  private void internalUpdateFormComponentModels()
  {
    FormComponent.visitComponentsPostOrder(this, new FormModelUpdateVisitor(this));

    MarkupContainer border = findParent(Border.class);
    if (border != null)
    {
      FormComponent.visitComponentsPostOrder(border, new FormModelUpdateVisitor(this));
    }
  }
View Full Code Here

  private static final Object visitFormComponentsPostOrderHelper(Component component,
    final FormComponent.IVisitor visitor)
  {
    if (component instanceof MarkupContainer)
    {
      final MarkupContainer container = (MarkupContainer)component;
      if (container.size() > 0)
      {
        boolean visitChildren = true;
        if (container instanceof IFormVisitorParticipant)
        {
          visitChildren = ((IFormVisitorParticipant)container).processChildren();
        }
        if (visitChildren)
        {
          final Iterator<? extends Component> children = container.iterator();
          while (children.hasNext())
          {
            final Component child = children.next();
            Object value = visitFormComponentsPostOrderHelper(child, visitor);
            if (value == Component.IVisitor.STOP_TRAVERSAL)
View Full Code Here

  private static final Object visitComponentsPostOrderHelper(Component component,
    final Component.IVisitor<Component> visitor)
  {
    if (component instanceof MarkupContainer)
    {
      final MarkupContainer container = (MarkupContainer)component;
      if (container.size() > 0)
      {
        boolean visitChildren = true;
        if (container instanceof IFormVisitorParticipant)
        {
          visitChildren = ((IFormVisitorParticipant)container).processChildren();
        }
        if (visitChildren)
        {
          final Iterator<? extends Component> children = container.iterator();
          while (children.hasNext())
          {
            final Component child = children.next();
            Object value = visitComponentsPostOrderHelper(child, visitor);
            if (value == Component.IVisitor.STOP_TRAVERSAL)
View Full Code Here

        final Label label = new Label(ID_ABOUT_MESSAGE, aboutMessage);
        // safe to not escape, about message is read from file (part of deployed WAR)
        label.setEscapeModelStrings(false);
        add(label);

        MarkupContainer container = new WebMarkupContainer(ID_MANIFEST_ATTRIBUTES) {
            private static final long serialVersionUID = 1L;
            @Override
            public void renderHead(IHeaderResponse response) {
                response.render(JavaScriptReferenceHeaderItem.forReference(DIV_TOGGLE_JS));
            }
        };
        container.add(new JarManifestListView(ID_MANIFEST_ATTRIBUTE, JarManifestPanel.ID_LINE, manifestModel.getDetail()));
        add(container);
    }
View Full Code Here

        final boolean authorizationException = exceptionModel.isAuthorizationException();
        if(authorizationException) {
            Components.permanentlyHide(this, ID_EXCEPTION_DETAIL);
        } else {

        MarkupContainer container = new WebMarkupContainer(ID_EXCEPTION_DETAIL) {
                private static final long serialVersionUID = 1L;
                @Override
                public void renderHead(IHeaderResponse response) {
                    response.render(JavaScriptReferenceHeaderItem.forReference(DIV_TOGGLE_JS));
                }
            };
            container.add(new StackTraceListView(ID_STACK_TRACE_ELEMENT, ExceptionStackTracePanel.ID_LINE, exceptionModel.getStackTrace()));
            add(container);
        }
    }
View Full Code Here

    private final List<ContainedToggleboxPanel> rowToggles = Lists.newArrayList();
           
    @Override
    public void populateItem(final Item<ICellPopulator<ObjectAdapter>> cellItem, final String componentId, final IModel<ObjectAdapter> rowModel) {
        final MarkupContainer row = cellItem.getParent().getParent();
        row.setOutputMarkupId(true);
        final EntityModel entityModel = (EntityModel) rowModel;
        String concurrencyExceptionIfAny = entityModel.getAndClearConcurrencyExceptionIfAny();
        if(concurrencyExceptionIfAny != null) {
            row.add(new CssClassAppender("reloaded-after-concurrency-exception"));
        }
       
        final ContainedToggleboxPanel toggle = new ContainedToggleboxPanel(componentId) {
            private static final long serialVersionUID = 1L;
            @Override
View Full Code Here

        }
    }

    @Override
    protected Component addComponentForCompact() {
        final MarkupContainer scalarIfCompact = new WebMarkupContainer(ID_SCALAR_IF_COMPACT);
        MarkupContainer downloadLink = updateDownloadLink(ID_SCALAR_IF_COMPACT_DOWNLOAD, scalarIfCompact);
        if(downloadLink != null) {
            updateFileNameLabel("fileNameIfCompact", downloadLink);
        }
        addOrReplace(scalarIfCompact);
        return scalarIfCompact;
View Full Code Here

    public IsisBlobOrClobPanelAbstract(String id, ScalarModel scalarModel) {
        super(id, scalarModel);
    }

    private void updateRegularFormComponents(final InputFieldVisibility visibility) {
        MarkupContainer formComponent = (MarkupContainer) getComponentForRegular();
        formComponent.get(ID_SCALAR_VALUE).setVisible(visibility == InputFieldVisibility.VISIBLE);

        updateFileNameLabel(ID_FILE_NAME, formComponent);

        // the visibility of download link is intentionally 'backwards';
        // if in edit mode then do NOT show
        final MarkupContainer downloadLink = updateDownloadLink(ID_SCALAR_IF_REGULAR_DOWNLOAD, formComponent);
        if (downloadLink != null) {
            downloadLink.setVisible(visibility == InputFieldVisibility.NOT_VISIBLE);
        }
        // ditto any image
        if(wicketImage != null) {
            wicketImage.setVisible(visibility == InputFieldVisibility.NOT_VISIBLE);
        }
View Full Code Here

TOP

Related Classes of org.apache.wicket.MarkupContainer

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.