[ 
https://issues.apache.org/jira/browse/WICKET-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628133#action_12628133
 ] 

Stephan van Eijkelenburg commented on WICKET-1700:
--------------------------------------------------

There seems to be one more small bug. When contextRelativePath.getObject() 
returns an empty String, the image src of (for example) 'new 
ContextImage("img", "images/1.jpg")' will become '/images/1.jpg' and the image 
will not work.

changing
final String contextRelativePath = Strings.join("/", prefix, path);
to
final String contextRelativePath = prefix.equals("") ? path : Strings.join("/", 
prefix, path);
or something similar, in ContextPathGenerator.java makes it work

> Make functionality of ContextImage a behavior so that other types of 
> components can utilize its functionality
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1700
>                 URL: https://issues.apache.org/jira/browse/WICKET-1700
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M2
>         Environment: N/A
>            Reporter: Will Hoover
>            Assignee: Igor Vaynberg
>            Priority: Trivial
>             Fix For: 1.4-M3
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> It would be better if ContextImage was a behavior rather than an actual 
> component. For instance, if you have an html input of  type=image (or a link 
> for that matter) you can still utilize the behavior whereas a component you 
> cannot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to