• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem with repeating DropArea
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with repeating DropArea


  • Subject: Problem with repeating DropArea
  • From: Markus Ruggiero <email@hidden>
  • Date: Mon, 07 Sep 2015 17:39:38 +0200

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: D2W HTML Editor?
  • Next by Date: Moving Project Wonder Forward
  • Previous by thread: Re: D2W HTML Editor?
  • Next by thread: Re: Problem with repeating DropArea
  • Index(es):
    • Date
    • Thread