Farhan,
You can not mix and match content from different servlet contexts within
the same server. The only way is to request content from another server
and indeed, this is what the c:import tag does. Wicket has no equivalent
component but you could write one without too much problems.
Something like:
public class HttpImport extends WebMarkupContainer {
private String url;
public HttpImport(String id, String url) {
super(id);
this.url = url;
}
@Override
protected void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag) {
replaceComponentTagBody(markupStream, openTag, getContent(url));
}
private String getContent(String url) {
... code to get data from url ...
}
}
I'll leave the code in getContent as an exercise :)
The component above behaves like a Label, it will replace the content of
the HTML element it is attached to.
Regards,
Erik.
mfs wrote:
I have had a look at the blog
http://herebebeasties.com/2007-03-01/jsp-and-wicket-sitting-in-a-tree/
http://herebebeasties.com/2007-03-01/jsp-and-wicket-sitting-in-a-tree/
which pretty much is based on the same idea, but the only hitch is that it
is assuming the external/non-wicket page (i.e. jsp) to be contained in the
same context/app as wicket. I am looking for a way to include the dynamic
contents from a different context/application, since
RequestDispatcher.include doesn't allow the same. A functionality similar to
the c:import tag library that is..
--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]