[
https://issues.apache.org/jira/browse/WICKET-3930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070551#comment-13070551
]
George Armhold commented on WICKET-3930:
----------------------------------------
Hi Martin, thanks for the clarification.
For my purposes, I'm happy to move the images into the same package as the
.html files. I guess I'm just used to having a src/main/webapp/images dir where
most of these things are kept in a common place.
I think what tripped me up was this entry from the Wicket In Action book, page
226:
"If src can't be resolved to a packaged resource, Wicket leaves the
attribute alone."
Well I guess that's technically accurate, but it also adds an onclick() handler
which effectively does the same thing as modifying the src attribute. :-) Is
there a valid reason to attach this handler? I found it to be very surprising
behavior, but I assume there must be a good use case for it.
Thanks again.
> wicket:link loads image via onclick() instead of the referenced page when an
> anchor tag includes an img
> -------------------------------------------------------------------------------------------------------
>
> Key: WICKET-3930
> URL: https://issues.apache.org/jira/browse/WICKET-3930
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Environment: Mac OSX 10.7, Java 1.6.0_26
> Reporter: George Armhold
> Labels: linking
> Attachments: wicket-link-bug.tar.gz
>
>
> With the following markup, I expect that clicking on the image will result in
> the browser loading AnotherPage:
> <a href="AnotherPage.html">
> <img src="java-logo.png"/>
> </a>
> Instead, the image itself it shown, due to the onclick() handler that
> wicket:link is adding.
> I will include a quickstart to demonstrate.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira