Vous êtes sur la page 1sur 31

Flex Field

Create workspace and Project


File name as FlexFieldCreation.jws
Click on Next

Name as FlexFieldCreation.jpr
Default Package as XXsontata.oracle.apps.po.flexfieldcreation.webui
Click on Next, Next and Finish Button.

Create one Business Component Packages


XXsontata.oracle.apps.po.flexfieldcreation.server
Click on Next, Next and Finish Button.

Create Application Module

XXsontata.oracle.apps.po.flexfieldcreation.serverRight Click select the Application


Module
Name as XXFlexFieldCreationAM
Click on Next, Next and Finish Button.

Create a Page

FlexFieldCreation.jpr Right Click and Select New


Press OK Button.
Name as FlexFieldSearchPG
Package as XXsontata.oracle.apps.po.flexfieldcreation.webui
And press Ok Button.

Id as RootRN
Select the AM Definition
Press Ok Button
Enter the window name as Flex Field Search Page Creation..!
Title as Flex Field Search Page Creation..!
And run the page

Create one more BC4J Package Structure


FlexFieldCreation.jpr Select Business Component Package Structure
Package as XXsontata.oracle.apps.po.flexfieldcreation.schema.server
Click on Next, Next and Finish buttons

Create one Entity Object

XXsontata.oracle.apps.po.flexfieldcreation.schema.server Right Click select the New


Entity Object

SELECTITEM_ID,ITEM_DESCRIPTION,START_DATE_ACTIVE,END_DATE_ACTIVE
FROMFWK_TBX_ITEMS
Check the synonyms
Schema Object as FWK_TBX_ITEMS
Name as FwkTbxItemsEO
Click on Next, Next
Check all the Methods
Click on Next, Next and Finish Button.
Create EO based VO
XXsontata.oracle.apps.po.flexfieldcreation.serverRight Click
Name as XXFlexFieldSearchVO
Click on Next and select the EO
Click on Next
Select the items as (itemid, itemddesc, startdate, endate)

Click on Next, Next and Finish Button.


Now we can Attach VO to AM
Double click on
And apply and ok Button.
Go to RootRN Select New Region
And Style as Query
QueryRN go to property and Construction Mode as resultBasedSearch

In that QueryRN Right Click New Region using wizard


Click on Next and select the VO
Click on Next and select the Region Style as table and select all the items

Click on Next and Finish Button.


Go to Itemid Property and search allowed as true
And go to items and Styles as Message Styled Text
And go to SearchPG.xml go to itemid property go to destination URL

OA.jsp?
page=/XXsontata/oracle/apps/po/flexfieldcreation/webui/ItemDetailsPG&retainAM=Y&
addBreadCrumb=Y&iitemnumber={@ItemId}
ItemId this is the itemid
Iitemnumber user variable
Create one more page
And name as item Details PG and select the AM Definition and window title and title and
run the page

Create one more View Object


Name as XXFlexFieldDetailsVO
Click on Next and select the EO
And select all the items
Click on Next, Next and Finish Button
Now we can attach VO to AM
Go to DetailsPG.xml and go to Structure window and go to DetailsRNRight Click and
create one more Region and style as Message Component Layout.
Id as ItemDetailsRN in that region we can take 4 items (Message Text Input)
Item1 id and prompt as ItemId
Item2 id and prompt as Item Desc and Max length as 240
Item3 id and prompt as Start Date
Item4 id and prompt as End Date

And set the View instance and view Attribute for all the items
Create one controller in the Item DetailsPG.xml
Name as ItemDetailsCO
Package as XXsontata.oracle.apps.po.flexfieldcreation.webui
And press ok button.

Go to process Request in the ItemDetailsCO.java

public void processRequest (OAPageContext pageContext, OAWebBean webBean)


{
super.processRequest(pageContext, webBean);
------Start
XXFlexFieldCreationAMImpl
am=(XXFlexFieldCreationAMImpl)pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("iitemnumber")!=null)
{
String itemnum=pageContext.getParameter("iitemnumber").toString();
System.out.println("Print Item number"+itemnum);
String whereclause="ITEM_ID='"+itemnum+"'";
am.getXXFlexFieldDetailsVO1().setWhereClause(whereclause);
am.getXXFlexFieldDetailsVO1().executeQuery();
}
------End
}

This code will capture the Data

Go to DetailsPG.xml go to Structure window go to itemDetailsRNRight Click

New Select the Message Layout in that Message Layout create one Layout
Id and Prompt as KFF
Item Style as flex
View instance as XXFlexFieldDetailsVO1
Flex Field
Application Short Name as AK
Name as FWK
Type as key

Create one more Message Layout

And create one item


Id and prompt as DFF
Item style as flex
And select the View instance as
View Instance as XXFlexFieldDetailsVO1
Application short name as AK
Name as FWK_ITEM_DFF
Type as descriptive
And write the code in the ProcessReques in the ItemDetailsCO.java

public void processRequest(OAPageContext pageContext, OAWebBean webBean)


{
super.processRequest(pageContext, webBean);
XXFlexFieldCreationAMImpl
am=(XXFlexFieldCreationAMImpl)pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("iitemnumber")!=null)
{
String itemnum=pageContext.getParameter("iitemnumber").toString();
System.out.println("Print Item number"+itemnum);
String whereclause="ITEM_ID='"+itemnum+"'";
am.getXXFlexFieldDetailsVO1().setWhereClause(whereclause);
am.getXXFlexFieldDetailsVO1().executeQuery();
}
-----Start
OAKeyFlexBean kff=(OAKeyFlexBean)webBean.findChildRecursive ("KFF");
kff.setStructureCode("FWK Item Flexfield");
kff.setCCIDAttributeName("FwkitemId");
kff.mergeSegmentsWithParent(pageContext);
OAViewObject vo= (OAViewObject) am.findViewObject ("XXFlexFieldDetailsVO1");
if(!vo.isPreparedForExecution())
{
vo.executeQuery();
}
------End
}

And Run the Page

Click on Go Button
OA.jsp?page=/XXsontata/oracle/apps/po/flexfieldcreation/webui/ItemDetailsPG
&retainAM=Y&addBreadCrumb=Y&iitemnumber={@ItemId}

OA.jsp?page=/XXBiralsoft/oracle/apps/po/flex/webui/ItemDetailsPG
&retainAM=Y&addBreadCrumb=Y&iitemnumber={@ItemId}

Vous aimerez peut-être aussi