Hi Mihir,

Is it because your commandLink has both an action and an actionListener?

Regards,

Fintan

-----Original Message-----
From: Mihir Solanki [mailto:[EMAIL PROTECTED] 
Sent: 13 April 2005 10:10
To: 'MyFaces Discussion'; 'Enrique Medina'
Subject: RE: Multiple time method is executing for tree2


Enrique,

As per your suggestion I have gone through the JSF request processing
life cycle.

But still I am not 100% clear on the things. Could you please give me
some idea that during which phases the backing beans method will be
called and why?

Mihir

-----Original Message-----
From: Enrique Medina [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 13, 2005 1:46 PM
To: MyFaces Discussion; [EMAIL PROTECTED]
Subject: Re: Multiple time method is executing for tree2

Take a look at the JSF LifeCycle and you'll understand ;-)

On 4/13/05, Mihir Solanki <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> Hi all,
> 
>   
> 
> I am having a tree2 component (only one component) in my JSF page.
> 
>   
> 
> <h:panelGrid id="grid2" columns="1" border="0" cellpadding="1" 
> cellspacing="1" align="left">
> 
> <x:tree2 value="#{TreeBean.treeData}" id="cabinet-tree" var="node" > 
> varNodeToggler="t" clientSideToggle="false">
> 
> <f:facet name="folder">
> 
> <h:commandLink immediate="true" action="#{t.toggleExpanded}" 
> actionListener="#{CabinetTree.processAction}">
> 
> <h:graphicImage value="/images/blue-folder-open.png"
> rendered="#{t.nodeExpanded}" border="0"/>
> 
> <h:graphicImage value="/images/blue-folder-closed.png"
> rendered="#{!t.nodeExpanded}" border="0"/>
> 
> <h:outputText value="#{node.description}" styleClass="nodeTree"/>
> 
> <h:outputText value=" (#{node.childCount})" styleClass="childCount" > 
> rendered="#{!empty node.children}"/>
> 
> </h:commandLink>
> 
> </f:facet>
> 
> </x:tree2>
> 
> </h:panelGrid>
> 
>   
> 
> Now when I load this page, I have noticed that the "getTreeData" 
> method of "TreeBean" is called two times. Further whenever I click on 
> the tree node (or navigation icons), the same methods gets called 
> three times.
> 
>   
> 
> Can anybody tell me what is happening behind the scenes? Why this 
> method
is
> called multiple times?
> 
>   
> 
> Mihir
> 
>   
>  ________________________________
>  
>  
> 
> Patni Computer Systems Ltd.
>  
> 
> Tel : 91 79 23240905 Ext : 413
> 
>   
> http://www.patni.com
>  World-Wide Partnerships. World-Class Solutions.
> _____________________________________________________________________
>  
>  This e-mail message may contain proprietary, confidential or legally 
> privileged information for the sole use of the person or entity to 
> whom
this
> message was originally addressed. Any review, e-transmission 
> dissemination or other use of or taking of any action in reliance upon

> this information
by
> persons or entities other than the intended recipient is prohibited. 
> If
you
> have received this e-mail in error kindly delete this e-mail from your

> records. If it appears that this mail has been forwarded to you 
> without proper authority, please notify us immediately at 
> [EMAIL PROTECTED] and delete this mail. 
> _____________________________________________________________________



http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to whom
this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_____________________________________________________________________


* ** *** ** * ** *** ** * ** *** ** * 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. 
Any views or opinions presented are solely those of the author, and do not 
necessarily 
represent those of ESB. 
If you have received this email in error please notify the sender. 
 
Although ESB scans e-mail and attachments for viruses, it does not guarantee 
that either are virus-free and accepts no liability for any damage sustained 
as a result of viruses. 
 
* ** *** ** * ** *** ** * ** *** ** *

Reply via email to