Image not loading on trigger in some circumstances

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Image not loading on trigger in some circumstances

Edpriwer
Hello, my problem is as follows: when I first visit the main page of my app the images load, but then if I go to another page and then come back the images on the triggers don't load.

On the main page of my application I have an image on a trigger.

<xforms:trigger appearance="minimal">
  <xforms:label>
    <img src="../apps/myapp/images/new.png" /> New
  </xforms:label>
</xforms:trigger>

I also have another image that is not within a trigger and is referenced the same way e.g.
<img src="../apps/myapp/images/logo.png" />

When I come back to the page the image on the trigger doesn't load (but the image not on a trigger does).

If I right-click on the images, the url of the loading image is:
http://localhost:8080/ops/apps/myapp/images/logo.png
And the image that is not loading is
http://localhost:8080/apps/myapp/images/new.png

I don't know why there's a difference just because the image is on a trigger.
Nonetheless, I guess the problem has something to do with the absolute url that the image on the trigger uses being different to when I first enter the application e.g. I may be returning to the main page in a way that somehow damages the context?

If so, in my sub-page I have this submission to return us to the main page:
<xforms:submission id="back-submission" method="post" action="/myapp/"/>
The action is defined in my page-flow as:
<page path-info="/myapp/" view="main.xhtml"/>
This seems fine to me though.

I hope what I've written above made sense; I'm happy to supply more details/clarification if needed. Any ideas/suggestions appreciated, thanks.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Image not loading on trigger in some circumstances

Alessandro Vernet
Administrator
Hi Ed,

This is similar to a problem that was discussed here recently, but it
doesn't seem to be exactly the same as you are using a relative URI.
Would you be able to create a XHTML+XForms file that reproduces this
problem and that we can run in the XForms sandbox?

Alex

On 4/18/07, [hidden email] <[hidden email]> wrote:

> Hello, my problem is as follows: when I first visit the main page of my app the images load, but then if I go to another page and then come back the images on the triggers don't load.
>
> On the main page of my application I have an image on a trigger.
>
> <xforms:trigger appearance="minimal">
>   <xforms:label>
>     <img src="../apps/myapp/images/new.png" /> New
>   </xforms:label>
> </xforms:trigger>
>
> I also have another image that is not within a trigger and is referenced the same way e.g.
> <img src="../apps/myapp/images/logo.png" />
>
> When I come back to the page the image on the trigger doesn't load (but the image not on a trigger does).
>
> If I right-click on the images, the url of the loading image is:
> http://localhost:8080/ops/apps/myapp/images/logo.png
> And the image that is not loading is
> http://localhost:8080/apps/myapp/images/new.png
>
> I don't know why there's a difference just because the image is on a trigger.
> Nonetheless, I guess the problem has something to do with the absolute url that the image on the trigger uses being different to when I first enter the application e.g. I may be returning to the main page in a way that somehow damages the context?
>
> If so, in my sub-page I have this submission to return us to the main page:
> <xforms:submission id="back-submission" method="post" action="/myapp/"/>
> The action is defined in my page-flow as:
> <page path-info="/myapp/" view="main.xhtml"/>
> This seems fine to me though.
>
> I hope what I've written above made sense; I'm happy to supply more details/clarification if needed. Any ideas/suggestions appreciated, thanks.
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Image not loading on trigger in some circumstances

Edpriwer
Hi Alex,

Because the broken image occurs after the user navigates away from, and
then back to the main page, I'll need to provide several files e.g.
main.xhtml, page-flow.xml, sub-page.xhtml,  and some images. Excuse my
ignorance, but from what I can see I can only upload a single xhtml file
to the sandbox?

Ed

Alessandro Vernet wrote:

