Re: Embedding html from an external application

2009-01-26 Thread mfs

Actually I haven't used the c:import tag, so i am not sure what problems are
you referring to ? Is it what I mentioned earlier that since it would be a
separate request, the request-parameters would not be part of it ? but even
that can be resolved right ? i mean we can manually stream these incoming
request parameters/cookies with the new request..

As for the session sharing issue, I so far have been able to work something
out in that regard. Actually its not trivial to move the presentation layer
into wicket since (1) its implement in a non-java platform (i.e. mod_plsq)
and would not be as simple as moving a jsp (2) it is too huge an app to
moved over that easily.

Commenting a bit on iFrame. I Initially was more inclined towards using
iFrame but then the problem lies with the lag which could be come in between
the section loaded through iFrame, which would not look good at all,
especially if that section is header/menu/footer, and i am not sure if their
is a remedy to this very complain people have from iFrame.

Thanks and Regards,

Farhan.



Erik van Oosten wrote:
 
 Hi Farhan,
 
 Yes, indeed. After so many years Wicket can still surprise me.
 
 Anyway, the problems you have with this are identical as you would have
 with the c:import tag. What you want is not simply feasible. It would be
 wise to consider alternatives. For example moving the JSPs into the same
 context as the Wicket application, using an iframe (session problem does
 not go away), or getting rid of the JSPs altogether.
 
 Regards,
  Erik.
 
 
 mfs wrote:
 
 Eric,
 
 Thanks for the follow-up. 
 
 Actually i just came across the 
 http://wicket.sourceforge.net/apidocs/wicket/markup/html/include/Include.html
 Include  component in Wicket which i believe does the same as you
 suggested to implement...i.e. opens up a new http-connection to the
 server/url from where the contents are to be embedded...Isn't it ?
 
 Secondly since this would mean a separate request would be opened for
 contents to be included, and hence wouldn't be carrying the request
 parameters, cookies etc. Which i would have to figure out a way to
 pass-on/embed manually.
 
 Farhan.
 
 
 
 -- 
 Erik van Oosten
 http://www.day-to-day-stuff.blogspot.com/
 
 

-- 
View this message in context: 
http://www.nabble.com/Embedding-html-from-an-external-application-tp21593700p21671595.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Embedding html from an external application

2009-01-26 Thread Ittay Dror



mfs wrote:
 
 Eric,
 
 Thanks for the follow-up. 
 
 Actually i just came across the 
 http://wicket.sourceforge.net/apidocs/wicket/markup/html/include/Include.html
 Include  component in Wicket which i believe does the same as you
 suggested to implement...i.e. opens up a new http-connection to the
 server/url from where the contents are to be embedded...Isn't it ?
 
 Secondly since this would mean a separate request would be opened for
 contents to be included, and hence wouldn't be carrying the request
 parameters, cookies etc. Which i would have to figure out a way to
 pass-on/embed manually.
 
Include uses a URL connection to get the data. You might want to try and
writing a similar component that uses the httpclient library. Or cast the
connection from URL#openConnection to HttpConnection and use the methods
there for adding headers. I think the only major challenge will be if the
old application is using cookies since you'd need to manage them yourself.

Ittay




 
 
 Farhan.
 
 
 
 quote author=Erik van Oosten
 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: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



-- 
View this message in context: 
http://www.nabble.com/Embedding-html-from-an-external-application-tp21593700p21671932.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Embedding html from an external application

2009-01-25 Thread Erik van Oosten

Hi Farhan,

Yes, indeed. After so many years Wicket can still surprise me.

Anyway, the problems you have with this are identical as you would have with
the c:import tag. What you want is not simply feasible. It would be wise to
consider alternatives. For example moving the JSPs into the same context as
the Wicket application, using an iframe (session problem does not go away),
or getting rid of the JSPs altogether.

Regards,
 Erik.


mfs wrote:
 
 Eric,
 
 Thanks for the follow-up. 
 
 Actually i just came across the 
 http://wicket.sourceforge.net/apidocs/wicket/markup/html/include/Include.html
 Include  component in Wicket which i believe does the same as you
 suggested to implement...i.e. opens up a new http-connection to the
 server/url from where the contents are to be embedded...Isn't it ?
 
 Secondly since this would mean a separate request would be opened for
 contents to be included, and hence wouldn't be carrying the request
 parameters, cookies etc. Which i would have to figure out a way to
 pass-on/embed manually.
 
 Farhan.
 


-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/

-- 
View this message in context: 
http://www.nabble.com/Embedding-html-from-an-external-application-tp21593700p21655839.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Embedding html from an external application

2009-01-21 Thread mfs

Hi Guys,

I am currently investigating on the ways to integrate two UI, one written in
wicket and the other in mod_plsql (where all the presentation logic is
written in the form of stored-procedures and exposed through mod_plsql
gateway).

Currently most of the existing functionality is written in mod_plsql and
given its a huge application, we cannot port all the of the functionality
into wicket in one go (and plan to do the same in phases) but for all the
new functionality we have decided use wicket and devise a mechanism to
intergrate both the UI(s) such that the header, navigation, footer is
embedded from the external mod_plsql app within a Wicket Container/Template
Page followed by content-page written in wicket itself. I wish it was easy
to move the header/navigation/footer pages into wicket itself, but it has a
lot of logic contained within it which just makes difficult to do it now.

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..

Looking for some suggestions for achieving the above mentioned objective.

Thanks

Farhan.
-- 
View this message in context: 
http://www.nabble.com/Embedding-html-from-an-external-application-tp21593691p21593691.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Embedding html from an external application

2009-01-21 Thread mfs

Hi Guys,

I am currently investigating on the ways to integrate two UI, one written in
wicket and the other in mod_plsql (where all the presentation logic is
written in the form of stored-procedures and exposed through mod_plsql
gateway).

Currently most of the existing functionality is written in mod_plsql and
given its a huge application, we cannot port all the of the functionality
into wicket in one go (and plan to do the same in phases) but for all the
new functionality we have decided use wicket and devise a mechanism to
intergrate both the UI(s) such that the header, navigation, footer is
embedded from the external mod_plsql app within a Wicket Container/Template
Page followed by content-page written in wicket itself. I wish it was easy
to move the header/navigation/footer pages into wicket itself, but it has a
lot of logic contained within it which just makes difficult to do it now.

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..

Looking for some suggestions for achieving the above mentioned objective.

Thanks

Farhan.
-- 
View this message in context: 
http://www.nabble.com/Embedding-html-from-an-external-application-tp21593698p21593698.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Embedding html from an external application

2009-01-21 Thread mfs

Hi Guys,

I am currently investigating on the ways to integrate two UI, one written in
wicket and the other in mod_plsql (where all the presentation logic is
written in the form of stored-procedures and exposed through mod_plsql
gateway).

Currently most of the existing functionality is written in mod_plsql and
given its a huge application, we cannot port all the of the functionality
into wicket in one go (and plan to do the same in phases) but for all the
new functionality we have decided use wicket and devise a mechanism to
intergrate both the UI(s) such that the header, navigation, footer is
embedded from the external mod_plsql app within a Wicket Container/Template
Page followed by content-page written in wicket itself. I wish it was easy
to move the header/navigation/footer pages into wicket itself, but it has a
lot of logic contained within it which just makes difficult to do it now.

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..

Looking for some suggestions for achieving the above mentioned objective.

Thanks

Farhan.
-- 
View this message in context: 
http://www.nabble.com/Embedding-html-from-an-external-application-tp21593700p21593700.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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