I am working with a legacy application in which we have used Strtus1.2.
Now I want to make a change in the UI. I want to disable Drag and Drop option on a text box.
Note that : HTML text box has attributes line onDrag and onDrop.
But here we have used Struts Tag Library and in that TLD file, there is no declaration for
onDrag and onDrop option. It gives exception when I use those attributes.
It says “Attribute onDrop invalid for tag text according to TLD“
Can anyone suggest me what is the best way to solve this problem.
Here I can use simple HTML text but for that I need to change Struts action class as well.
Can I change the TLD file ?
Do struts provides TLD file updation as per the new HTML standards ?
Regards,
Gunjan Shah.
I changed the html:text tag to simple HTML tag. There are built in HTML support for disabling onDrag and onDrop.
You can use the attributes ondrag = false and ondrop = false to disable drag and droop in browser elements.
If you dont want to change struts action class then you can create a duplicate copy of the element with simple HTML tag and reset the value in original tag while submitting the form.
Regards,
Gunjan.