# Accessing parameters of nested parameterized objects when displaying in panel

**URL:** <https://discourse.holoviz.org/t/accessing-parameters-of-nested-parameterized-objects-when-displaying-in-panel/5338>\
**Category:** Panel\
**Tags:** classselector, param, selector, panel\
**Created:** [May 11, 2023, 6:20pm UTC](https://discourse.holoviz.org/t/accessing-parameters-of-nested-parameterized-objects-when-displaying-in-panel/5338 "2023-05-11T18:20:27Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![JonathanMair](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/jonathanmair/32/4881_2.png) [@JonathanMair](https://discourse.holoviz.org/u/JonathanMair)\
**Post date:** [May 26, 2023, 6:43pm UTC](https://discourse.holoviz.org/t/accessing-parameters-of-nested-parameterized-objects-when-displaying-in-panel/5338/13 "2023-05-26T18:43:45Z")

</div>

Hi - though the above solutions worked in the specific case I was stuck with, I’m still struggling with this general area of passing references through panel.bind. Rather than posting more specific cases, I’m trying to understand the principle and going over the documentation and other posts here. I think I have found my sticking point (or one of them!) now…

I think I’m beginning to understand because of another of your answers, @jbednar ([Get the Values of a Rangeslider - #4 by jbednar](https://discourse.holoviz.org/t/get-the-values-of-a-rangeslider/1186/4)). There you mention that the function part of the pn.bind() wrapper treats a parameter object passed as an argument as an alias for the param _value_.

To apply this to the solution you provided above:

```auto
pn.Row(
    outer, 
    pn.bind(lambda x: x.param, outer.param.instance_of_inner)
)

```

…the `outer.param.instance_of_inner` that is passed into the lambda function is the live parameter object that holds the parameter value (an instance of class Inner). That’s important because if the parameter value is passed instead, that’s just the value at the time the bind() function is called, it won’t be live.

However, inside the function that is the first argument of the bind() call, i.e. in this case the lambda function, the param object that was passed is turned silently into a value. In this case the value of the parameter instance\_of\_inner is a Parameterized class, the lambda function is able to use .param on it to access the parameters of the instance of class Inner.

If this is right then I am finally beginning to understand this behaviour 😅. It makes PERFECT sense because what needs to be watched is the object and what needs to be put into action by the function is the value. However, I am finding it highly counter-intuitive…I guess I’ll get used to it, but I don’t think this is explicitly addressed in the documentation.

---

_[View the full topic](https://discourse.holoviz.org/t/accessing-parameters-of-nested-parameterized-objects-when-displaying-in-panel/5338)._
