0

I am trying to show another form if the result that returns from the first form is 'Correct'. However, so far nothing shows.

This is my code

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://xmlns.jcp.org/jsf/html"
  xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
    <title>Results Page</title>
</h:head>
<h:body>
    <h:outputText value="#{jsfbean.message}"/>
    <h:form>
        <p>Answer the question to change your password</p>
        <h:outputText value="#{jsfbean.secqn}"/>

        <h:inputText id="question" value="#{jsfbean.inpans}"/>
        <h:commandButton value="Submit">
            <f:ajax execute="question" render="output" />
        </h:commandButton>
    </h:form>
    <h:outputText id="output" value="#{jsfbean.inpans}" />
    <h:form rendered="#{jsfbean.inpans eq 'Correct'}">
        <h:inputText id="reset" value="#{jsfbean.inpans}"/>
    </h:form>


</h:body>

JianYA
  • 2,750
  • 8
  • 60
  • 136

0 Answers0