List of usage examples for org.apache.wicket.core.util.resource PackageResourceStream PackageResourceStream
public PackageResourceStream(Class<?> scope, String path)
From source file:com.norconex.commons.wicket.markup.html.panel.FilePanel.java
License:Apache License
public FilePanel(String id, Class<?> scope, String fileName) { super(id, new MapModel<String, Object>()); this.fileStream = new PackageResourceStream(scope, fileName); }
From source file:com.norconex.commons.wicket.markup.html.panel.VelocityFilePanel.java
License:Apache License
public VelocityFilePanel(String id, Class<?> scope, String fileName, Map<String, Serializable> variables) { super(id, new MapModel<String, Object>()); this.templateStream = new PackageResourceStream(scope, fileName); if (variables != null) { this.variables.putAll(variables); }//from ww w .j a va2s . co m }
From source file:sf.wicklet.wicketext.test.TestMarkupParser01.java
License:Apache License
@Test public void test01() throws Exception { final String input = ResourceUtil.readString( new PackageResourceStream(getClass(), "sf/wicklet/wicketext/test/TestMarkupParser01Test01.html")); final MarkupParser parser = new MarkupParser(input); final IRootMarkup ret = parser.parse(); final MarkupStat stat = WicketExtrasUtil.dump(System.out, DEBUG, ret); assertEquals(17, stat.ctags);/*from w ww .j a v a 2s .c om*/ assertEquals(18, stat.rtags); assertEquals(0, stat.others); }