I'm building a form that let the user enter database connection parameters. Once the parameters are typed
the user can test (btnTester) if connection can be established with its parameters.
In all cases, a message is produced for the user. Here the example of a failed connection attempt from backing bean code :
Code: Select all
(...)
addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Connection failed.", t.getLocalizedMessage()));
(...)
No message (connection successful or not) is displayed after the button :\
Even with the global attribute set to false or true.
Code: Select all
<h:form>
(...)
<h:panelGrid>
<!-- Other form components here -->
<f:facet name="footer">
<p:commandButton
id="btnTester"
value="Tester"
actionListener="#{assistantCreationSourcesBean.testerConnexionBase}" global="false" />
<p:message for="btnTester" />
</f:facet>
</h:panelGrid>
</h:form>