Blog: How to insert data using LOV, Date and InputText from single column


--My requirement is to insert data using LOV, Date and InputText from single column
--I am using two tables header and line & in line table one column have multiple LOVs that I achieve from Ashish awasthi’s blog
--This is how I done
1) create transient attribute













2) Apply LOVs on attribute and give the reference of created transient column in List of values switcher.
--set AutoSubmit True on page












3) And write Expression on transient column
-- here LOV_CriteriaValueFrom, LOV_CriteriaValueFrom1, LOV_CriteriaValueFrom12, LOV_CriteriaValueFrom123 are LOVs name


 After creating jsff or jsf and drag and drop your tables from data control on the page.
My detail region looks like below 

Lovs is opeing with respect to the value of ‘criteria column’ like
If ‘AGENT_NAME’ is shows all agent LOV and on ‘BRANCH_NAME’ it shows All Branch Names and vise versa.


But on ‘DUE_DATE’ I want to insert datE manually like a date 


--it gives me validation error because If you use an lov on a field, the value entered must be in the list of items of the lov.
--af:inputText  still will be validated against LOV enries, if attribute it presents have attached LOV
 --To solve this Issue you have to create multiple columns like from_value1 for LOV,
from _value2 for InputText ,from_value3 for Date or whatever that is not a good way.

Below picture is defining how to insert data using LOV, Date and InputText from single column


--From line VO hit the green + icon
--from the popup window drop the column again left to right CriteriaValueFrom
Note- as you can see CriteriaValueFrom is already on right side so it changed the name with CriteriaValueFrom1
--so I changed the name from source
<ViewAttribute
    Name="InputCriteriaValueFrom"
    PrecisionRule="true"
    EntityAttrName="CriteriaValueFrom"
    EntityUsage="CrmCampaignCriteriaLine"
    AliasName="INPUT_CRITERIA_VALUE_FROM"/>
--On the page I used switcher component
--From structure window 



--On switcher property I defined defaultFacet value InputText and on FacetName I write the Expression

As I run the application and got the result in below picture.
I can write manually date or InputText on same Database field 




Thanks J
Enjoy  & Happy Learning J


Muhammad yasir sohail
Oracle ADF Developer




Comments