javascript - How to re-apply JS/jQuery document.ready when a JSF component is re-rendered? -
i have created calendar component , js applied on document.ready
. when ajax call , re-render component, js/jquery not there anymore. can solved adding js in-line has performance overhead. how can re-apply js behaviour after component re-rendered?
my generated html code looks this.
<div class="input-append date"> <input data-format="dd/mm/yyyy hh:mm:ss" type="text"></input> <span class="add-on"> <i data-time-icon="icon-time" data-date-icon="icon-calendar"> </i> </span> </div>
thanks
i think best practice use javascript inside java generated code (jsf), organize them jsf composite components. reusable practice. composite components included in version 2.0 of jsf.
you can oracle tutorial , balusc example.
regards,
Comments
Post a Comment