Drag and drop listbox

asked 2014-05-26 11:19:30 +0800

wigberto gravatar image wigberto
52 4

I have the code of below, Can i disable "droppable" a cell according to the value of a field. Ej. droppable = "@bind(!each.groupExtraction.equals('0'))" Thank you.

<listitem draggable="false" droppable="true"
                        onDrop="@command('onDragAndDrop', item=event.dragged)"
                        <listcell label="@bind(each.slot)"></listcell>
                        <listcell label="@bind(each.groupExtraction)">
                        <listcell label="@bind(each.client)"></listcell>
                        <listcell label="@bind(each.route)"></listcell>
                        <listcell label="@bind(each.deliveryNote)">
                        <listcell label="@bind(each.extraction)"></listcell>
                        <listcell label="@bind(each.priority)"></listcell>
                        <listcell label="@bind(each.matricula)"></listcell>
                        <listcell label="@bind(each.totalUbicaciones)">
                        <listcell label="@bind(each.finishUbicaciones)">
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-05-27 02:46:36 +0800

cor3000 gravatar image cor3000
4466 2 7
ZK Team

updated 2014-05-27 02:49:28 +0800

Hi wigberto,

yes you can use, as you have written (droppable = "@bind(!each.groupExtraction.equals('0'))" ):

However I'd prefer...

droppable="@bind(each.groupExtraction ne '0')"

or better use (because this field is never written back):

droppable="@load(each.groupExtraction ne '0')"

or if the value is never changed after rendering even more efficient is:

droppable="@init(each.groupExtraction ne '0')"

please also check the EL syntax.

I assume you didn't just want to hear "yes you can", since you could try that yourself. So if I am right, can you explain what your real problem is?


link publish delete flag offensive edit


Thank You Robert. I hope to explain to me. The problem that I have is that although write "droppable="@load(each.groupExtraction ne '0')"" he keeps on executing @command and does not change to me the color of the label drag&drop.

wigberto ( 2014-05-27 10:42:19 +0800 )edit

ah maybe I still don't get what you are trying or I read incorrectly... are you trying to enable/disable droppable for a specific listcell or the whole listitem, I could not see clearly in your example? Maybe you can provide an example on zkfiddle.org so I can see and correct the issue directly.

cor3000 ( 2014-05-27 11:05:02 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2014-05-26 11:19:30 +0800

Seen: 17 times

Last updated: May 27 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More