|
|

楼主 |
发表于 2010/8/26 16:11:50
|
显示全部楼层
这是我的processFormRequest 代码, 我甚至把查询再两个地方都放了, 还是不行了..
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("Addline") != null)
{
//Get sequence id start
OAViewObject vo1= (OAViewObject)am.findViewObject("CreateSummaryLineVO1");
OADBTransaction transaction = (OADBTransaction)am.getOADBTransaction();
Number ShipLinId = transaction.getSequenceValue("SEAMSA_MSA_SHIP_LINES_S");
vo1.getCurrentRow().setAttribute("ShipLineId",ShipLinId);
//Get sequence id end
//commit data to db
am.invokeMethod("addline");
/* String id = pageContext.getParameter("ShipHeaderId");
Serializable[] parameters = { id };
am.invokeMethod("initQueryDetails", parameters); */
String id = pageContext.getParameter("ShipHeaderId");
if(id != null && !"".equals(id))
{
pageContext.putTransactionTransientValue("ShipHeaderId", id);
}
else
{
id = (String)pageContext.getTransactionTransientValue("ShipHeaderId");
}
Serializable[] parameters = { id };
am.invokeMethod("initQueryDetails", parameters);
}
if (pageContext.getParameter("Clearline") != null)
{
// am.invokeMethod("createheaderline",null);
OAViewObject avo1= (OAViewObject)am.findViewObject("CreateSummaryLineVO1");
/* Row row = avo1.getCurrentRow();
int intAttributeCount = row.getAttributeCount();
for (int i = 0; i < intAttributeCount; i++)
{
row.setAttribute(i, null);
} */
avo1.getCurrentRow().setAttribute("CreditAccountNumber",null);
avo1.getCurrentRow().setAttribute("PartNumber",null);
avo1.getCurrentRow().setAttribute("UnitOfMeasure",null);
avo1.getCurrentRow().setAttribute("CountryOfOrigin",null);
}
if ("delete".equals(pageContext.getParameter("event")))
{
String lineNumber = pageContext.getParameter("lineNum");
Serializable[] parameters = {lineNumber};;
am.invokeMethod("DeleteLineId",parameters);
}
if (pageContext.getParameter("DeleteMulti")!=null)
{
am.invokeMethod("deleteLine");
}
}
} |
|