Sei sulla pagina 1di 19

How to create Dependent LOV

Here attached work space

extract this zip folder

step1:Create page and AM in lov.server as shown below

step2:Create VO in lov.server

select organization_id, name oragnization_name, business_group_id from


hr_operating_units
next-->next-->....finish

step3: The above VO Attach to AM


step4: AM attached to Page

step5: create one headerRN under this headerRN create one item messagelovinput
step6:click region1 select new-->table using wizard

select appropriate AM
next
next->....finish

step7: attach LOV to our Region , add LOV Region Item , Retrun Item, Crieria item
select orgidlov set search allowed property True

same for organization name


Now Run the pg

if we want to show one attribute in this page

create one item style as messagestyletext


take new lov

attach to our business group id


now run the page

Create one CO

write the code in PFR


public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)

super.processFormRequest(pageContext, webBean);

if (pageContext.isLovEvent())

String lovsourceidstr = pageContext.getLovInputSourceId();

if (lovsourceidstr !=null && "Orgidlov".equals(lovsourceidstr))

OAMessageLovInputBean orgidlovbean
=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("Orgidlov");

String orgnamestr = (String)orgidlovbean.getValue(pageContext);

throw new OAException ("Select Org Name "+orgnamestr, OAException.INFORMATION);

}
we donot want to show Organization id in the page but still we want to retrive the organization id,

if we set property render false it doesnot retrive the organization id,

So we have to use item style as form value

create one item style as form value

this formvalue attached to lovmap

add Lov region item and return item and cirteria item
Now Dependent Lov

create one VO
This VO attach to AM
map to lov
search allowed property true

same for segment1 also.

write the code in AM


This method call in CO both PFR AND PR

PROCESS REQUEST:

PROCESS FORM REQUEST:


RUN THE PAGE

Potrebbero piacerti anche