Dependent pick list when we run page with having null values in the dependent list then we go for this code
Write in the AMIMPL class with another procedure
public void XXHndleLinesPrequest()
{
polinesVOImpl vos=getpolinesVO();
vos.setWhereClause("po_header_id=-999");
vos.executeQuery();
}
Go to Controller and write call the procedure in the process request
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
dependentpickAMImpl obj=(dependentpickAMImpl) pageContext.getApplicationModule(webBean);
obj.XXHndleLinesPrequest();
}
Process form request
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
dependentpickAMImpl obj=(dependentpickAMImpl) pageContext.getApplicationModule(webBean);
if("POLineidevent".equals(pageContext.getParameter(EVENT_PARAM)))
{
System.out.println("SAmple");
String pohid=pageContext.getParameter("poheader");
System.out.println("poheaderid"+pohid);
obj.XXHndleLines(pohid);
}
------------------------------------------------------------------------------------------------------------
Supplier Creation Page
Creation of work space
CREATION OF BC4J COMPONENT
Creation of AM
Save it
Creation of page
Save it and run the page
Creation of Region
Creation of new EO
We create separate BC4J object for this
To rename the EO rclick on the EO select Rename option
Creation of VO
Attach vo to am
Go to page
Create 6 items
Select item and set properties
Another item
Save it and run it
Run now
Creation of controller
Got to the AMIMPL and write the following code
import oracle.jbo.Row;
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.jbo.domain.Number;
import oracle.apps.fnd.framework.OAException;
public SupplierVOImpl getSupplierVO()
{
return (SupplierVOImpl)findViewObject("SupplierVO");
}
This one we get when we attach the VO to AM
Cretion of another procedure
public void XXSupplierCrea()
{
SupplierVOImpl vos= getSupplierVO();
if(!vos.isPreparedForExecution())
{
vos.setMaxFetchSize(0);
}
Row r =vos.createRow();
vos.insertRow(r);
r.setNewRowState(Row.STATUS_INITIALIZED);
OADBTransaction tr=getOADBTransaction();
Number sid= tr.getSequenceValue("FWK_TBX_SUPPLIERS_S");
vos.getCurrentRow().setAttribute("SupplierId",sid);
}
public void XXSave()
{
OADBTransaction tr=getOADBTransaction();
tr.commit();
throw new OAException("record save successfully",OAException.CONFIRMATION);
}
Go to controller and write the following
import supplierCre.oracle.apps.po.suppmgmt.server.supplerCreaAMImpl;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
supplerCreaAMImpl am=(supplerCreaAMImpl)pageContext.getApplicationModule(webBean);
am.XXSupplierCrea();
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
supplerCreaAMImpl am=(supplerCreaAMImpl)pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("Save")!=null)
{
am.XXSave();
}
}
Save it and run the page]
Write in the AMIMPL class with another procedure
public void XXHndleLinesPrequest()
{
polinesVOImpl vos=getpolinesVO();
vos.setWhereClause("po_header_id=-999");
vos.executeQuery();
}
Go to Controller and write call the procedure in the process request
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
dependentpickAMImpl obj=(dependentpickAMImpl) pageContext.getApplicationModule(webBean);
obj.XXHndleLinesPrequest();
}
Process form request
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
dependentpickAMImpl obj=(dependentpickAMImpl) pageContext.getApplicationModule(webBean);
if("POLineidevent".equals(pageContext.getParameter(EVENT_PARAM)))
{
System.out.println("SAmple");
String pohid=pageContext.getParameter("poheader");
System.out.println("poheaderid"+pohid);
obj.XXHndleLines(pohid);
}
------------------------------------------------------------------------------------------------------------
Supplier Creation Page
Creation of work space
CREATION OF BC4J COMPONENT
Creation of AM
Save it
Creation of page
Save it and run the page
Creation of Region
Creation of new EO
We create separate BC4J object for this
To rename the EO rclick on the EO select Rename option
Creation of VO
Attach vo to am
Go to page
Create 6 items
Select item and set properties
Another item
Save it and run it
Run now
Creation of controller
Got to the AMIMPL and write the following code
import oracle.jbo.Row;
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.jbo.domain.Number;
import oracle.apps.fnd.framework.OAException;
public SupplierVOImpl getSupplierVO()
{
return (SupplierVOImpl)findViewObject("SupplierVO");
}
This one we get when we attach the VO to AM
Cretion of another procedure
public void XXSupplierCrea()
{
SupplierVOImpl vos= getSupplierVO();
if(!vos.isPreparedForExecution())
{
vos.setMaxFetchSize(0);
}
Row r =vos.createRow();
vos.insertRow(r);
r.setNewRowState(Row.STATUS_INITIALIZED);
OADBTransaction tr=getOADBTransaction();
Number sid= tr.getSequenceValue("FWK_TBX_SUPPLIERS_S");
vos.getCurrentRow().setAttribute("SupplierId",sid);
}
public void XXSave()
{
OADBTransaction tr=getOADBTransaction();
tr.commit();
throw new OAException("record save successfully",OAException.CONFIRMATION);
}
Go to controller and write the following
import supplierCre.oracle.apps.po.suppmgmt.server.supplerCreaAMImpl;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
supplerCreaAMImpl am=(supplerCreaAMImpl)pageContext.getApplicationModule(webBean);
am.XXSupplierCrea();
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
supplerCreaAMImpl am=(supplerCreaAMImpl)pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("Save")!=null)
{
am.XXSave();
}
}
Save it and run the page]
No comments:
Post a Comment