How do you set a dashboard parameter from the controller

Hello. and thank you all for the continued support
i have this in my main screen

<dashboard:dashboard id=“mainDashboard” code=“PC” width=“100%”>
<dashboard:parameter name=“paramA” value="" type=“string”/>
<dashboard:parameter name=“paramB” value="" type=“string”/>
</dashboard:dashboard>

How can I set the parameters from the controller?

i tried this

Parameter paramA = new Parameter();
            paramA.setName("paramA");
            paramA.setAlias("paramA");
//i get an error here

paramA.setValue("What is this for?","PARAM VALUE");
            // set param B ...
            List<Parameter> parameters = new ArrayList<>();
            parameters.add(paramA);
            mainDashboard.setXmlParameters(parameters);

thank you !!

Hi @eparamo,

You can pass your parameters in dashboard using refresh method of DashboardFrame with parameters map.

Regards,
Evgeny