You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Marcus Irven <ma...@marcusirven.com> on 2006/09/18 11:49:59 UTC

problem with using tapestry 4.1 page in iframe (cross-domain)

I'm trying to update to tapestry 4.1 but am running into a problem
when trying to include the page as an iframe to another page which is
from a different domain.  Tapestry generates the following at the end
of the <body>:

<script type="text/javascript"><!--
dojo.event.connect(window, 'onload', function(e) {
dojo.require("tapestry.form");tapestry.form.registerForm('Form');
});
// --></script>

which gives me an "access is denied" error.

Are there any work arounds?

Thanks,
Marcus

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


Re: problem with using tapestry 4.1 page in iframe (cross-domain)

Posted by Jesse Kuhnert <jk...@gmail.com>.
I'm not sure. Still working out some i18n issues with IBM. When that's done
and I finish refactoring all of the javascript/java unit tests + make
appropriate changes in Tapestry I'll commit it :)

You can do what I outlined earlier to get past the problem for now.

On 9/19/06, Marcus Irven <ma...@marcusirven.com> wrote:
>
> Any idea on when this will be available or is there some way I can
> override the javascript the Body component creates?
>
> Thanks,
> Marcus
>
> On 9/19/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > Ah...Then this ~might~ be fixed when I'm done doing the 0.4 upgrade. I
> guess
> > we won't know for sure until then.
> >
> > On 9/19/06, Marcus Irven <ma...@marcusirven.com> wrote:
> > >
> > > I'm not sure this will solve my problem, dojo is currently hosted on
> > > the same domain as the web page, it is the the parent of the web page
> > > that is on a different domain.  I believe  it is the
> > > dojo.event.connect that is given me problems as the iframe doesn't
> > > have access to the window object.
> > >
> > > On 9/19/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > > > I think your problem would be best solved by overriding the
> > > "ajaxDelegate"
> > > > class used by the @Shell component (It's a parameter) - in
> combination
> > > with
> > > > doing a "cross domain" build of dojo:
> > > >
> > > > http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book48
> > > >
> > > > You don't really need to make your custom built version of dojo be
> > > served as
> > > > an asset by tapestry, you can just as easily make it a normal js
> include
> > > in
> > > > your servlet container - or eliminate the need for that altogether
> by
> > > > hosting it in a static web server.
> > > >
> > > > I'd try to stick with a 0.3.1 version of dojo if possible. I'm still
> in
> > > the
> > > > middle of upgrading to pre 0.4 myself. Perhaps it would be better if
> I
> > > just
> > > > made tapestry use the xdomain version by default.
> > > >
> > > > On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> > > > >
> > > > > Yes I am aware of this, the problem is Tapestry is generating that
> > > > > javascript and I'm not sure what to do.  The page worked fine in
> > > > > Tapestry 4.0 (which generated different javascript).  I'd like to
> > > > > upgrade to Tapestry 4.1 but this is holding me back.
> > > > >
> > > > > Thanks,
> > > > > Marcus
> > > > >
> > > > > On 9/18/06, Davor Hrg <hr...@gmail.com> wrote:
> > > > > > this is not a tapestry issue,
> > > > > > you cann not access via javascript frames that are not from same
> > > domain,
> > > > > >
> > > > > > try it with a static html page and same error will occur
> > > > > >
> > > > > > Davor Hrg
> > > > > >
> > > > > > On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> > > > > > >
> > > > > > > I'm trying to update to tapestry 4.1 but am running into a
> problem
> > > > > > > when trying to include the page as an iframe to another page
> which
> > > is
> > > > > > > from a different domain.  Tapestry generates the following at
> the
> > > end
> > > > > > > of the <body>:
> > > > > > >
> > > > > > > <script type="text/javascript"><!--
> > > > > > > dojo.event.connect(window, 'onload', function(e) {
> > > > > > > dojo.require("tapestry.form
> ");tapestry.form.registerForm('Form');
> > > > > > > });
> > > > > > > // --></script>
> > > > > > >
> > > > > > > which gives me an "access is denied" error.
> > > > > > >
> > > > > > > Are there any work arounds?
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Marcus
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Jesse Kuhnert
> > > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > > >
> > > > Open source based consulting work centered around
> > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: problem with using tapestry 4.1 page in iframe (cross-domain)

Posted by Marcus Irven <ma...@marcusirven.com>.
Any idea on when this will be available or is there some way I can
override the javascript the Body component creates?

Thanks,
Marcus

On 9/19/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> Ah...Then this ~might~ be fixed when I'm done doing the 0.4 upgrade. I guess
> we won't know for sure until then.
>
> On 9/19/06, Marcus Irven <ma...@marcusirven.com> wrote:
> >
> > I'm not sure this will solve my problem, dojo is currently hosted on
> > the same domain as the web page, it is the the parent of the web page
> > that is on a different domain.  I believe  it is the
> > dojo.event.connect that is given me problems as the iframe doesn't
> > have access to the window object.
> >
> > On 9/19/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > > I think your problem would be best solved by overriding the
> > "ajaxDelegate"
> > > class used by the @Shell component (It's a parameter) - in combination
> > with
> > > doing a "cross domain" build of dojo:
> > >
> > > http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book48
> > >
> > > You don't really need to make your custom built version of dojo be
> > served as
> > > an asset by tapestry, you can just as easily make it a normal js include
> > in
> > > your servlet container - or eliminate the need for that altogether by
> > > hosting it in a static web server.
> > >
> > > I'd try to stick with a 0.3.1 version of dojo if possible. I'm still in
> > the
> > > middle of upgrading to pre 0.4 myself. Perhaps it would be better if I
> > just
> > > made tapestry use the xdomain version by default.
> > >
> > > On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> > > >
> > > > Yes I am aware of this, the problem is Tapestry is generating that
> > > > javascript and I'm not sure what to do.  The page worked fine in
> > > > Tapestry 4.0 (which generated different javascript).  I'd like to
> > > > upgrade to Tapestry 4.1 but this is holding me back.
> > > >
> > > > Thanks,
> > > > Marcus
> > > >
> > > > On 9/18/06, Davor Hrg <hr...@gmail.com> wrote:
> > > > > this is not a tapestry issue,
> > > > > you cann not access via javascript frames that are not from same
> > domain,
> > > > >
> > > > > try it with a static html page and same error will occur
> > > > >
> > > > > Davor Hrg
> > > > >
> > > > > On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> > > > > >
> > > > > > I'm trying to update to tapestry 4.1 but am running into a problem
> > > > > > when trying to include the page as an iframe to another page which
> > is
> > > > > > from a different domain.  Tapestry generates the following at the
> > end
> > > > > > of the <body>:
> > > > > >
> > > > > > <script type="text/javascript"><!--
> > > > > > dojo.event.connect(window, 'onload', function(e) {
> > > > > > dojo.require("tapestry.form");tapestry.form.registerForm('Form');
> > > > > > });
> > > > > > // --></script>
> > > > > >
> > > > > > which gives me an "access is denied" error.
> > > > > >
> > > > > > Are there any work arounds?
> > > > > >
> > > > > > Thanks,
> > > > > > Marcus
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>

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


Re: problem with using tapestry 4.1 page in iframe (cross-domain)

Posted by Jesse Kuhnert <jk...@gmail.com>.
Ah...Then this ~might~ be fixed when I'm done doing the 0.4 upgrade. I guess
we won't know for sure until then.

On 9/19/06, Marcus Irven <ma...@marcusirven.com> wrote:
>
> I'm not sure this will solve my problem, dojo is currently hosted on
> the same domain as the web page, it is the the parent of the web page
> that is on a different domain.  I believe  it is the
> dojo.event.connect that is given me problems as the iframe doesn't
> have access to the window object.
>
> On 9/19/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > I think your problem would be best solved by overriding the
> "ajaxDelegate"
> > class used by the @Shell component (It's a parameter) - in combination
> with
> > doing a "cross domain" build of dojo:
> >
> > http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book48
> >
> > You don't really need to make your custom built version of dojo be
> served as
> > an asset by tapestry, you can just as easily make it a normal js include
> in
> > your servlet container - or eliminate the need for that altogether by
> > hosting it in a static web server.
> >
> > I'd try to stick with a 0.3.1 version of dojo if possible. I'm still in
> the
> > middle of upgrading to pre 0.4 myself. Perhaps it would be better if I
> just
> > made tapestry use the xdomain version by default.
> >
> > On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> > >
> > > Yes I am aware of this, the problem is Tapestry is generating that
> > > javascript and I'm not sure what to do.  The page worked fine in
> > > Tapestry 4.0 (which generated different javascript).  I'd like to
> > > upgrade to Tapestry 4.1 but this is holding me back.
> > >
> > > Thanks,
> > > Marcus
> > >
> > > On 9/18/06, Davor Hrg <hr...@gmail.com> wrote:
> > > > this is not a tapestry issue,
> > > > you cann not access via javascript frames that are not from same
> domain,
> > > >
> > > > try it with a static html page and same error will occur
> > > >
> > > > Davor Hrg
> > > >
> > > > On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> > > > >
> > > > > I'm trying to update to tapestry 4.1 but am running into a problem
> > > > > when trying to include the page as an iframe to another page which
> is
> > > > > from a different domain.  Tapestry generates the following at the
> end
> > > > > of the <body>:
> > > > >
> > > > > <script type="text/javascript"><!--
> > > > > dojo.event.connect(window, 'onload', function(e) {
> > > > > dojo.require("tapestry.form");tapestry.form.registerForm('Form');
> > > > > });
> > > > > // --></script>
> > > > >
> > > > > which gives me an "access is denied" error.
> > > > >
> > > > > Are there any work arounds?
> > > > >
> > > > > Thanks,
> > > > > Marcus
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: problem with using tapestry 4.1 page in iframe (cross-domain)

Posted by Marcus Irven <ma...@marcusirven.com>.
I'm not sure this will solve my problem, dojo is currently hosted on
the same domain as the web page, it is the the parent of the web page
that is on a different domain.  I believe  it is the
dojo.event.connect that is given me problems as the iframe doesn't
have access to the window object.

On 9/19/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> I think your problem would be best solved by overriding the "ajaxDelegate"
> class used by the @Shell component (It's a parameter) - in combination with
> doing a "cross domain" build of dojo:
>
> http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book48
>
> You don't really need to make your custom built version of dojo be served as
> an asset by tapestry, you can just as easily make it a normal js include in
> your servlet container - or eliminate the need for that altogether by
> hosting it in a static web server.
>
> I'd try to stick with a 0.3.1 version of dojo if possible. I'm still in the
> middle of upgrading to pre 0.4 myself. Perhaps it would be better if I just
> made tapestry use the xdomain version by default.
>
> On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> >
> > Yes I am aware of this, the problem is Tapestry is generating that
> > javascript and I'm not sure what to do.  The page worked fine in
> > Tapestry 4.0 (which generated different javascript).  I'd like to
> > upgrade to Tapestry 4.1 but this is holding me back.
> >
> > Thanks,
> > Marcus
> >
> > On 9/18/06, Davor Hrg <hr...@gmail.com> wrote:
> > > this is not a tapestry issue,
> > > you cann not access via javascript frames that are not from same domain,
> > >
> > > try it with a static html page and same error will occur
> > >
> > > Davor Hrg
> > >
> > > On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> > > >
> > > > I'm trying to update to tapestry 4.1 but am running into a problem
> > > > when trying to include the page as an iframe to another page which is
> > > > from a different domain.  Tapestry generates the following at the end
> > > > of the <body>:
> > > >
> > > > <script type="text/javascript"><!--
> > > > dojo.event.connect(window, 'onload', function(e) {
> > > > dojo.require("tapestry.form");tapestry.form.registerForm('Form');
> > > > });
> > > > // --></script>
> > > >
> > > > which gives me an "access is denied" error.
> > > >
> > > > Are there any work arounds?
> > > >
> > > > Thanks,
> > > > Marcus
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>

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


Re: problem with using tapestry 4.1 page in iframe (cross-domain)

Posted by Jesse Kuhnert <jk...@gmail.com>.
I think your problem would be best solved by overriding the "ajaxDelegate"
class used by the @Shell component (It's a parameter) - in combination with
doing a "cross domain" build of dojo:

http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book48

You don't really need to make your custom built version of dojo be served as
an asset by tapestry, you can just as easily make it a normal js include in
your servlet container - or eliminate the need for that altogether by
hosting it in a static web server.

I'd try to stick with a 0.3.1 version of dojo if possible. I'm still in the
middle of upgrading to pre 0.4 myself. Perhaps it would be better if I just
made tapestry use the xdomain version by default.

On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
>
> Yes I am aware of this, the problem is Tapestry is generating that
> javascript and I'm not sure what to do.  The page worked fine in
> Tapestry 4.0 (which generated different javascript).  I'd like to
> upgrade to Tapestry 4.1 but this is holding me back.
>
> Thanks,
> Marcus
>
> On 9/18/06, Davor Hrg <hr...@gmail.com> wrote:
> > this is not a tapestry issue,
> > you cann not access via javascript frames that are not from same domain,
> >
> > try it with a static html page and same error will occur
> >
> > Davor Hrg
> >
> > On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> > >
> > > I'm trying to update to tapestry 4.1 but am running into a problem
> > > when trying to include the page as an iframe to another page which is
> > > from a different domain.  Tapestry generates the following at the end
> > > of the <body>:
> > >
> > > <script type="text/javascript"><!--
> > > dojo.event.connect(window, 'onload', function(e) {
> > > dojo.require("tapestry.form");tapestry.form.registerForm('Form');
> > > });
> > > // --></script>
> > >
> > > which gives me an "access is denied" error.
> > >
> > > Are there any work arounds?
> > >
> > > Thanks,
> > > Marcus
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: problem with using tapestry 4.1 page in iframe (cross-domain)

Posted by Marcus Irven <ma...@marcusirven.com>.
Yes I am aware of this, the problem is Tapestry is generating that
javascript and I'm not sure what to do.  The page worked fine in
Tapestry 4.0 (which generated different javascript).  I'd like to
upgrade to Tapestry 4.1 but this is holding me back.

Thanks,
Marcus

On 9/18/06, Davor Hrg <hr...@gmail.com> wrote:
> this is not a tapestry issue,
> you cann not access via javascript frames that are not from same domain,
>
> try it with a static html page and same error will occur
>
> Davor Hrg
>
> On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
> >
> > I'm trying to update to tapestry 4.1 but am running into a problem
> > when trying to include the page as an iframe to another page which is
> > from a different domain.  Tapestry generates the following at the end
> > of the <body>:
> >
> > <script type="text/javascript"><!--
> > dojo.event.connect(window, 'onload', function(e) {
> > dojo.require("tapestry.form");tapestry.form.registerForm('Form');
> > });
> > // --></script>
> >
> > which gives me an "access is denied" error.
> >
> > Are there any work arounds?
> >
> > Thanks,
> > Marcus
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>

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


Re: problem with using tapestry 4.1 page in iframe (cross-domain)

Posted by Davor Hrg <hr...@gmail.com>.
this is not a tapestry issue,
you cann not access via javascript frames that are not from same domain,

try it with a static html page and same error will occur

Davor Hrg

On 9/18/06, Marcus Irven <ma...@marcusirven.com> wrote:
>
> I'm trying to update to tapestry 4.1 but am running into a problem
> when trying to include the page as an iframe to another page which is
> from a different domain.  Tapestry generates the following at the end
> of the <body>:
>
> <script type="text/javascript"><!--
> dojo.event.connect(window, 'onload', function(e) {
> dojo.require("tapestry.form");tapestry.form.registerForm('Form');
> });
> // --></script>
>
> which gives me an "access is denied" error.
>
> Are there any work arounds?
>
> Thanks,
> Marcus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>