see link#setbody(model) ,i think this is what you are trying to do :-) else that should be PanelMarkupSourcingStrategy(*false*)
On Mon, May 13, 2013 at 11:33 PM, Andy Van Den Heuvel < andy.vandenheu...@gmail.com> wrote: > I get an exception and it's not very clear to me what I'm doing wrong. > > This is the exception: > Last cause: Unknown tag name with Wicket namespace: 'panel'. Might be you > haven't installed the appropriate resolver? '<wicket:panel>' (line 3, > column 2) > > I'm trying to override the markupSourcingStrategy because i want this class > to have it's own html file. Anybody an idea? I use wicket-core 6.7.0. > > > This is my java file: > public class ExtBookMarkablePageLink<T> extends BookmarkablePageLink<T> { > > private final Component label; > public <C extends Page> ExtBookMarkablePageLink(String id, Class<C> > pageClass) { > this(id, pageClass, new PageParameters()); > } > public <C extends Page> ExtBookMarkablePageLink(String id, Class<C> > pageClass, final PageParameters parameters) { > super(id, pageClass, parameters); > add(label = newLabel("label")); > } > protected Component newLabel(final String markupId) { > return new Label(markupId, new > Model<String>("")).setRenderBodyOnly(true); > } > > @Override > protected IMarkupSourcingStrategy newMarkupSourcingStrategy() { > return new PanelMarkupSourcingStrategy(true); > } > > public ExtBookMarkablePageLink<T> setLabel(IModel<?> label) { > this.label.setDefaultModel(label); > return this; > } > > } > > and this my html file: > <!doctype html> > <html xmlns:wicket="http://wicket.apache.org"> > <wicket:panel> > <span wicket:id="label"></span> > </wicket:panel> > </html> > -- regards, Vineet Semwal