> Hi Ed,
>
> This is similar to a problem that was discussed here recently, but it
> doesn't seem to be exactly the same as you are using a relative URI.
> Would you be able to create a XHTML+XForms file that reproduces this
> problem and that we can run in the XForms sandbox?
>
> Alex
>
> On 4/18/07, [hidden email] <[hidden email]> wrote:
>> Hello, my problem is as follows: when I first visit the main page of
>> my app the images load, but then if I go to another page and then
>> come back the images on the triggers don't load.
>>
>> On the main page of my application I have an image on a trigger.
>>
>> <xforms:trigger appearance="minimal">
>>   <xforms:label>
>>     <img src="../apps/myapp/images/new.png" /> New
>>   </xforms:label>
>> </xforms:trigger>
>>
>> I also have another image that is not within a trigger and is
>> referenced the same way e.g.
>> <img src="../apps/myapp/images/logo.png" />
>>
>> When I come back to the page the image on the trigger doesn't load
>> (but the image not on a trigger does).
>>
>> If I right-click on the images, the url of the loading image is:
>> http://localhost:8080/ops/apps/myapp/images/logo.png
>> And the image that is not loading is
>> http://localhost:8080/apps/myapp/images/new.png
>>
>> I don't know why there's a difference just because the image is on a
>> trigger.
>> Nonetheless, I guess the problem has something to do with the
>> absolute url that the image on the trigger uses being different to
>> when I first enter the application e.g. I may be returning to the
>> main page in a way that somehow damages the context?
>>
>> If so, in my sub-page I have this submission to return us to the main
>> page:
>> <xforms:submission id="back-submission" method="post" action="/myapp/"/>
>> The action is defined in my page-flow as:
>> <page path-info="/myapp/" view="main.xhtml"/>
>> This seems fine to me though.
>>
>> I hope what I've written above made sense; I'm happy to supply more
>> details/clarification if needed. Any ideas/suggestions appreciated,
>> thanks.
>>
>>
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Image not loading on trigger in some circumstances

Alessandro Vernet
Administrator
Ed,

You are right, if you need multiple files to reproduce this, the
easiest way is to create an "app" (which would run under the apps
directory), zip the content of that directory, and attach it to a
response here. This way we can just uncompress your zip in the apps
directory.

Alex

On 4/19/07, Edward Priwer <[hidden email]> wrote:

> Hi Alex,
>
> Because the broken image occurs after the user navigates away from, and
> then back to the main page, I'll need to provide several files e.g.
> main.xhtml, page-flow.xml, sub-page.xhtml,  and some images. Excuse my
> ignorance, but from what I can see I can only upload a single xhtml file
> to the sandbox?
>
> Ed
>
> Alessandro Vernet wrote:
> > Hi Ed,
> >
> > This is similar to a problem that was discussed here recently, but it
> > doesn't seem to be exactly the same as you are using a relative URI.
> > Would you be able to create a XHTML+XForms file that reproduces this
> > problem and that we can run in the XForms sandbox?
> >
> > Alex
> >
> > On 4/18/07, [hidden email] <[hidden email]> wrote:
> >> Hello, my problem is as follows: when I first visit the main page of
> >> my app the images load, but then if I go to another page and then
> >> come back the images on the triggers don't load.
> >>
> >> On the main page of my application I have an image on a trigger.
> >>
> >> <xforms:trigger appearance="minimal">
> >>   <xforms:label>
> >>     <img src="../apps/myapp/images/new.png" /> New
> >>   </xforms:label>
> >> </xforms:trigger>
> >>
> >> I also have another image that is not within a trigger and is
> >> referenced the same way e.g.
> >> <img src="../apps/myapp/images/logo.png" />
> >>
> >> When I come back to the page the image on the trigger doesn't load
> >> (but the image not on a trigger does).
> >>
> >> If I right-click on the images, the url of the loading image is:
> >> http://localhost:8080/ops/apps/myapp/images/logo.png
> >> And the image that is not loading is
> >> http://localhost:8080/apps/myapp/images/new.png
> >>
> >> I don't know why there's a difference just because the image is on a
> >> trigger.
> >> Nonetheless, I guess the problem has something to do with the
> >> absolute url that the image on the trigger uses being different to
> >> when I first enter the application e.g. I may be returning to the
> >> main page in a way that somehow damages the context?
> >>
> >> If so, in my sub-page I have this submission to return us to the main
> >> page:
> >> <xforms:submission id="back-submission" method="post" action="/myapp/"/>
> >> The action is defined in my page-flow as:
> >> <page path-info="/myapp/" view="main.xhtml"/>
> >> This seems fine to me though.
> >>
> >> I hope what I've written above made sense; I'm happy to supply more
> >> details/clarification if needed. Any ideas/suggestions appreciated,
> >> thanks.
> >>
> >>
> >>
> >> --
> >> You receive this message as a subscriber of the
> >> [hidden email] mailing list.
> >> To unsubscribe: mailto:[hidden email]
> >> For general help: mailto:[hidden email]?subject=help
> >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >>
> >>
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> > --
> > You receive this message as a subscriber of the [hidden email] mailing list.
> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Image not loading on trigger in some circumstances

