loginRegisterTemplate.xhtml이라는 페이스 렛 템플릿을 만들었습니다. 내가 템플릿 클라이언트에서 그것을 사용할 때, 그 안에 배치하면 관리 빈의 메소드가 호출되지 않습니다. 템플릿이 없으면 버튼이 잘 작동합니다. 왜 이런 일이 일어나는 걸까요?<h : commandButton> 내부에서 작동하지 않습니다 <ui:define>
옆의 간단한<h:button>
<ui:composition template="resources/css/faceletsTemplates/loginRegisterTemplate.xhtml">
<ui:define name="top">
Login Page
</ui:define>
<ui:define name="content">
<div align="center">
<h:panelGrid columns="3" columnClasses="rightalign,leftalign,leftalign">
<h:outputLabel value="Username:" for="userName"/>
<h:inputText id="userName" label="Username" required="true" value="#{loginBean.userName}" />
<h:message for="userName" />
<h:outputLabel value="Password:" for="password"/>
<h:inputText id="password" label="Password" required="true" value="#{loginBean.password}" />
<h:message for="password" />
</h:panelGrid><br/>
<h:button value="Back to Home" outcome="home"/>
<h:commandButton id="login" value="Login" action="#{loginBean.doLogin}"/>
</div>
</ui:define>
</ui:composition>
</h:body>
, 다른 측면에서, 정상적으로 작동된다. 여기 보았다
<h:body>
<div id="top">
<ui:insert name="top">Top</ui:insert>
</div>
<div id="content" class="center_content">
<ui:insert name="content">Content</ui:insert>
</div>
</h:body>
: 여기
내 템플릿 파일의 몸 h:commandLink/h:commandButton is not being invoked 그러나 나는 그 원인이되는 문제를 찾을 수 없습니다.감사합니다.
감사합니다. 나는 그것을 어떻게 놓쳤는 지 정말로 모른다. 그리고 나는 더 복잡한 해결책을 찾는데 몰두했다. – BrainArchitect