myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "r.stranders" <r.strand...@gmail.com>
Subject c:set creates alias?
Date Wed, 28 Mar 2007 10:09:30 GMT

Hi,

I ran into the following problem. I've got a map with some information I
would like to use in my page. Creating this map is an expensive operation
that should only be performed once. Therefore, I thought I could use the
<c:set> jstl tag. However, each time I access the variable, the method is
called again. In the example below for instance, the method
"rolesOfSelectedUserMap" is called twice.

<c:set var="rolesOfUser"
	value="#{userController.rolesOfSelectedUserMap}" /> 
<h:outputText value="rolesOfUser['admin']" />
<h:outputText value="rolesOfUser['user']" />

It seems that <c:set> only creates an alias for the operation, and does not
actually set the variable "rolesOfUser" to the correct value. Any ideas how
to fix this (with or without c;set)?
-- 
View this message in context: http://www.nabble.com/c%3Aset-creates-alias--tf3479258.html#a9710152
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message