Facelets:

<html xmlns="http://www.w3.org/1999/xhtml";
  xmlns:f="http://java.sun.com/jsf/core"; xmlns:h="http://java.sun.com/jsf/html";
  xmlns:ui="http://java.sun.com/jsf/facelets";
  xmlns:c="http://java.sun.com/jstl/core";
  xmlns:t="http://myfaces.apache.org/tomahawk";
  xmlns:tr="http://myfaces.apache.org/trinidad";>

<h:form>

  <h:messages />

  <tr:switcher facetName="#{pageFlowScope.type}" defaultFacet="text">
     <f:facet name="text">
        <ui:fragment>
           <h:inputText required="true" value="#{pageFlowScope.value}" />
        </ui:fragment>
     </f:facet>
  </tr:switcher>

  <h:inputText required="true" value="#{pageFlowScope.value2}" />

  <h:commandButton value="Foo" />

</h:form>

</html>

If you enter a value in the first box but not the second and submit,
you get a validation error and the first value reverts to whatever it
was before.

JIRA:
https://issues.apache.org/jira/browse/TRINIDAD-43

Reply via email to