I'm not sure if there is any interest in wicket.contrib.markup.html.velocity.VelocityPanel. But just for the sake of completeness may be it can be fixed.

There is a small issue that i noticed today:

This method is called everytime to read the template from a IStringResourceStream (templateResource) that is stored as an instance variable . But templateResource.asString() after reading in the content does not 'reset' the reader. So all subsequent calls to templateResource.asString() results in a blank string.

    private Reader getTemplateReader()
    {
        final String template = templateResource.asString();
        if (template != null)
        {
            return new StringReader(template);
        }
        return null;
    }


I fixed this on my side by storing the String representation as an instance variable in VelocityPanel.

Actually wicket.util.io.Streams.readString(final Reader in) does not seem to reset the Reader.

Also ,

VelocityPanel:

protected void onComponentTagBody(final MarkupStream markupStream,
            final ComponentTag openTag) -


modified   result = Strings.escapeMarkup(result);
to
result = Strings.escapeMarkup(result).toString();

-- karthik --

Reply via email to