Is there a way to pass a parameter from an outer component to a deeply
nested inner component without having to explicitly pass the parameter
to all intervening components? Basically, we have a parameter, 'node',
whose value is calculated at the page level when handling the 'activate'
event from the activation parameters. Suppose we have components 'A',
'B', 'C', 'D', where the page references 'A', 'A' references 'B', 'B'
references 'C', and 'C' references 'D'. Component 'D' needs the value of
'node', but 'A', 'B', and 'C' don't, so we would like to avoid having to
declare the 'node' parameter in those intervening components and passing
the value in explicitly. I can't seem to find a way to do this. I have
considered

1) Creating a service for calculating the code, but the calculation
requires page parameters, and I can't think of a way to access to these
from a service builder method (outside of nasty hacks like setting the
value in a thread local variable).

2) Creating a new parameter binding factory that traverses up component
containers until it finds one that has the named binding. However,
'ComponentResources' can get a binding type and see if a parameter is
bound, but it does not provide access to the parameter binding itself.
'InternalComponentResources' provides read and write access to the
parameter, but we aren't supposed to use internal services.

Am I missing something?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to