List of usage examples for org.apache.wicket.util.resource StringBufferResourceStream StringBufferResourceStream
public StringBufferResourceStream()
From source file:org.webical.web.components.ajax.calendar.YUICalendarDayView.java
License:Open Source License
/** * returns the resource stream whose value will become the value of the * data argument in the defined client-side javascript * callback handler.//www .j ava 2 s .c o m * @return resource stream */ protected IResourceStream getResponseResourceStream() { return new StringBufferResourceStream(); }
From source file:org.wicketstuff.minis.apanel.APanel.java
License:Apache License
/** * {@inheritDoc}/* w w w.ja v a 2 s .c om*/ */ public IResourceStream getMarkupResourceStream(final MarkupContainer container, final Class<?> containerClass) { if (container != this) throw new IllegalArgumentException("Container " + container + " must be instance " + this); final StringBufferResourceStream resourceStream = new StringBufferResourceStream(); resourceStream.append(thisPanelRenderer.getMarkup((APanel) container)); return resourceStream; }
From source file:org.wicketstuff.minis.apanel.TestRenderers.java
License:Apache License
@Test public void testDefaultWebMarkupContainerWithMarkupRenderer() { class TestPanel extends Panel implements IMarkupResourceStreamProvider { private static final long serialVersionUID = 1L; public TestPanel(final String id) { super(id); }/*from w w w. j a va 2 s . co m*/ public IResourceStream getMarkupResourceStream(final MarkupContainer container, final Class containerClass) { return new StringBufferResourceStream().append("<wicket:panel></wicket:panel>"); } } page.getAPanel().add(new TestPanel("panel")); tester.startPage(new TestPageSource(page)); tester.assertComponent("aPanel:panel", TestPanel.class); }
From source file:org.wicketstuff.minis.behavior.apanel.TestRenderers.java
License:Apache License
@Test public void testDefaultWebMarkupContainerWithMarkupRenderer() { class TestPanel extends Panel implements IMarkupResourceStreamProvider { private static final long serialVersionUID = 1L; public TestPanel(final String id) { super(id); }//from www. jav a 2 s. c o m public IResourceStream getMarkupResourceStream(final MarkupContainer container, final Class containerClass) { return new StringBufferResourceStream().append("<wicket:panel></wicket:panel>"); } } page.getAPanel().add(new TestPanel("panel")); tester.startPage(page); tester.assertComponent("aPanel:panel", TestPanel.class); }