I am trying to adapt the Wonder example DragAndDropLists. The example has 2 
drop areas with hard coded id. I need to provide 1 source drop area and several 
destination drop areas. These are inside a WORepetition. I tried to use the 
repetition loopvar (item binding) to create a unique id attribute but the app 
crashes with a null pointer exception. Obviously even when the drop area is 
inside the WORepetition the JavaScript functions in the background seem to 
create/populate/whatever code/function upfront before the loop actually starts. 
Any idea how I could create an id for the drop area? 

Code currently looks something like this (just the relevant snippet):
            <webobject name = "sectionsRepetition">
            <webobject name = "assignedIndustryTechdocTypesDropArea">
            <table style="border:solid 1 red">
                <tr>
                    <td style="border:solid 1px red"><webobject name = 
"sectionTitle" /></td>
                </tr>
    
                <tr>

with the bindings:

sectionsRepetition : WORepetition {
        list = sectionsList;
        item = sectionsLoopvar;
}
assignedIndustryTechdocTypesDropArea   : AjaxDroppable {
        id = assignedDropArea;
        updateContainerID = "everythingUpdateContainer";
        action = droppedOnAssignementArea;
        droppedObject = droppedObject;
        onComplete = onCompleteFunction;
}

and in the component:
    public String assignedDropArea() {
        return "assignedDropArea_" + sectionsLoopvar.shortText();
    }

Crash is because sectionsLoopvar is null.

Thanks for any help
---markus---



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to