Package org.apache.wicket.markup

Examples of org.apache.wicket.markup.IMarkupFragment


    @Override
    public DequeueContext newDequeueContext()
    {
      Border border=findParent(Border.class);
      IMarkupFragment fragment = border.getMarkup();

      if (fragment == null)
      {
        return null;
      }
View Full Code Here


  @Override
  public IMarkupFragment getMarkup(final MarkupContainer parent, final Component child)
  {
    Args.notNull(tagName, "tagName");

    IMarkupFragment associatedMarkup = parent.getAssociatedMarkup();
    if (associatedMarkup == null)
    {
      throw new MarkupNotFoundException("Failed to find markup file associated. " +
        Classes.simpleName(parent.getClass()) + ": " + parent.toString());
    }

    // Find <wicket:panel>
    IMarkupFragment markup = findStartTag(associatedMarkup);
    if (markup == null)
    {
      throw new MarkupNotFoundException("Expected to find <wicket:" + tagName +
        "> in associated markup file. Markup: " + associatedMarkup.toString());
    }

    // If child == null, than return the markup fragment starting with <wicket:panel>
    if (child == null)
    {
      return markup;
    }

    // Find the markup for the child component
    associatedMarkup = markup.find(child.getId());
    if (associatedMarkup != null)
    {
      return associatedMarkup;
    }
View Full Code Here

   */
  public IMarkupFragment findMarkupInAssociatedFileHeader(final MarkupContainer container,
    final Component child)
  {
    // Get the associated markup
    IMarkupFragment markup = container.getAssociatedMarkup();
    IMarkupFragment childMarkup = null;

    // MarkupStream is good at searching markup
    MarkupStream stream = new MarkupStream(markup);
    while (stream.skipUntil(ComponentTag.class) && (childMarkup == null))
    {
View Full Code Here

  {
    String markupNamespace = MarkupParser.WICKET;
    Page page = findPage();
    if (page != null)
    {
      IMarkupFragment markup = page.getMarkup();
      MarkupResourceStream markupResourceStream = markup.getMarkupResourceStream();
      String namespace = markupResourceStream.getWicketNamespace();
      if (Strings.isEmpty(namespace) == false)
      {
        markupNamespace = namespace;
      }
View Full Code Here

   *
   * @return first component tag
   */
  private final ComponentTag getMarkupTag()
  {
    IMarkupFragment markup = getMarkup();
    if (markup != null)
    {
      for (int i = 0; i < markup.size(); i++)
      {
        MarkupElement elem = markup.get(i);
        if (elem instanceof ComponentTag)
        {
          return (ComponentTag)elem;
        }
      }
View Full Code Here

   * Performs a render of this component as part of a Page level render process.
   */
  private final void internalRender()
  {
    // Make sure there is a markup available for the Component
    IMarkupFragment markup = getMarkup();
    if (markup == null)
    {
      throw new MarkupNotFoundException("Markup not found for Component: " + toString());
    }

    // MarkupStream is an Iterator for the markup
    MarkupStream markupStream = new MarkupStream(markup);

    // Flag: we started the render process
    markRendering(true);

    MarkupElement elem = markup.get(0);
    if (elem instanceof ComponentTag)
    {
      // Guarantee that the markupStream is set and determineVisibility not yet tested
      // See WICKET-2049
      ((ComponentTag)elem).onBeforeRender(this, markupStream);
View Full Code Here

   * onComponentTag() is called to allow the component to mutate the start tag. The method
   * onComponentTagBody() is then called to permit the component to render its body.
   */
  public final void internalRenderComponent()
  {
    final IMarkupFragment markup = getMarkup();
    if (markup == null)
    {
      throw new MarkupException("Markup not found. Component: " + toString());
    }

View Full Code Here

    }

    @Override
    public IMarkupFragment getMarkup()
    {
      IMarkupFragment calculatedMarkup = null;
      if (pageMarkup == null)
      {
        IMarkupFragment markup = super.getMarkup();
        if (markup != null && markup != Markup.NO_MARKUP)
        {
          calculatedMarkup = markup;
          pageMarkup = markup;
        }
View Full Code Here

    }

    @Override
    public IMarkupFragment getMarkup()
    {
      IMarkupFragment calculatedMarkup = null;
      if (pageMarkup == null)
      {
        IMarkupFragment markup = super.getMarkup();
        if (markup != null && markup != Markup.NO_MARKUP)
        {
          calculatedMarkup = markup;
          pageMarkup = markup;
        }
View Full Code Here


  @Override
  public DequeueContext newDequeueContext()
  {
    IMarkupFragment markup = getMarkupSourcingStrategy().getMarkup(this, null);
    if (markup == null)
    {
      return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.IMarkupFragment

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.