我有以下JSF页面,它在第一次加载时使用正确的CSS样式(一些通过JQuery应用,一些通过CSS类应用)但是在我单击“提交”按钮后,CSS样式不会被应用,也不会调用JQuery 。以下是我的代码
<link rel="stylesheet" href="../css/uniform.default.css" media="screen" />
<link type="text/css" href="../css/jquery-ui-1.8.11.custom.css" rel="stylesheet" />
<link rel="stylesheet" href="../css/jquery-ui.css"/>
<link rel="stylesheet" href="../css/style.css"/>
<script src="../js/jquery-1.11.3.js"></script>
<script src="../js/jquery-ui.js"></script>
<script src="../js/jquery.uniform.js"></script>
<style type="text/css">
div{
margin-bottom: 9px;
}
.login{width:600px;}
table.people th {
background-color: #2237CA;
color: white;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
var max = 0;
$("label").each(function(){
if ($(this).width() > max)
max = $(this).width();
});
$("label").width(max);
$('label').css('display', 'inline-block');
}
});
</script>
</h:head>
<h:body>
<section class="container">
<div class="login">
<div id="container">
<h:form id="searchForm" e>
<div>
<h:panelGroup >
<div><label for="a">Experience (in years)* From: </label>
<h:inputText styleClass="resize" value="#{dataEntryBean.from}" style="width:30px;" id="a"> <f:convertNumber pattern="#,###,##0.0"/>
</h:inputText>
To <h:inputText styleClass="resize" value="#{dataEntryBean.to}" style="width:30px;" id="b"> <f:convertNumber pattern="#,###,##0.0"/>
</h:inputText></div>
<h:dataTable value="#{dataEntryBean.temp}" var="result" width="100%;" rendered="#{fn:length(dataEntryBean.temp)>0}"
styleClass="people"
cellspacing="0"
cellpadding="0"
border="0"
rowClasses="odd,even" columnClasses="name,phoneNumber,dateOfBirth,name">
<h:column>
<f:facet name="header">CV Link</f:facet>
#{result.fileLoc}
</h:column>
</h:dataTable>
<h:commandButton value="Search"
action="#{dataEntryBean.getResults}"></h:commandButton>
</h:form>
</div>
</div>
</section>
</h:body>
我应该在commandButton中添加任何东西,以便重新应用CSS样式吗?