I'm not 100% sure this isn't as designed, but it appears that a preInvokeAction listener in the view metadata is only invoked if a viewParam is present.
The following works:
<f:metadata>
<f:viewParam name="test" value="#{myForm.myValue}"/>
<f:event type="preInvokeAction" listener="#{myController.initializeForm}"/>
</f:metadata>
But this does not:
<f:metadata>
<f:event type="preInvokeAction" listener="#{myController.initializeForm}"/>
</f:metadata>
It may be that the invokeAction phase does not exist if there are no view parameters so it doesn't make sense, but I'm not familiar enough with the lifecycle at this level to know if that's the case or if this is just a miss.
A workaround is to just put in a bogus parameter.
Does anyone know if this is a bug or as expected?