Madhav Bhargava wrote:
Hi All,

I have a JSP which uses tiles.

The left menu part of the JSP needs to be programmatically created as the left menu will differ based on the role the use plays.

In the leftNavigationMenu.jsp – included as a tile in layout.jsp I have the following code:

<t:div id="subnavigation_outer" forceId="true">

<t:div id="subnavigation" forceId="true" rendered="#{navigationMenu.leftPanelNavigationConstructed}" binding="#{navigationMenu.parentUIComponent}">

    </t:div>

</t:div>

In the method isLeftPanelNavigationConstructed HtmlPanelNavigationMenu component and child HtmlCommandNavigationItem components are added to the DIV component with id=”subnavigation”

At the end of creation of this menu when I view the children of UIViewRoot then all the components are seen and are properly added.

However when the JSP gets displayed nothing is displayed in the left navigation.

I am puzzled and I am not able to find a reason. Even though the UIViewRoot contains the components still it is unable to render any of the components.

Are your components nested within a "namespacing container", eg a table or a subview? If so, the id will have a prefix eg "subviewname:subnavigation_outer".

Also, when using JSF 1.1 with JSP, on first page render components are created and rendered in one pass. That means that when a component is being processed, any components further down the page don't yet exist (and so cannot be found). Using JSF1.2 (not yet implemented by MyFaces) or Facelets solves this.

Regards,  Simon

Reply via email to