我已经实施了Spring Security + Prime Faces,如果我的输入(用户和密码)是输入类型,一切都可以作为例外。
尝试使用“PrimeFaces主题”改进UI我已经替换 p:inputText 标记的输入标记,但Spring Security停止工作,我调试了我的应用程序我发现我的后端变得空白了。
有人知道我是否可以在Spring Security中使用 p:inputText 而不是输入标签?
作为替代方案,我曾考虑过使用bootstrap和CSS实现Login UI。
谢谢,非常感谢您的帮助
有效
<p:panel id="loginPanel" header="Login" style="width: 30%">
<h:form id="loginForm" action="${request.contextPath}/login" method="POST">
<div align="center" >
<p:panelGrid styleClass="noBorders" columns="2">
<p:outputLabel value="Email:" />
<input type="text" id="email" name="email" />
<p:outputLabel value="Password:" />
<input type="password" id="password" name="password" />
</p:panelGrid>
<br/>
<p:panelGrid border="0" columns="1" styleClass="noBorders">
<p:commandButton onclick="document.getElementById('loginForm').submit()" value="Login"/>
</p:panelGrid>
<c:if test="${param.error}">
<h:outputText style="font-size: 15; color: #FF1C19;" value="#{language.getMessage('login.error')}" />
</c:if>
</div>
</h:form>
</p:panel>
不起作用
<p:panel id="loginPanel" header="Login" style="width: 30%">
<h:form id="loginForm" action="${request.contextPath}/login" method="POST">
<div align="center" >
<p:panelGrid styleClass="noBorders" columns="2">
<p:outputLabel value="Email:" />
<p:inputText type="text" id="email" name="email" />
<p:outputLabel value="Password:" />
<p:inputText type="password" id="password" name="password" />
</p:panelGrid>
<br/>
<p:panelGrid border="0" columns="1" styleClass="noBorders">
<p:commandButton onclick="document.getElementById('loginForm').submit()" value="Login"/>
</p:panelGrid>
<c:if test="${param.error}">
<h:outputText style="font-size: 15; color: #FF1C19;" value="#{language.getMessage('login.error')}" />
</c:if>
</div>
</h:form>
</p:panel>