I haven't been much into javascript, yet ;)
It looks like an easy job for someone who knows what they're doing -
pull out the function name changes as parameters to the methods
instead of hardcoding for each FormComponent.
The main differences are:
initWIDGET123 = function() {
initWIDGET124 = function() {
---
widgetId: "WIDGET123",
widgetId: "WIDGET124",
---
componentId: "WIDGET123",
componentId: "WIDGET124",
---
initWIDGET123();
initWIDGET124();
---
wicketCalendarInits.push(initWIDGET123);
wicketCalendarInits.push(initWIDGET124);
---
Anybody know how to trick this into plain string parameter format?
**
Martin
2008/6/7 Peter Thomas <[EMAIL PROTECTED]>:
> On Sat, Jun 7, 2008 at 7:17 PM, Martin Makundi <
> [EMAIL PROTECTED]> wrote:
>
>> Hi!
>>
>> I have a table with sevearal rows and each row has a couple of YUI
>> datepickers (org.apache.wicket.extensions.yui.calendar.DatePicker).
>>
>> I was wondering why the page loads very slowly and then I had a look
>> at the web page source code.
>>
>> The web page is bloated with repeatedly submitted YUI javascript -
>> most of it is just repetition with very minor differences.
>
>
> You could consider rolling your own datepicker component using YUI, I had
> some success with this and was also able to factor out some of the
> repetitive js into a common *.js file but in my case I don't need
> localization at all which the Wicket extensions one is good at.
>
>
>>
>>
>> Does anyone know how this particular javascript can be optimized and
>> if it has been done before somewhere? Or would you recommend some
>> alternative?
>>
>> **
>> Martin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]