volosoft / jtable

A JQuery plugin to create AJAX based CRUD tables.
http://www.jtable.org
1.1k stars 506 forks source link

How to add Java Script functionality in tml file(Tapestry framework) #1627

Open asitsk opened 9 years ago

asitsk commented 9 years ago

Hi Team,

Please help me out how to add Java Script function in tapestry ---- tml file

I want to call OnBlur method from input field Is this correct to add t:onBlur="Javascript:populateName(name)" this line.

<t:textfield t:id="orderAddAAA" t:onBlur="Javascript:populateName(name)" t:disabled="updateMode" t:validate="required" maxlength="20"/>

Please help me out

Regards, Asit

peterboccia commented 9 years ago

Have you tried to apply this attribute on event "formCreate" http://jtable.org/ApiReference/Events#event-formCreated the field is always named with the name of the field. Example: field name: Surname <input type="text" name="Surname" ...

Bind this event and put it in with jQuery: $('input[name="Surname"]').attr('t:validate', 'required');