The following event does not fire:
<script> $("#inputTxt").change(function() { alert("changed"); }); </script>
The code for inputTxt is as follows:
<p:inputText id ="inputTxt" name="inputTxt" value="#{article.description}" style="border:none; box-shadow:none;"/>
The coloumn "articleDescription" is defined in a datatable named "articlesInformation", which is placed in the "articleForm" form.
When checking the item, I found that the identifier inputText becomes - "articlesInformation: 0: inputTxt". This is probably the problem.
Viewing page information says:
<td role="gridcell"> <div class="ui-dt-c"> <input id="articlesInformation:0:inputTxt" name="articlesInformation:0:inputTxt" type="text" value="Description of Article 1" style="border:none; box-shadow:none;" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all" /> <script id="articlesInformation:0:inputTxt_s" type="text/javascript">PrimeFaces.cw('InputText','widget_articlesInformation_0_inputTxt' {id:'articlesInformation:0:inputTxt'}); </script></div></td>
How should jquery be defined for surface components?
Thanks Shikha
source share