[Seaside] JQDroppable convience method

Johan Brichau johan.brichau at uclouvain.be
Wed Dec 9 09:58:12 UTC 2009


On 07 Dec 2009, at 18:54, Stan Shepherd wrote:

> Hi, when I try this out in the functional tests
> http://localhost:8090/tests/jquery-ui/droppableinteraction
> 
> I get the draggable is nil:-

Hi Stan,

That sounds as if the the draggable does not have a passenger declared.
Off the top of my head, I think you need to add the following line (inserted below).

> renderContentOn: html
> 	#(#blue #red #green) do:
> 			[ :each | 
> 			(html div)
				   passenger: each;
> 				class: 'box';
> 				class: each;
> 				script: (html jQuery new draggable revert: true) ].
> 	html div class: 'clear'.
> 	(html div)
> 		class: 'drop';
> 		class: 'brown';
> 		script:
> 				((html jQuery new droppable)
> 						accept: 'div';
> 						hoverClass: 'drop-hover';
> 						activeClass: 'drop-active';
> 						onDrop:
> 								(html jQuery ajax callbackDroppable:
> 											[ :event | 
>                                                                                	
> Transcript cr;
> 												show: (event at: #draggable) asString ]))
> 

> (nb if i put ...onDrop:	(html ajax callbackDroppable: ... as in your example
> I get MessageNotUnderstood: WARenderCanvas>>ajax)

I think that's a typo and it should be: html jQuery ajax 

----------------------------
Johan Brichau
johan.brichau at uclouvain.be






More information about the seaside mailing list