Hi,

I would like to add some javascript which contains an array  to my wicket page.
it would be rendered on page load.... What is the best way to dothis?

The array here should be coming from java code an is not static......

What is the best way that I could incorporate this into my wicket code?
I've use texttemplate contributor before but it can only replace
single variables,

What is my list size is dynamic such as in the example below?

$(function () {
        createJquery();
    })
    function createJquery() {
        var date = new Date();
        var d = date.getDate();
        var m = date.getMonth();
        var y = date.getFullYear();

        $('#calendar').fullCalendar({
            theme: true,
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'
            },
            editable: false,
            events: [
                {
                    title: 'PHP 15,030.47',
                    start: new Date(2011, 0, 14),
                    end: new Date(2011, 0, 14),
                    className: 'fc-eventgreen'
                },
                {
                    title: 'PHP 5,000.00',
                    start: new Date(2011, 0, 10),
                    end: new Date(2011, 0, 10),
                    className: 'fc-eventred'
                },
                {
                    title: 'PHP 2,000.00',
                    start: new Date(2011, 0, 19),
                    end: new Date(2011, 0, 19),
                    className: 'fc-eventred'
                },
                {
                    title: 'PHP 3,000.00',
                    start: new Date(2011, 0, 4),
                    end: new Date(2011, 0, 4),
                    className: 'fc-eventred'
                },
                {
                    title: 'PHP 11.00',
                    start: new Date(2011, 0, 4),
                    end: new Date(2011, 0, 4),
                    className: 'fc-eventred'
                },
                {
                    title: 'PHP 8,500.00',
                    start: new Date(2011, 0, 10),
                    end: new Date(2011, 0, 10),
                    className: 'fc-eventgreen'
                },
                {
                    title: 'PHP 15,258.09',
                    start: new Date(2011, 0, 21),
                    end: new Date(2011, 0, 21),
                    className: 'fc-eventgreen'
                }
            ]
        });
    }

Reply via email to