Render condition on importTemplate

Hi,
I have a modal dialog that contains an “importTemplateView” CAF control.

The value for importTemplateView is /CommonViews/MyView.view.

For test reasons I have set both the modal dialog and the import template render condition to false.

In the bean behind MyView.view (MyViewView.java) I have added log statements in the default constructor and in the initialize() method.

When the page containing the modal dialog is loaded I can see that both the constructor and the initialize() method are executed.

Expected result:
- create an instance of MyViewView.java only if the render condition evaluates to “true”.

One workaround is to control the value that is used for the import (instead of /CommonViews/MyView.view I used #{CommonViewsParentView.myViewPath}) and return the empty string when I do not what to import it, but this does not seem like a clean approach to me.

Does anyone know why the render condition does not work as expected?

PS:
I have tried to put the modal dialog in a StaticRow/StaticCell and set the render condition on the StaticRow, but with no effect. I have also tried with LazyLoad=true and LazyLoad=false.

 I use webMethods 7.1.3.

br,
Vlad

Your workaround is probably the best option. It is possible for the rendered state of controls to be changed inside a phase listener or in the initialize method, so the framework can not assume that the imported template will not be rendered when processing the ‘before’ phase lifecycle.