Your question is a bit confusing. You are using both <f:viewParam> and @ManagedProperty . Usually you use one or another option .
With @ManagedProperty it's pretty simple. You need #{paramValues.b} instead of #{param.b} . This is done under covers just like HttpServletRequest#getParameterValues() , which returns a String[] with all parameter values ββfor a given name.
@ManagedProperty("#{paramValues.b}") private String[] b;
With <f:viewParam> I don't see any ways. I got the impression that this is simply not supported. But I also get the impression that you don't need it at all.
Update : coincidentally. I met the following comment in the decode() method decode() in the UIViewParameter source (Mojarra 2.1.1, line 218 onwards), and I thought about this question again:
// QUESTION can we move forward and support an array? no different than UISelectMany; perhaps need to know // if the value expression is single or multi-valued // ANSWER: I'd rather not right now. String paramValue = context.getExternalContext().getRequestParameterMap().get(getName());
So, it is "by design" just not supported on <f:viewParam> .
source share