I am fairly new to JSF and am currently a frontend developer for a new project. I do not have access to the backend code and need to create a solution with the data I have access to on the page.
Currently I have a menu and there are security controllers on HTML elements to control visibility.
Example: style="#{security.ConfigMenu?'visibility:visible':'visibility:hidden;width:0px;height:0px;padding-bottom: 0px;'}"
This page is hardcoded and need to make it more dynamic.
I need to evaluate this expression but use an array of beans stored as strings
var security = ["security.ConfigMenu", "security.AdminMenu", "security.Dashboardmenu"];
Need to handle #{mappSec.insightsConfigMenu'} with #{security[0]}
Is this possible?
I tried to replace the bean call with a string using the bean name
#{bean.method}
with
var bean = "bean.method"; #{bean}