Guy Bashan schrieb:

Hi,

I have a weird problem when <h:graphicImage> points to a broken image.

For example in one case, I press on a link for removing an item, and the item is not removed. The graphic image is not the link, it's just an image near the link, but whenever the image link is broken it looks like the action happens but item is not removed.

I encountered similar issue on some other screen, so I changed the <h:graphicImage> to image tag and wrong the url in a h:outputText. Whenever the image pointed a broken image, it seems like actions on the server side were not taking place.

Has anyone encountered such weird issues?


Is the url in your graphic image a relative one?

Note that relative urls in JSF applications often cause problems. The browser tries to resolve this relative to the URL it last knew about. But because JSF's default navigation is post/internal-forward/render, after each navigation the url that the browser posted to does not correspond to the page that is currently rendered.

This can be solved by using <redirect> on all navigation rules, but that has some major limitations. The tomahawk t:redirectTracker feature works around some of those limitations.

If you're not using it already, then I suggest installing the Firefox "web developer" addon, and then using its "view generated source" to see what the url in the page really is. Note that "view generated source" shows what the page currently contains *without* triggering another request to the server like the standard "view source" does, which can sometimes be important. It also shows the effects of any dynamic mods to the page performed by javascript.

You could also use the "live http headers" plugin for firefox to see exactly what is being sent to the server. Or the "network" pane of the firebug plugin.

Also: if your page does not have an h:messages tag, then be sure to add one so that you can see if you have validation failures..

Regards,
Simon

Reply via email to