[ 
https://issues.jboss.org/browse/RF-11382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632492#comment-12632492
 ] 

Jan Papousek commented on RF-11382:
-----------------------------------

I've tried it in Metamer with with session bean annotated as a ViewScoped.

The getter method:
{code}
public Collection<Object> getEmptyModel() {
    setEmptyModelCalled(true);
    logger.info("empty model called");
    return new ArrayList<Object>();
}
{code}

The page:
{code}
<h:form>
    <rich:dataTable id="richDataTable" value="#{richDataTableBean.emptyModel}" 
rendered="false" />
</h:form>
<br />
CALLED: <h:outputText id="outputCalled" 
value="#{richDataTableBean.emptyModelCalled}" />
{code}

After opening the page, the page shows "CALLED: false", but the message "empty 
model called" is logged. So the getter is called, but the variable where I 
store the information about calling the getter is reset somehow. 

When I use h:dataTable instead of rich:dataTable, the page shows "CALLED: 
false" and the message is not logged (getter is not called).
                
> Datatable and ExtendedDatatable evaluate value attribute even if 
> rendered=false
> -------------------------------------------------------------------------------
>
>                 Key: RF-11382
>                 URL: https://issues.jboss.org/browse/RF-11382
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-tables
>    Affects Versions: 4.0.0.Final, 4.1.0.Milestone2
>         Environment: Fedora 15, Glassfish 3.1.1, CDI (Weld)
>            Reporter: Frederick Kämpfer
>            Assignee: Jan Papousek
>             Fix For: 4.2.0.Tracking
>
>
> In Richfaces 4 both datatable and extendedDatatable evaluate the value 
> attribute even when rendered is set to false, even though it is not 
> necessary. This makes it hard to achieve performance by trimming parts of the 
> view tree. The built-in h:dataTable behaves correctly in that case.
> To reproduce simply try this snipplet:
> {code:xml}
> <h:form>
>      <rich:dataTable value="#{myBean.property}" rendered="false">
>       </rich:dataTable>
> </h:form>
> {code}
> Side note: The reason I'm posting this is, that i want to embed a 
> rich:dataTable in a ajax loaded rich:togglePanelItem which is loaded on 
> demand. Probably fixing the "render" problem will also make the dataTable 
> lazy-loadable when switching to the corresponding togglePanelItem.
> I hope this is no duplicate, I only found RichFaces 3 issues mentioning this 
> problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to