[Seaside] Re: Draggable problems

itsme213 itsme213 at hotmail.com
Sat Dec 8 19:06:26 UTC 2007


"Lukas Renggli" <renggli at gmail.com> wrote in message
>> I need to assign my own ID to a draggable. However, as soon as I add the
>> #passenger: it seems my ID is overridden by a framework-generated one. 
>> Any
>> ideas?
>
> Seaside needs to uniquely identify the DOM elements during drag&drop
> operations.

Yes, but I have my own unique IDs where I need them, and I do the
    id: myId
before I do
    passenger: ...

Would it make sense in this case for #passenger to check pre-existing #id, 
and call a new method like:

WARenderingContext>>storePassenger:atId:
storePassenger: anObject at: anId
    (callbacks includesKey: anId) ifTrue: [self error].
    callbacks at: anId put: anObject
    ^ anId

> 1. Wrap your DOM element with your own ID into one where Seaside is
> able to choose its own ID.

It seems that might work, though I usually prefer not to do too much such 
wrapping.

> 2. Avoid using an ID (in my opinion this is not a good practice
> anyway). Use a class instead.

I would if this was for CSS styling, but it is for direct Ajax editing of 
specific elements among multiple similar css-classed ones.

Many thanks - Sophie 





More information about the seaside mailing list