I see it like that as well. Basically, during rendering, the child component
properies would be altered as follow:
1. Check if the property was set explicitely by the component (I'll have to
check if there's an easy way to do that... I thought about checking for a
value binding but that's not exactly right, maybe the FacesBean). If an
explicit property was set, use it.
2. Check the current row data at current row key. If it implements interface
TrainStation (or any other name), save the default attribute values on the
stamp for the attribute the interface is providing. Cast the row data and
extract the new attribute values and states.
3. Nothing was mentionned by the user, so apply default behavior (visited
before focus, and so on).
We could keep commandNavigationItem to implement that.
~ Simon
On 9/27/06, Adam Winer <[EMAIL PROTECTED]> wrote:
On 9/26/06, Pavitra Subramaniam <[EMAIL PROTECTED]> wrote:
>
>
> <tr:train value="#{trainModel}" var="row">
> <tr:stop text="#{row.label}"
> action="#{row.outcome}"
> immediate="#{row.immediate}"
> readOnly="#{row.readOnly}"
> visited="#{row.visited}"
> selected="#{row.selected}"
> disabled="#{row.disabled}"/>
> </tr:train>
So how is this better than the existing
<af:commandMenuItem>? Seems like the
same amount of code.
I was imagining an intermediate step, where *if*
the model points at instances of a specific model
type, and you use a simple template-ish tag, then you
don't have to set any EL, so just:
<tr:train value="#{trainModel}" var="row">
<tr:trainStop/>
</tr:train>
-- Adam