Edpriwer
Ok, I've created and attached an example "testapp". I haven't been able
to duplicate my problem exactly as the image is breaking irrespective of
if it's on a trigger... Thanks for taking a look.

Alessandro Vernet wrote:

> Ed,
>
> You are right, if you need multiple files to reproduce this, the
> easiest way is to create an "app" (which would run under the apps
> directory), zip the content of that directory, and attach it to a
> response here. This way we can just uncompress your zip in the apps
> directory.
>
> Alex
>
> On 4/19/07, Edward Priwer <[hidden email]> wrote:
>> Hi Alex,
>>
>> Because the broken image occurs after the user navigates away from, and
>> then back to the main page, I'll need to provide several files e.g.
>> main.xhtml, page-flow.xml, sub-page.xhtml,  and some images. Excuse my
>> ignorance, but from what I can see I can only upload a single xhtml file
>> to the sandbox?
>>
>> Ed
>>
>> Alessandro Vernet wrote:
>> > Hi Ed,
>> >
>> > This is similar to a problem that was discussed here recently, but it
>> > doesn't seem to be exactly the same as you are using a relative URI.
>> > Would you be able to create a XHTML+XForms file that reproduces this
>> > problem and that we can run in the XForms sandbox?
>> >
>> > Alex
>> >
>> > On 4/18/07, [hidden email] <[hidden email]> wrote:
>> >> Hello, my problem is as follows: when I first visit the main page of
>> >> my app the images load, but then if I go to another page and then
>> >> come back the images on the triggers don't load.
>> >>
>> >> On the main page of my application I have an image on a trigger.
>> >>
>> >> <xforms:trigger appearance="minimal">
>> >>   <xforms:label>
>> >>     <img src="../apps/myapp/images/new.png" /> New
>> >>   </xforms:label>
>> >> </xforms:trigger>
>> >>
>> >> I also have another image that is not within a trigger and is
>> >> referenced the same way e.g.
>> >> <img src="../apps/myapp/images/logo.png" />
>> >>
>> >> When I come back to the page the image on the trigger doesn't load
>> >> (but the image not on a trigger does).
>> >>
>> >> If I right-click on the images, the url of the loading image is:
>> >> http://localhost:8080/ops/apps/myapp/images/logo.png
>> >> And the image that is not loading is
>> >> http://localhost:8080/apps/myapp/images/new.png
>> >>
>> >> I don't know why there's a difference just because the image is on a
>> >> trigger.
>> >> Nonetheless, I guess the problem has something to do with the
>> >> absolute url that the image on the trigger uses being different to
>> >> when I first enter the application e.g. I may be returning to the
>> >> main page in a way that somehow damages the context?
>> >>
>> >> If so, in my sub-page I have this submission to return us to the main
>> >> page:
>> >> <xforms:submission id="back-submission" method="post"
>> action="/myapp/"/>
>> >> The action is defined in my page-flow as:
>> >> <page path-info="/myapp/" view="main.xhtml"/>
>> >> This seems fine to me though.
>> >>
>> >> I hope what I've written above made sense; I'm happy to supply more
>> >> details/clarification if needed. Any ideas/suggestions appreciated,
>> >> thanks.
>> >>
>> >>
>> >>
>> >> --
>> >> You receive this message as a subscriber of the
>> >> [hidden email] mailing list.
>> >> To unsubscribe: mailto:[hidden email]
>> >> For general help: mailto:[hidden email]?subject=help
>> >> ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>> >>
>> >>
>> >
>> >
>> >
>> ------------------------------------------------------------------------
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> > To unsubscribe: mailto:[hidden email]
>> > For general help: mailto:[hidden email]?subject=help
>> > ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>> >
>>
>>
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

