我在提交值时遇到问题。在将所有值保存在基础之后,在尝试创建新项目时,所有值都保留在其位置上。我需要添加什么?如果确实如此,我不想创建重置按钮。
的
的<h:body>
<f:view>
<div align="center">
<h3>Новый проект</h3>
</div>
<table width="100%" height="100%" >
<h:form id="form">
<p:growl id="growl" class="ui-growl" showDetail="false" sticky="false" life="10000"/>
<tr>
<td>
<h:panelGrid columns="2" styleClass="h_pgrid-style">
<h:outputLabel for="title" value="Название: " styleClass="el-style"/>
<p:inputTextarea id="title" style="height:22px; width:400px; overflow-y:scroll ;"
required="true" styleClass="ell-style" value="#{projectBean.prTitle}">
<p:ajax event="change" process="title" partialSubmit="true" />
</p:inputTextarea>
<h:outputLabel for="description" value="Описание: " styleClass="el-style"/>
<p:inputTextarea id="description" style="height:180px; width:400px; overflow-y:scroll ;"
styleClass="ell-style" required="true" value="#{projectBean.prDesctiption}">
<p:ajax event="change" process="description" partialSubmit="true" />
</p:inputTextarea>
</h:panelGrid></td>
<td>
<h:panelGrid columns="2" styleClass="hp_pgrid-style">
<h:outputLabel for="period" value="Срок выполнения: " style="width:12px" styleClass="el-style"/>
<p:calendar id="period" size="15" required="true" value="#{projectBean.prDate}" >
<p:ajax event="dateSelect" process="period" partialSubmit="true" />
</p:calendar>
<h:outputLabel for="sum" value="Бюджет (руб.): " styleClass="el-style"/>
<p:inputText id="sum" size="15" required="true" value="#{projectBean.prBudget}">
<p:ajax event="change" process="sum" partialSubmit="true" />
</p:inputText>
<h:outputLabel for="moderator" value="Модератор: " styleClass="el-style"/>
<h:panelGroup style="display:block; text-align:left">
<p:selectOneMenu id="moderator" value="#{projectBean.prMod}" style="width:175px"
styleClass="el-style">
<p:ajax event="change" process="moderator" partialSubmit="true" />
<f:selectItem itemLabel="-- Выберите ФИО -- " noSelectionOption="true"/>
<f:selectItems value="#{moderatorBean.moderatorsList}" var="selectedModerator" itemValue="#{selectedModerator.id}"
itemLabel="#{selectedModerator.modFamily} #{selectedModerator.modFirstName} #{selectedModerator.modSecName}"/>
</p:selectOneMenu>
</h:panelGroup>
<h:outputLabel for="status" value="Статус: " styleClass="el-style"/>
<h:panelGroup style="display:block; text-align:left">
<p:selectOneMenu id="status" required="true" value="#{projectBean.prStatus}"
label="Статус" style="width:175px" immediate="true">
<p:ajax event="change" process="status" partialSubmit="true" />
<f:selectItem itemLabel=" " itemValue="#{null}" />
<f:selectItem itemLabel="невидим" itemValue="невидим" />
<f:selectItem itemLabel="опубликован" itemValue="опубликован" />
</p:selectOneMenu>
</h:panelGroup>
<f:facet name="footer">
<h:panelGroup style="display:block; text-align:center">
<p:commandButton id="submit" type="submit" value="Создать" styleClass="elp-style"
process="@this" action="#{projectBean.CreateNewProjectSubmit(clientBean.clientId)}"
update="growl" />
</h:panelGroup>
</f:facet>
</h:panelGrid>
</td>
</tr>
</h:form>
</table>
</f:view>
</h:body>
的