You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Nahrwold, Helge" <He...@LP-GMBH.com> on 2006/04/28 15:23:01 UTC

dataTable: value-action called 3 times

Hi all,

i've a little question again! :)

There is a dataTable in my mask:

<t:dataTable id="auftragTable" 
	border="0"
	bgcolor="#C0DAEA"
	styleClass="table"
	style="width: 100%;"
	cellspacing="1"
	headerClass="table_header"
	rowClasses="table_row_1, table_row_2"
	rowOnMouseOver="highlightTableRow(this);"
	rowOnMouseOut="unHighlightTableRow(this);"
	var="auftragKopf" 
	value="#{dispoAuftraege.auftragKoepfe}" 
	varDetailToggler="detailToggler">

Now I've seen in debug that the function #{dispoAuftraege.auftragKoepfe} in
value is called 3 times on load.
Why this?

Greets,
Helge

Re: dataTable: value-action called 3 times

Posted by Murat Hazer <mu...@gmail.com>.
The JSF specification doesn't guarantee that the getters will be called only
once (different phases call same getter method..). So you should not put
high cost codes into the getter methods. Also you can look at here
http://jsf-faq.com/faqs/faces-misc.html#106

regards...

On 4/28/06, Nahrwold, Helge <He...@lp-gmbh.com> wrote:
>
> Hi all,
>
> i've a little question again! :)
>
> There is a dataTable in my mask:
>
> <t:dataTable id="auftragTable"
>         border="0"
>         bgcolor="#C0DAEA"
>         styleClass="table"
>         style="width: 100%;"
>         cellspacing="1"
>         headerClass="table_header"
>         rowClasses="table_row_1, table_row_2"
>         rowOnMouseOver="highlightTableRow(this);"
>         rowOnMouseOut="unHighlightTableRow(this);"
>         var="auftragKopf"
>         value="#{dispoAuftraege.auftragKoepfe}"
>         varDetailToggler="detailToggler">
>
> Now I've seen in debug that the function #{dispoAuftraege.auftragKoepfe}
> in
> value is called 3 times on load.
> Why this?
>
> Greets,
> Helge
>



--
Murat HAZER
Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
Tel - Phone: +90 222 335 05 80 - 1395
Cep Tel - Mobile Phone: +90 532 472 00 63
Blog URL: http://www.projedunyasi.org
Yahoo Group: http://groups.yahoo.com/group/malatyafenlisesi/