Reputation: 1597
I could not find a wicket tag like wicket:include? Can anyone suggest me anything? I want to include/inject raw source into html files? If there is no such utility, any suggestions to develop it?
update i am looking for sth like jsp:include. this inclusion is expected to be handled on the server side.
Upvotes: 5
Views: 1134
Reputation: 49744
Is it raw markup that you want to include, or Wicket content?
If it's raw markup, even a simple Label
can do that for you. If you call setEscapeModelStrings( false)
, the string value of the model will be copied straight in the markup. (Watch out for potential XSS attacks though.)
"Including" Wicket markup is done via Panel
s (or occasionally Fragment
s)
Update: If you add more detail about the actual problem you need to solve, there's a good chance that we can find a more "wickety" solution, after all, JSP and Wicket are two different worlds and the mindset of one doesn't work very well in the other.
Upvotes: 3
Reputation: 41137
To do this, you'll need to implement your own IComponentResolver.
This blog article shows an example somewhat resembling what you're after.
Upvotes: 6