[
https://issues.apache.org/jira/browse/WICKET-5124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14507391#comment-14507391
]
ASF subversion and git services commented on WICKET-5124:
---------------------------------------------------------
Commit 071e5a06a99a56914482a5fd1418a256bb1d5906 in wicket's branch
refs/heads/master from [~bitstorm]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=071e5a0 ]
changes for WICKET-5713 and WICKET-5124
> Improve ResourceReference#getDependencies() API
> -----------------------------------------------
>
> Key: WICKET-5124
> URL: https://issues.apache.org/jira/browse/WICKET-5124
> Project: Wicket
> Issue Type: Improvement
> Affects Versions: 6.6.0
> Reporter: Igor Vaynberg
> Assignee: Martin Grigorov
> Fix For: 7.0.0-M1
>
>
> currently the signature is
> public Iterable<? extends HeaderItem> getDependencies()
> which is awkward to use.
> suppose i want a javascript reference that should include a css reference as
> a dependency, i cannot simply add it to iterable like this:
> new ResourceReference(Some.class, "some.js") {
> Iterable getDependencies() {
> Iterable supers=super.getDependencies();
> // supers.add(CSS); <=== cannot do this, instead
> List list=new ArrayList();
> for (reference:supers) {
> list.add(reference);
> }
> // now i can finally add mine
> list.add(CSS);
> return list;
> }
> }
> instead change Iterable to a List that is backed by a mutable one. this
> should make extending much easier. if List is too "open" create Appendable {
> append(); } backed by a list and use that.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)