This content has been marked as final.
Show 1 reply
-
1. Re: How to re-render the table body only when using rich:collapsibleSubTable?
kineas Oct 9, 2013 9:47 AM (in response to bfenlon)I know it's kind late since this question has been asked but here is the solution :
<rich:column style="width:30%"> <h:panelGrid width="100%"> <h:outputText value="#{AM['label.role']}"/> <h:inputText id="filterNameId" value="#{filterBean.name}" onfocus="putCursorAtEnd(this)"> <a4j:ajax event="keyup" render="rolesAppliDataTableId,rolesAppliDsId" status="void" listener="#{filterBean.filterRoles}" oncomplete="focusField('mainFormId:rolesAppliDataTableId:filterNameId')"> <a4j:attachQueue requestDelay="500"/> </a4j:ajax> </h:inputText> </h:panelGrid> </rich:column>
So, to add a delay, you just do this : <a4j:attachQueue requestDelay="500"/>
For information and if someone is stuck on this here are the two javascript functions you need to make this work :
function putCursorAtEnd(TB) { if (TB.createTextRange) { var FieldRange = TB.createTextRange(); FieldRange.moveStart('character', TB.value.length); FieldRange.collapse(); FieldRange.select(); } } function focusField(field) { document.getElementById(field).focus(); document.getElementById(field).focus(); // 2 focus cause of IE8 }
If you have find an other way to handle filters on "rich:collapsibleSubTable" let me know ! (Here is my thread : Filter in collapsibleSubTable)