You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jochen Mader <pf...@gmail.com> on 2011/09/09 22:17:53 UTC

Problem with IMarkupResourceStreamProvider

I implemented a panel as a IMarkupResourceStreamProvider.
It works perfect if I add it to a page using the add method. If I use
"replaceWith" to replace another panel with this one I get

"Tag expected"

and the following stacktrace

 MarkupStream: [markup =
org.apache.wicket.util.resource.StringResourceStream@19aea6e2:
<html	xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
   <body>        <wicket:panel>            <form wicket:id="form">
           <input type="submit" class="btn primary"
wicket:id="submit"></input>            </form>        </wicket:panel>
  </body></html>
<html	xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
   <body>        <wicket:panel>            <form wicket:id="form">
           <input type="submit" class="btn primary"
wicket:id="submit"></input>            </form>        </wicket:panel>
  </body></html>, index = 0, current = [Raw markup]]
	at org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
	at org.apache.wicket.markup.MarkupStream.getTag(MarkupStream.java:258)


Original Markup:
<html
	xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
    <body>
        <wicket:panel>
            <form wicket:id="form">
                <input type="submit" class="btn primary"
wicket:id="submit"></input>
            </form>
        </wicket:panel>
    </body>
</html>

I create a StringResourceStream using the markup stored in a String:

new StringResourceStream(ret);

Any idea?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Problem with IMarkupResourceStreamProvider

Posted by Jochen Mader <pf...@gmail.com>.
Found the problem:
In an earlier version of the panel I overwrote getMarkupType.
Removing it fixed the problem.

public MarkupType getMarkupType() {
        return MarkupType.HTML_MARKUP_TYPE;
    }

On Fri, Sep 9, 2011 at 10:17 PM, Jochen Mader <pf...@gmail.com> wrote:
> I implemented a panel as a IMarkupResourceStreamProvider.
> It works perfect if I add it to a page using the add method. If I use
> "replaceWith" to replace another panel with this one I get
>
> "Tag expected"
>
> and the following stacktrace
>
>  MarkupStream: [markup =
> org.apache.wicket.util.resource.StringResourceStream@19aea6e2:
> <html   xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
>   <body>        <wicket:panel>            <form wicket:id="form">
>           <input type="submit" class="btn primary"
> wicket:id="submit"></input>            </form>        </wicket:panel>
>  </body></html>
> <html   xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
>   <body>        <wicket:panel>            <form wicket:id="form">
>           <input type="submit" class="btn primary"
> wicket:id="submit"></input>            </form>        </wicket:panel>
>  </body></html>, index = 0, current = [Raw markup]]
>        at org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
>        at org.apache.wicket.markup.MarkupStream.getTag(MarkupStream.java:258)
>
>
> Original Markup:
> <html
>        xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
>    <body>
>        <wicket:panel>
>            <form wicket:id="form">
>                <input type="submit" class="btn primary"
> wicket:id="submit"></input>
>            </form>
>        </wicket:panel>
>    </body>
> </html>
>
> I create a StringResourceStream using the markup stored in a String:
>
> new StringResourceStream(ret);
>
> Any idea?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org