Hi,

I'm trying to leverage some of scriptaculous in a new application I'm working on. I've got the @Import worked out for including the modules of scriptaculous I want, but I'm having a hard time grasping how to create and use some Javascript libraries I create in my pages.

The first simple step I wanted to take was to make a standard <div> always a Droppable using my Layout page. I made a JS file that has a basic function to add this div to the Droppables, but I'm not sure how to get it to run when the page initializes, Firebug debugging is verifying it does not get called, but I cannot figure it out beyond that.

I tried the following:

@Import(stylesheet="context:layout/main.css",library={"${tapestry.scriptaculous}/dragdrop.js","${tapestry.scriptaculous}/effects.js","context:scripts/droppableContent.js"})

public class Layout {

        @Inject
    private JavaScriptSupport jsl;

    public void setupRender(){
jsl.addInitializerCall("createDroppable()",""); //Make the Right Content area always droppable
    }

}


droppableContent.js:

function createDroppable() {
    Droppables.add('rightContent');
    alert('added RightContent to droppables');
}

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to