Package org.apache.wicket.markup

Examples of org.apache.wicket.markup.Markup


    {
      // Must be a MarkupContainer to have associated markup file
      if (this instanceof MarkupContainer)
      {
        MarkupContainer container = (MarkupContainer)this;
        Markup associatedMarkup = container.getAssociatedMarkup();
        if (associatedMarkup != null)
        {
          markup = associatedMarkup;
          return markup;
        }
View Full Code Here


    {
      // Must be a MarkupContainer to have associated markup file
      if (this instanceof MarkupContainer)
      {
        MarkupContainer container = (MarkupContainer)this;
        Markup associatedMarkup = container.getAssociatedMarkup();
        if (associatedMarkup != null)
        {
          markup = associatedMarkup;
          return markup;
        }
View Full Code Here

   */
  public Markup getAssociatedMarkup()
  {
    try
    {
      Markup markup = MarkupFactory.get().getMarkup(this, false);

      // If we found markup for this container
      if ((markup != null) && (markup != Markup.NO_MARKUP))
      {
        return markup;
View Full Code Here

  }
 
  /** @see IQueueRegion#newDequeueContext() */
  public DequeueContext newDequeueContext()
  {
    Markup markup = getAssociatedMarkup();
    if (markup == null)
    {
      return null;
    }
    return new DequeueContext(markup, this, false);
View Full Code Here

    {
      // Must be a MarkupContainer to have associated markup file
      if (this instanceof MarkupContainer)
      {
        MarkupContainer container = (MarkupContainer)this;
        Markup associatedMarkup = container.getAssociatedMarkup();
        if (associatedMarkup != null)
        {
          markup = associatedMarkup;
          return markup;
        }
View Full Code Here

   */
  public Markup getAssociatedMarkup()
  {
    try
    {
      Markup markup = MarkupFactory.get().getMarkup(this, false);

      // If we found markup for this container
      if ((markup != null) && (markup != Markup.NO_MARKUP))
      {
        return markup;
View Full Code Here

  }
 
  /** @see IQueueRegion#newDequeueContext() */
  public DequeueContext newDequeueContext()
  {
    Markup markup = getAssociatedMarkup();
    if (markup == null)
    {
      return null;
    }
    return new DequeueContext(markup, this, false);
View Full Code Here

    {
      // Must be a MarkupContainer to have associated markup file
      if (this instanceof MarkupContainer)
      {
        MarkupContainer container = (MarkupContainer)this;
        Markup associatedMarkup = container.getAssociatedMarkup();
        if (associatedMarkup != null)
        {
          markup = associatedMarkup;
          return markup;
        }
View Full Code Here

  public final Markup loadMarkup(final MarkupContainer container,
    final MarkupResourceStream markupResourceStream, final IMarkupLoader baseLoader,
    final boolean enforceReload) throws IOException, ResourceStreamNotFoundException
  {
    // read and parse the markup
    Markup markup = baseLoader.loadMarkup(container, markupResourceStream, null, enforceReload);

    // Check if markup contains <wicket:extend> which tells us that
    // we need to read the inherited markup as well.
    int extendIndex = requiresBaseMarkup(markup);
    if (extendIndex == -1)
    {
      return markup;
    }

    // Load the base markup
    final Markup baseMarkup = getBaseMarkup(container, markup, enforceReload);
    if ((baseMarkup == null) || (baseMarkup == Markup.NO_MARKUP))
    {
      throw new MarkupNotFoundException(
        "Base markup of inherited markup not found. Component class: " +
          markup.getMarkupResourceStream()
View Full Code Here

   */
  @Test
  public void postProcess()
  {
    String rawMarkup = "<script>someJS()</script>";
    Markup createMarkupElementsMarkup = Markup.of(rawMarkup);
    Markup markup = new Markup(createMarkupElementsMarkup.getMarkupResourceStream());
    for (MarkupElement markupElement : createMarkupElementsMarkup)
    {
      markup.addMarkupElement(markupElement);
    }
    StyleAndScriptIdentifier filter = new StyleAndScriptIdentifier();
    filter.postProcess(markup);
    assertEquals("<script>\n/*<![CDATA[*/\nsomeJS()\n/*]]>*/\n</script>", markup.toString(true));
  }
View Full Code Here

TOP

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

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.