This content has been marked as final.
Show 5 replies
-
1. Re: Columngroup re-rendering
ilya_shaikovsky Feb 10, 2009 5:21 AM (in response to imkookoo)reRendering the conditionally rendered elements restricted. Because changing rendered=false to true by ajax caused the framework trying to update elements which isn't present in DOM. And columnGroup tag which parent to columns in JSF tree has no representation in DOM also. So seems no suitable solution for you.
-
2. Re: Columngroup re-rendering
imkookoo Feb 10, 2009 10:40 AM (in response to imkookoo)"ilya_shaikovsky" wrote:
reRendering the conditionally rendered elements restricted. Because changing rendered=false to true by ajax caused the framework trying to update elements which isn't present in DOM. And columnGroup tag which parent to columns in JSF tree has no representation in DOM also. So seems no suitable solution for you.
Oh ok.. Thank you.
I just thought of a solution, tested it, and it worked. It basically involves updating the CSS rather than the rendered attribute. Basically, change the code above to:<rich:dataTable id="dataTable" ajaxKeys="#{rowsToUpdate}" value="#{rows}" var="row"> <rich:column> ... </rich:column> <rich:column> ... </rich:column> <rich:column> ... </rich:column> <rich:column> <a4j:outputLink action="#{showDetails}" reRender=" detailsRow "/> </rich:column> <rich:columnGroup> <rich:column id="detailsRow" colspan="7" style="row.showDetails == true ? '' : 'display:none'"> DETAILS </rich:column> </rich:columnGroup> </rich:dataTable>
-
3. Re: Columngroup re-rendering
imkookoo Feb 10, 2009 10:42 AM (in response to imkookoo)Whoops... made a mistake above. "row.showDetails == true ? '' : 'display:none'" should of course be in an EL Expression bracket: #{...}
-
4. Re: Columngroup re-rendering
ilya_shaikovsky Feb 10, 2009 10:47 AM (in response to imkookoo)but in this case - the details will be already at client and should be just shown.. And seems no matter to use additional ajax request.
-
5. Re: Columngroup re-rendering
imkookoo Feb 10, 2009 11:07 AM (in response to imkookoo)"ilya_shaikovsky" wrote:
but in this case - the details will be already at client and should be just shown.. And seems no matter to use additional ajax request.
I don't want the details to be shown by default since that would make the page way too long. What I'm additionally doing though, to reduce load, is wrapping the DETAILS portion in a panelGroup and then putting the rendered attribute on the panelGroup.
So basically:<rich:columnGroup> <rich:column id="detailsRow" colspan="7" style="#{row.showDetails == true ? '' : 'display:none'}"> <h:panelGroup rendered="#{row.showDetails == true}"> DETAILS </h:panelGroup> </rich:column> </rich:columnGroup>