s:button with image attribute doesn't add contextroot in src attribute
----------------------------------------------------------------------
Key: JBSEAM-4651
URL:
https://jira.jboss.org/browse/JBSEAM-4651
Project: Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.2.0.GA
Environment: Ubuntu (Karmic Koala 9.10), Firefox 3.5, JBoss AS 4.2.3, Richfaces
3.3.1.GA, JSF 1.2 (with Facelets), EJB 3.0
Reporter: Jochen H
Priority: Minor
Hi all,
I have a small problem which can be simulated in a simple test case. In a existing Seam
application, add this:
{code}
<s:button image="/img/logo.jpg"/>
{code}
This will generate following source code:
{code}
<input type="image" src="/img/logo.jpg"
id="j_id222:j_id233:j_id234"
onclick="location.href='/xxx/yyy/zzz.seam?cid=1'; return false;">
{code}
As you can see, the "src" attribute doesn't start with my contextroot, so my
image will never by found. I searched the issue tracker of Seam, but nobody reported such
an issue.
I checked the source code, and the HTML code is generated by : ButtonRendererBase.java. In
this class file, you will find
{code}
if (button.getImage() != null)
{
writer.writeAttribute(HTML.SRC_ATTR, button.getImage(), HTML.SRC_ATTR);
}
{code}
Now, where is the contextroot added? It's not in HtmlButton and nog in ButtonTag?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira