You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2011/09/05 16:22:09 UTC

[jira] [Commented] (WICKET-4026) Custom Tag Handler added to PageSettings does not work

    [ https://issues.apache.org/jira/browse/WICKET-4026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097154#comment-13097154 ] 

Martin Grigorov commented on WICKET-4026:
-----------------------------------------

I think there is no problem here. 
This is how this worked from its early days.
IComponentResolver should be registered with getPageSettings().addComponentResolver(...), but IMarkupFilter should be registered in the MarkupParser.
Even WicketMessageTagHandler (the class you copy/pasted) doesn't try to register itself as IMarkupFilter thru getPageSettings().addComponentResolver(...).

I agree registering in the MarkupParser is not so straightforward as in IPageSettings but if this is the idea of this ticket then it should be "Improvement", not "Bug".

> Custom Tag Handler added to PageSettings does not work
> ------------------------------------------------------
>
>                 Key: WICKET-4026
>                 URL: https://issues.apache.org/jira/browse/WICKET-4026
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC7
>            Reporter: Bruno Borges
>              Labels: tags, wicket
>         Attachments: myproject.zip
>
>
> Adding a custom tag handler to PageSettings is not enough to have Wicket understanding a new tag.
> 		getPageSettings().addComponentResolver(new WicketVarResolver());
> 		getPageSettings().addComponentResolver(new WicketVarTagHandler());
> The MarkupFactory object must be replaced with a custom one that adds the tag handler object to the MarkupParser
> public class VariablesSupportMarkupFactory extends MarkupFactory {
> 	public MarkupParser newMarkupParser(final MarkupResourceStream resource) {
> 		MarkupParser mp = super.newMarkupParser(resource);
> 		mp.add(new WicketVarTagHandler());
> 		return mp;
> 	}
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira