Hi there,

I'm having a problem of the wrong bean being resolved on an h:dataTable... I'm building a JSF application to augment a legacy JSP application (in other words, there are still a lot of plain-jsp pages still left). In the h:dataTable I have the following statement:

<h:dataTable var="attribute" value="#{productTypeBrowse.selectedProductType.attributes}">
    <h:column rendered="#{attribute.hasProperties}">
...

I tested it all separately and it worked fine. However, when I integrated with the previous system ( i.e., put it into QA and the QA navigated through the legacy pages), I got an error message saying that it could not find the method "hasProperties" in the bean. When I paid more attention to the error message, it was looking for the bean in a legacy data type.

I then went through the legacy code and found the following call:

pageContext.setAttribute( "attribute", oldObject, PageContext.SESSION_SCOPE);

And what it looks like is that when it is running, instead of resolving to the dataTable-set "local" variable it is resolving to the session object. Is this an expected behavior? Is the only way of going around this to rename my dataTable variables to something that does not collide with any set session variables?

Thank you,

Michel

Reply via email to