Hello,

  1. Is the entire tree created before rendered property is checked?
     - Yes... and no... It will be fully built most of the time on
     postback and almost never on new rendering... which kind of
****, but it's
     how its work as you can find out when checking the Tag code.
  2. Is a component added to the UIViewRoot only if rendered ="true"?
     - No, it's always added (95% sure).


Regards,

~ Simon

On 12/12/06, Madhav Bhargava <[EMAIL PROTECTED]> wrote:

 Hi All,



Sorry about the last mail – there was no greeting and no subject.



Here is the mail content again:



I am using tiles along with Myfaces.

My layout.jsp contains the following parts

<definition name="layout.tiles" path="/common/layout.jsp">

            <put name="header" value="/common/header.jsp" />

            <put name="topnavigation" value="/common/topnavigation.jsp" />

            <put name="leftnavigation" value="/common/leftnavigation.jsp"
/>

            <put name="body" value="/common/blank.jsp" />

            <put name="footer" value="/common/footer.jsp" />

</definition>



I need to generate leftNavigation menu programmatically. So in my
leftNavigation.jsp I have included the following code:

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

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

    </t:div>

</t:div>



navigationMenu.leftPanelNavigationConstructed – This method has the
following code to identify the parent UIComponent which is <t:div> component
with the ID= "subnavigation"

*Following is the code:*

FacesContext context = FacesContext.getCurrentInstance();

Application app = context.getApplication();

UIComponent parentUIComponent = context.getViewRoot
().findComponent("subnavigation");



The problem is that parentUIComponent is coming as *null*



The method mentioned in the rendered property gets called but it is not
able to recognize the component for which it was called. I have following
questions:

   1. Is the entire tree created before rendered property is checked?
   2. Is a component added to the UIViewRoot only if rendered ="true"?



Any help will be appreciated.



Rgds,

Madhav


 **************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the original
message. Further, you are not to copy, disclose, or distribute this e-mail
or its contents to any other person and any such actions are unlawful. This
e-mail may contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as a
result of any virus in this e-mail. You should carry out your own virus
checks before opening the e-mail or attachment. Infosys reserves the right
to monitor and review the content of all messages sent to or from this
e-mail address. Messages sent to or from this e-mail address may be stored
on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Reply via email to