我试图在一个内部显示一些元素<h:panelGroup layout="block">.元素正在屏幕上显示,但HTML <div>根本没有呈现.
这是我的JSF代码:
<h:form id="editProfile">
<div class="password-container">
<h:outputText class="edit-header" value="Change Password →"></h:outputText>
<br />
<br />
<!-- this div is not being displayed,
THE ELEMENTS INSIDE THE PANELGROUP ARE BEING DISPLAYED -->
<h:panelGroup layout="block">
<h:inputText a:placeholder="Present Password" id="password"
value="#{editProfile.password}"
class="cff-inputText"></h:inputText>
<br />
<h:inputText a:placeholder="New Password" id="change-password"
class="cff-inputText"></h:inputText>
<br />
<button id="cancel-password" class="cff-button">Cancel</button>
<button id="ok-password" class="cff-button">OK</button>
</h:panelGroup>
</div>
</h:form>
Run Code Online (Sandbox Code Playgroud)
这是生成的HTML输出:
//This is not the panelGroup div
<div class="password-container"><span class="edit-header">Change Password ?</span>
<br /><br />
//These are the …Run Code Online (Sandbox Code Playgroud)