>From: Hermod Opstvedt <[EMAIL PROTECTED]>
>
> Hi
>
> I have a situation that I am struggling a bit with. On a page that I have, I
> have a page that displays different races and has a clayForEach tag that is
> supposed render a jsfid that displays information about a classes in a race,
> and a dataTable on that jsfid that displays the results for each class. What
> happens is that when I first hit that page, the method that backs the
> clayForEach is called, but when I change to a different race, the method is
> never called again, but it displays the classes w/results from the initial
> load of that page. I seem to remember something about the clayForEach tag
> and the var being session scoped? Should I explicitly do a
> getExternalContext().getSessionMap().remove("myvar") in my backing beans
> init method?
>
That's correct. The data is stored in a map in session scope. This is an
attempt to cheat the complexity of the UIData component. What the clayForEach
component does is creates a naming container for each iteration. It actually
creates a grid of components versus the fly weight pattern that the UIData
uses. The data from the "var" attribute is organized in a map in session scope
and the managed-bean-name symbol injects the prefix binding to the map
therefore the complex decode in the UIData is not required. The clayForEach is
not a decendent of UIData. It's just a dynamic way to create a grid of JSF
components that have a strategy for binding.
The clayForEach is a "RUNTIME" uses of the clay component so this setup only
happens when the view is created. I think that is what is causing your
problem. You need the view to be recreated each time you select a race. I
would try adding a navigation rule back to the same page from the command that
is associated with selecting a race.
If that doesn't work, I would suggest using the tomahawk dataList component.
The clayForEach is a kluge in comparison.
Example of the dataList:
<span jsfid="t:dataList" id="data1"
styleClass="standardList"
var="person"
value="[EMAIL PROTECTED]"
layout="simple"
rowCountVar="rowCount"
rowIndexVar="rowIndex" allowBody="true">
<span jsfid="outputText" value="#{person.firstName}"/>
<span jsfid="outputText" value="#{person.lastName}"/>
<span jsfid="t:htmlTag" value="br" rendered="#{(rowIndex !=
(rowCount - 1))}"/>
</span>
> Hermod
>
Gary
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>