ADF UI: Creating Autosuggest LOV Dinamic

I was curious to know if ADF supports autosuggest LOVs just like google search.. getting suggestions as you type in. Now, I found ADF has a nice way to achieve auto-suggest LOVs. 

1. Example UseCase: 

Let us take simple example based on scott schema. Lets say we're creating a new employee record and we need to enter departement name while creating the employee record. Let's make DeptName as LOV and implement auto-suggest behavior for the DeptName. i.e., getting the auto-suggested list of values as you type in the department name in the LOV.

2. Implementation Steps:

i. Create two entities on Emp and Dept tables (Lets say they are EmpEO and DeptEO).

ii. Create association between these EmpEO and DeptEO on DeptId.

iii. Create a VO (say EmpDeptVO) joining these two EOs. Make EmpEO as base entity and DeptEO as referenced entity.

iv. Create view accessor in EmpDeptVO on DeptVO and create LOV(Combobox with List of Values) on Dname (which is in referenced entity i.e., DeptEO) attribute in EmpDeptVO.



v. Drop this attribute as an List of Values -> ADF LOV Choice List into the jsf page. And, set autoSubmit="true" for the LOV as we need to fetch results from DB for each key-stroke.


vi. Now, select the LOV, right click -> 'Inser inside' -> select 'Auto Suggest Behavior' and give value for SuggestedItems as "#{bindings.Dname.suggestedItems}".

The LOV code will be as below:


vii. Now, run the jsf page and you can find the auto-suggest list as you type in the LOV.


Últimas Noticias

Nuevo proyecto realizado por Infoacp, una web en prestashop : En wiwi-pc...
Por ha llegado ¡ Ya tenemos disponible para descarga ODoo 8 Stable Como siempre.. podeis...
Una opción cada vez mas demandada es el poder enviar mensajes mediante whatsapp a clientes....
More inNoticias  

Documentos Recientes