You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "sean schofield (JIRA)" <my...@incubator.apache.org> on 2005/05/30 18:49:00 UTC

[jira] Closed: (MYFACES-52) Difference between image attribute of commandButton and url attribute of graphicImage on render

     [ http://issues.apache.org/jira/browse/MYFACES-52?page=all ]
     
sean schofield closed MYFACES-52:
---------------------------------

    Resolution: Won't Fix

Heath is correct.  The behavior of h:graphicImage is consistent with the spec and so therefore cannot be changed until addressed in a new spec.  See section 4.1.5. of the JSF 1.1. spec (The URL of the image to be displayed. If this
URL begins with a / character, it is assumed to be relative to the context path of the current web application.)

I'm not sure if the new 1.2 spec addresses this (you can check for yourself) but that spec is not final and it will be some time before MyFaces develops an implementation for it.  I agree with you that there does seem to be an inconsistency there.

> Difference between image attribute of commandButton and url attribute of graphicImage on render
> -----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-52
>          URL: http://issues.apache.org/jira/browse/MYFACES-52
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.7 beta
>  Environment: JBoss 4, Tomcat 5, JDK 1.5, Win XP
>     Reporter: 
>  Attachments: HtmlButtonRendererBase.java
>
> I set the value of url (graphicImage) and image (commandButton) to images/minus.gif and the HTML source page has generated     src attribute of img and input with the same value. But, when I set the value of url (graphicImage) and image (commandButton) to /images/minus.gif the HTML source page has generated different: src attribute of input TAG is the same value; src attribute of img TAG has added with web context (/solution.web).
> Pratical result: the image of commandButton don´t show because /image/minus.gif don´t exists.
> Attribute value
> ---------------
> JSF : image        == url        == images/minus.gif
> HTML: src of input == src of img == images/minus.gif
> HTML source page (ok)
> ----------------
> <img id="_id0:graphicImage1" src="images/minus.gif"/>
> <input id="_id0:commandButton1" name="_id0:commandButton1" type="image" src="images/plus.gif" 
> onclick="clear__5Fid0();document.forms['_id0'].elements['autoScroll'].value=getScrolling();"/>
> Attribute value
> ---------------
> JSF : image        == url        == /images/minus.gif
> HTML: src of input ==               /images/minus.gif
>       src of img   ==               /solution.web/images/minus.gif
> HTML source page (problem)
> ----------------
> <img id="_id0:graphicImage1" src="/solution.web/images/minus.gif"/>
> <input id="_id0:commandButton1" name="_id0:commandButton1" type="image" src="/images/plus.gif" onclick="clear__5Fid0();document.forms['_id0'].elements['autoScroll'].value=getScrolling();"/>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira