@Override protected void onInitialize() { super.onInitialize(); dequeue(); } /**
queueRegion.dequeue();
@Override protected void onInitialize() { super.onInitialize(); dequeue(); } /**
queueRegion.dequeue();
private void dequeueChildrenContainer(DequeueContext dequeue, MarkupContainer child) { dequeue.pushContainer(child); child.dequeue(dequeue); dequeue.popContainer(); }
private void dequeueChildrenContainer(DequeueContext dequeue, MarkupContainer child) { dequeue.pushContainer(child); child.dequeue(dequeue); dequeue.popContainer(); }
/** * Queues one or more components to be dequeued later. The advantage of this method over the * {@link #add(Component...)} method is that the component does not have to be added to its * direct parent, only to a parent upstream; it will be dequeued into the correct parent using * the hierarchy defined in the markup. This allows the component hierarchy to be maintained only * in markup instead of in markup and in java code; affording designers and developers more * freedom when moving components in markup. * * @param components * the components to queue * @return {@code this} for method chaining */ public MarkupContainer queue(Component... components) { if (queue == null) { queue = new ComponentQueue(); } queue.add(components); Page page = findPage(); if (page != null) { dequeue(); } return this; }
/** * Queues one or more components to be dequeued later. The advantage of this method over the * {@link #add(Component...)} method is that the component does not have to be added to its * direct parent, only to a parent upstream; it will be dequeued into the correct parent using * the hierarchy defined in the markup. This allows the component hierarchy to be maintained only * in markup instead of in markup and in java code; affording designers and developers more * freedom when moving components in markup. * * @param components * the components to queue * @return {@code this} for method chaining */ public MarkupContainer queue(Component... components) { if (queue == null) { queue = new ComponentQueue(); } queue.add(components); Page page = findPage(); if (page != null) { dequeue(); } return this; }
dequeue(dequeue);
@Override public void dequeue(DequeueContext dequeue) { if (size() > 0) { // essentially what we do is for every child replace the repeater with the child in // dequeue container stack and run the dequeue on the child. we also take care to reset // the state of the dequeue context after we process every child. Bookmark bookmark = dequeue.save(); for (Component child : this) { if (child instanceof MarkupContainer) { dequeue.popContainer(); // pop the repeater MarkupContainer container = (MarkupContainer) child; dequeue.pushContainer(container); container.dequeue(dequeue); dequeue.restore(bookmark); } } } dequeue.skipToCloseTag(); } }
@Override public void dequeue(DequeueContext dequeue) { if (size() > 0) { // essentially what we do is for every child replace the repeater with the child in // dequeue container stack and run the dequeue on the child. we also take care to reset // the state of the dequeue context after we process every child. Bookmark bookmark = dequeue.save(); for (Component child : this) { if (child instanceof MarkupContainer) { dequeue.popContainer(); // pop the repeater MarkupContainer container = (MarkupContainer) child; dequeue.pushContainer(container); container.dequeue(dequeue); dequeue.restore(bookmark); } } } dequeue.skipToCloseTag(); } }