myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Meierhoff <Michael.Meierh...@WebtopProject.de>
Subject Re: [Trinidad] TreeTable fires actionListener too often
Date Fri, 29 Aug 2008 12:32:47 GMT
Hallo,

take a look at the generated  id's of your  h:commandLink component's. I 
think all commandLink has the same id's. Try to use the  tr:commandLink. 
Then the problem should be away.

Greetings Michael Meierhoff

Christian Poecher schrieb:
> Hi there,
>
> I introduced the trinidad components (1.0.8) in our project based on myfaces
> 1.1.5. Especially I wanted to use the TreeTable to show ordered data. The
> Tree starts like this:
>
> <tr:treeTable var="node" initiallyExpanded="true"
> 	value="#{bhcManagementByCategoryForm.model}" rendered="true"
> 	rootNodeRendered="false">
> 	<f:facet name="nodeStamp">
> 		<tr:column>
> 			<f:facet name="header">
> 				<tr:outputText value="" />
> 			</f:facet>
> 			<tr:outputFormatted value="#{node.text}" />
> 		</tr:column>
> 	</f:facet>
> 	<tr:column>
> 		<f:facet name="header">
> 			<tr:outputText value="#{Message.bhcManagementSlaId}" />
> 		</f:facet>
> 		<h:commandLink action="details" actionListener="#{slaBean.selectSla}">
> 			<h:outputText value="#{node.data.id}" />
> 			<f:param name="detailId" id="detailId" value="#{node.data.id }" />
> 		</h:commandLink>
> 	</tr:column>
> ...
> </tr:treeTable>
>
> As you see there is a h:commandLink in the table which also has a parameter
> to it. The idea is that the slaBean, a session scoped backing bean executes
> the selectSla method, which then reads the detailId parameter and uses a
> kind of copy constructor to copy the contents of a loaded slaBean object
> into the session scoped instance. 
>
> What I currently don't understand is why the slaBean.selectSla method is
> called as often as the displayed number of rows. In case of my development
> envioronment that is 83 times, in production probably more often. Can
> someone enlighten me, what I am doing wrong here?
>
> TIA,
> Chris
>
>   


Mime
View raw message