You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Arjun Dhar <dh...@yahoo.com> on 2010/09/12 08:37:35 UTC

Intercept Wicket Parsing

Hi,
 I want to understand how to intercept the Wicket markup Parser *in a clean
way*

I'm aware of "org.apache.wicket.markup" package. There is XMLPullParser,
MarkupParser, Filter. I like the look of using Markup but surprisingly the
WicketFilter directly uses XMLPullParser (looks more like a hack than a
clean approach).

So a good way to explain it would be a example code for something like:
Default Content. To make it work one needs a label or component called
"component" supplying the model to render the content. But, say we want to
intercept this so that if no component is available the default markup shows
else it picks it from a DataSource.
NOTE: The Use Case here is a weak example, I really don't care about the Use
case itself but more about how to use a parser to solve an example as above.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Intercept-Wicket-Parsing-tp2536131p2536131.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Intercept Wicket Parsing

Posted by Igor Vaynberg <ig...@gmail.com>.
see how wicket:message tag does it. see WicketMessageTagHandler and
WicketMessageTagResolver.

-igor

On Sat, Sep 11, 2010 at 11:37 PM, Arjun Dhar <dh...@yahoo.com> wrote:
>
> Hi,
>  I want to understand how to intercept the Wicket markup Parser *in a clean
> way*
>
> I'm aware of "org.apache.wicket.markup" package. There is XMLPullParser,
> MarkupParser, Filter. I like the look of using Markup but surprisingly the
> WicketFilter directly uses XMLPullParser (looks more like a hack than a
> clean approach).
>
> So a good way to explain it would be a example code for something like:
> Default Content. To make it work one needs a label or component called
> "component" supplying the model to render the content. But, say we want to
> intercept this so that if no component is available the default markup shows
> else it picks it from a DataSource.
> NOTE: The Use Case here is a weak example, I really don't care about the Use
> case itself but more about how to use a parser to solve an example as above.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Intercept-Wicket-Parsing-tp2536131p2536131.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org