h:button

HtmlOutcomeTargetButton is a UIOutput component that renders a styleable HTML <input> element. The default type is button. The component does not need to be a child of h:form since the outcome attribute is designed to navigate via HTTP GET.

Param Usage

URL parameters can be specified via f:param child tags. Setting includeViewParams=true will automatically include all of the f:viewParam tags (view parameters) as URL parameters.

Source Code

  1. <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
  2. xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
  3.  
  4. <!-- Implicit navigation back to /views/component.xhtml -->
  5. <h:button includeViewParams="true" outcome="component" value=" #{i18n['back-to-navigation-with']} foo=1234">
  6. <!-- Override the value of the componentUseCase view parameter in order to navigate to a -->
  7. <!-- different view. -->
  8. <f:param name="componentUseCase" value="navigation" />
  9. <f:param name="foo" value="1234" />
  10. </h:button>
  11.  
  12. </ui:composition>
Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20