h:commandLink
fires a POST request, so no, it's not possible. Just use h:link
.
If the sole reason of using h:commandLink
is that you'd like to fire a bean action method, then just move that to the bean constructor or @PostConstruct
of a request scoped bean which is attachted to the view which is opened by h:link
. You can access f:param
values by @ManagedProperty
.
public BeanOfTargetPage {
@ManagedProperty(value="#{param.foo}")
private String foo;
@PostConstruct
public void init() {
// Parameter 'foo' is available here.
}
// ...
}