testapp.zip (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Image not loading on trigger in some circumstances

Joseph Lawrence
In reply to this post by Edpriwer
Hi Ed,
     From my undestanding I suppose that the problem may be with the relative path that you use for the image. To get a better understaning about the cause try the following three different pattern for the image url:
 
1. /apps/testapp/images/tick.png
2. apps/testapp/images/tick.png
3. ../apps/testapp/images/tick.png
 
For your case the 1st pattern may work good, because in any case it assumes the url:
But in the other two cases the url may change depending on the page's url pattern.
 
Now from your context, for your sample to work it may be sufficient to change the submission @method to 'get'. I presume the cause that your sample didn't work was that it tried obtaing the image-url  in the latter stage from the url http://localhost/ops/xforms-server-submit
 
Thanks
Joseph Lawrence
Stabiix Solutions
Hello, my problem is as follows: when I first visit the main page of my app the images load, but then if I go to another page and then come back the images on the triggers don't load.

On the main page of my application I have an image on a trigger.



New



I also have another image that is not within a trigger and is referenced the same way e.g.


When I come back to the page the image on the trigger doesn't load (but the image not on a trigger does).

If I right-click on the images, the url of the loading image is:
http://localhost:8080/ops/apps/myapp/images/logo.png
And the image that is not loading is
http://localhost:8080/apps/myapp/images/new.png

I don't know why there's a difference just because the image is on a trigger.
Nonetheless, I guess the problem has something to do with the absolute url that the image on the trigger uses being different to when I first enter the application e.g. I may be returning to the main page in a way that somehow damages the context?

If so, in my sub-page I have this submission to return us to the main page:

The action is defined in my page-flow as:

This seems fine to me though.

I hope what I've written above made sense; I'm happy to supply more details/clarification if needed. Any ideas/suggestions appreciated, thanks.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Image not loading on trigger in some circumstances

Edpriwer
Hi Joseph,

I actually had  url path #1 initially. However, the images on the
triggers are within a list that gets re-loaded from the db at the users
discretion, and with url #1 the images were broken on every load besides
the initial one. So I switched to url path #3, which worked for the list
refresh, but not navigating between the pages.

So, I've kept url#3 but taken your suggestion and changed the method to
Get on the back submission, and its fixed the images under all
circumstances. Thanks very much!

Ed.



Joseph Lawrence wrote:

> Hi Ed,
>      From my undestanding I suppose that the problem may be with the
> relative path that you use for the image. To get a better understaning
> about the cause try the following three different pattern for the
> image url:
>  
> 1. /apps/testapp/images/tick.png
> 2. apps/testapp/images/tick.png
> 3. ../apps/testapp/images/tick.png
>  
> For your case the 1st pattern may work good, because in any case it
> assumes the url:
> http://localhost/ops/apps/testapp/images/tick.png
> But in the other two cases the url may change depending on the page's
> url pattern.
>  
> Now from your context, for your sample to work it may be sufficient to
> change the submission @method to 'get'. I presume the cause that your
> sample didn't work was that it tried obtaing the image-url  in the
> latter stage from the url http://localhost/ops/xforms-server-submit
>  
> Thanks
> Joseph Lawrence
> Stabiix Solutions
>
> */[hidden email]/* wrote:
>
>     Hello, my problem is as follows: when I first visit the main page
>     of my app the images load, but then if I go to another page and
>     then come back the images on the triggers don't load.
>
>     On the main page of my application I have an image on a trigger.
>
>
>
>     New
>
>
>
>     I also have another image that is not within a trigger and is
>     referenced the same way e.g.
>
>
>     When I come back to the page the image on the trigger doesn't load
>     (but the image not on a trigger does).
>
>     If I right-click on the images, the url of the loading image is:
>     http://localhost:8080/ops/apps/myapp/images/logo.png
>     And the image that is not loading is
>     http://localhost:8080/apps/myapp/images/new.png
>
>     I don't know why there's a difference just because the image is on
>     a trigger.
>     Nonetheless, I guess the problem has something to do with the
>     absolute url that the image on the trigger uses being different to
>     when I first enter the application e.g. I may be returning to the
>     main page in a way that somehow damages the context?
>
>     If so, in my sub-page I have this submission to return us to the
>     main page:
>
>     The action is defined in my page-flow as:
>
>     This seems fine to me though.
>
>     I hope what I've written above made sense; I'm happy to supply
>     more details/clarification if needed. Any ideas/suggestions
>     appreciated, thanks.
>
>
>     --
>     You receive this message as a subscriber of the
>     [hidden email] mailing list.
>     To unsubscribe: mailto:[hidden email]
>     For general help: mailto:[hidden email]?subject=help
>     ObjectWeb mailing lists service home page:
>     http://www.objectweb.org/wws
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
> <http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws