RE: how to modify internal JavascriptResourceReference packaged with component

2013-02-20 Thread evan
6:02 PM To: evan Subject: Re: how to modify internal JavascriptResourceReference packaged with component final ResourceReference YOURJS = new JavaScriptResourceReference( Yourclass.class, YourMultiFileUploadField.js); final int max = 3; MultiFileUploadField x = new MultiFileUploadField

Re: how to modify internal JavascriptResourceReference packaged with component

2013-02-18 Thread Martin Grigorov
Hi, This is improved in Wicket 6. You can use org.apache.wicket.protocol.http.WebApplication#addResourceReplacement for exactly this use case. See http://wicketinaction.com/2012/07/wicket-6-resource-management/ You are recommended to upgrade your application. On Thu, Feb 14, 2013 at 1:39 AM,

Re: how to modify internal JavascriptResourceReference packaged with component

2013-02-18 Thread evan
This is improved in Wicket 6. You can use org.apache.wicket.protocol.http.WebApplication#addResourceReplacement for exactly this use case. See http://wicketinaction.com/2012/07/wicket-6-resource-management/ You are recommended to upgrade your application. Nice - the addResourceReplacement

Re: how to modify internal JavascriptResourceReference packaged with component

2013-02-18 Thread Francois Meillet
final ResourceReference YOURJS = new JavaScriptResourceReference( Yourclass.class, YourMultiFileUploadField.js); final int max = 3; MultiFileUploadField x = new MultiFileUploadField(yourid){ @Override public void renderHead(IHeaderResponse response) {

Re: how to modify internal JavascriptResourceReference packaged with component

2013-02-15 Thread evan
Hi Francois, Thanks, but actually this still has issues. At first I thought it was clearly the simple thing I was missing, but then I remembered there's still a problem - the line in renderHead copied from the original MultiFileUploadField uses private members container, max, and upload, so the

Re: how to modify internal JavascriptResourceReference packaged with component

2013-02-15 Thread Francois Meillet
Le 15 févr. 2013 à 16:48, evan e...@novelution.com a écrit : Hi Francois, Thanks, but actually this still has issues. At first I thought it was clearly the simple thing I was missing, but then I remembered there's still a problem - the line in renderHead copied from the original

Re: how to modify internal JavascriptResourceReference packaged with component

2013-02-15 Thread evan
Okay, so you are saying I need to create my own versions of each of those private variables referenced in renderHead, and override any methods that use any of them, to reference my own, is that right? Unfortunately, it still has maintenance implications, but I guess that might just be inevitable

Re: how to modify internal JavascriptResourceReference packaged with component

2013-02-15 Thread Francois Meillet
if the question is how to modify internal JavascriptResourceReference packaged with component I will just override @Override public void renderHead(IHeaderResponse response) { // initialize the javascript library

Re: how to modify internal JavascriptResourceReference packaged with component

2013-02-14 Thread Francois Meillet
Hi Evan, try this private static final ResourceReference YOURJS = new JavaScriptResourceReference( YourClassWhereJavascriptReside.js.class, YourModifiedJavascript.js); @Override public void renderHead(IHeaderResponse response) {