Hi,
it is not clear to me what you want to achieve.
Please take at the list or table example from the wicket-dnd example:
Usually you would create the table with a wicket repeater based on some
model values. You can use/generate markup whatever you want.
All what is needed that your Wicket
Thank you. I look at example of ExampleLabel. But it do not help so much
Now, I can drag element, I see that it was dragged and I can drop it on
element, that is allowed by }.dropCenter(span));
Methods onDrop (in DropTarget) and onAfterDrop (in DragSource) are
called. I use there code, that
wicket-dnd doesn't change the HTML markup as popular Javascript
libraries do.
Instead the markup must be generated on the server side, as it's done
with Wicket most of the time.
You have to update your component tree in onDrop(), e.g. change models,
persist something to the database. Then
So I cannot modify html? Make html from this (it is without attributes):
table tr
td spanAAA /span /td
td /td
/tr /table
to this (span from first td was moved to second td):
table tr
td /td
td spanAAA /span /td
/tr /table
But, when i want to move content of first td to
Hi,
with .drag(span) you tell the drag source that drags should start on
span tags.
div wicket:id=container class=container
table
tr
tdwww/td
tdaaa/td
tdaaa/td
/tr
/table
/div
Do you have a span tag in your markup?
Sven
On 02/26/2012 04:50 PM, Dan12321 wrote:
I would like to use
Hi Dan,
only a shot in the dark - but is your markup valid? validate with w3c.
PS: Is it required to add the ending slash?
Cheers
Per
Thanks for answer.
Yes, in the first td is span but in this forum it was formatted and span
was not visible.
The first td should be:td span wicket:id=aaa
yes it is valid and the html is:
table
tr
td span wicket:id=aaa class=aa
/span/td
td span wicket:id=bbb class=bb
/span/td
td span wicket:id=ccc
Hi,
your tds have to output their markup id too.
transfer.getData() allways NULL. What should be in transfer?
The transfer objects hold whatever the dragsource puts into it. If you haven't
overriden DragSource#onBeforeDrop() this is just the model object of the
dragged element.
BTW
Thanks.
So what should be in method DragSource#onBeforeDrop()? I should set there
transfer data: transfer.setData(drag); ?
I have Wicket 1.5.4 and wicket-dnd 0.5.0.
--
View this message in context:
Usually you do not have to override that method, please take a look at the
examples.
Sven
Dan12321 wee...@centrum.cz schrieb:
Thanks.
So what should be in method DragSource#onBeforeDrop()? I should set there
transfer data: transfer.setData(drag); ?
I have Wicket 1.5.4 and wicket-dnd 0.5.0.
10 matches
Mail list logo