Tuesday, 9 August 2016

TO GET THE VALUE OF ROW SELECTED FROM ONE VIEW TO OTHER VIEW TABLE AUTOMATICALLY IN ADF



TO GET THE VALUE OF ROW  SELECTED FROM ONE VIEW  TO OTHER VIEW TABLE AUTOMATICALLY IN ADF

The Solution is tested on ADF 11.1.2.4.0 version.

Sometimes it's very difficult to manage Select one choice LOV(List of values) or Input text Search LOV for a field in the table.

Scenario : If one wants to select  a field which has more than 150 characters and the list is more than 500 rows then in Select One Choice component he has to scroll down for the record which he want to select. This irritates the user who has to select the value. Hence here I have way where  user can filter the record which he desired and can get selected value in the field.

Below is the alternative way to manage this field selection.Suppose we have a View with input parameters.
Follow the below screenshots for the same.
Desired Output:


The below screenshot show the Item Code selection and Item Code Details.




Here when we select 'GET ITEM CODE' a popup window opens where we can select the desired value and get it in 'ITEM CODE DETAILS' column.
To get the selected Item from popup to the table column "Selected Item Details".



Execution : Before following the below steps please make sure that you have a table with which has columns Item Selection and Item Code Details :
Here Item Code details has a field Item id, where Item id is mapped with LOV having id, Item code and Description.
Item selection column has link where the Item Details view is mapped.
Link has show popup behavior on which the popup is called where Item details View is dropped as table on it.
Step 1  : View (Item Details) with Input parameters.


Step 2 : Drop the view as Read only  TABLE on popup.


Step 3: Add View Accessor of (Item Details) view to the view on which the data is to be copied.



Step 4: Add the following code in backing bean of jsf page.





Step 5 : Add CustomListener method into table property named selection listener.

Step 6 : Now Run the project.


After this you will get the desired output on the page.
 

No comments:

Post a Comment

Fill free to add your comments