在同一个页面定义了对一个对象进行增改查,想对其进行复用!即当我点击增加时,所有框清空,输入数据就可以增加;点击查看,再点击修改就可以进行修改!!在同一个页面上怎样对他进行复用啊??
<f:subview id="update" rendered="#{payforBean.viewRendered}">
<h:form id="look">
<h:inputHidden id="payforId"
value="#{payforBean.information.fuid}"></h:inputHidden>
<table>
<tr>
<td style="width: 450px;">
<span>配单号:</span>
<h:inputText value="#{payforBean.information.fnumber}">
</h:inputText>
</td>
<td>
<span>险种:</span>
<h:selectOneRadio value="#{payforBean.information.ftype}">
<f:selectItem itemLabel="货运险" itemValue="Goods" />
<f:selectItem itemLabel="承运人责任险" itemValue="Carrier" />
</h:selectOneRadio>
</td>
</tr>
<tr>
<td>
<span>保单号:</span>
<h:inputText
value="#{payforBean.information.finsuranceNumber}"></h:inputText>
</td>
<td>
<span>保单所属机构:</span>
<h:selectOneMenu id="somOrganization"
value="#{payforBean.information.organization.fuid}">
<f:selectItems value="#{organizationBean.options}" />
</h:selectOneMenu>
</td> </tr>
<tr>
<td>
<span>事故发生时间:</span>
<h:inputText value="#{payforBean.information.faccidentDate}"
onclick="new Calendar().show(this);">
<f:convertDateTime pattern="yyyy-MM-dd" />
</h:inputText>
</td>
<td>
<span>报损金额:</span>
<h:inputText value="#{payforBean.information.faskedSum}">
</h:inputText>
</td>
</tr>

<tr>
<td colspan="2" align="center">
<h:commandButton value="修改"
actionListener="#{payforBean.updateAction}">
</h:commandButton>
<h:commandButton value="关闭"></h:commandButton>
</td>
</tr>
</table>
</h:form>
</f:subview>
这就是我想对其增改查的代码!!