I have the following construct at several places in my webapp in order to conditionally render page fragments depending on some actions:
Use conditional expression as ui:include src: