I\'ve read how to send parameters using JSF but what if the user types their companyId
in the URL when accessing their login page? For example,
Yes, you can use the
You can if necessary invoke a bean action using
(JSF 2.2+ only) or
.
When using
you can even return a navigation outcome.
public String onload() {
// ...
return "somepage";
}
When not on JSF 2.2 yet, you can use ExternalContext#redirect() for that. See also among others How to perform navigation in preRenderView listener method.
Note that this is not specific to PrimeFaces. It's just part of standard JSF. PrimeFaces is merely a component library which provides enhanced ajax and skinnability support.