我有一个 Action 类型的 dataTble cotaining 对象,用户可以选择一个动作来修改它,所以我想在修改它之前检索旧动作,所以我尝试使用 onStart 属性来执行它,但我收到了这个错误:
oct. 15, 2012 11:42:12 AM
com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback visit
Grave: javax.el.PropertyNotFoundException: /manageProjectTestsPage.xhtml @342,417
onstart="#{projectTestManagementMB.initOldAction}": Property 'initOldAction' not found
on type tn.talan.testFramework.managedBean.ProjectTestManagementMB
这是代码:
public String initOldAction(){
String index=(String)
FacesContext.getCurrentInstance().getExternalContext().
getRequestParameterMap().get("index");
System.out.println("index "+index);
oldSelectedAction =testActionList.get(Integer.parseInt(index));
return null;
}
xhtml:
<p:column headerText="Options">
<p:commandLink id="modifyManualActionBtn" style="margin-right:5px" onstart="#
{projectTestManagementMB.initOldAction}" actionListener="#
{projectTestManagementMB.verifyTestDisponibilityActionModifying}"
title="modify" update=":form:growl :form:testTabView:confirmModifyActionDialog
:form:testTabView:addModifyActionDlg" disabled="#
{projectTestManagementMB.modifyBtnFlag}">
<h:graphicImage value="../images/cssImg/modify_icon.png" heigth="13"width="17"/>
<f:param name="index" value="#{rowIndex}" />
</p:commandLink>
....
那么如何在执行actionListener之前使用onstart属性来检索旧的动作值actionListener="#
{projectTestManagementMB.verifyTestDisponibilityActionModifying}"
如果我不能使用它,还有其他解决方案吗?