I have a requirement to add a check box to OAF page and capture the checked/unchecked value into one of the attribute columns of the standard table. This page is part of the train bean.
Here is what I did so far:
Personalized the page to add the checkbox.
Extended EO to add "Attribute1" column from the table to EO
Extended VO and based it on extended EO to map the checkbox field to newly added EO attribute
My understanding is just doing the above (with out adding any code) should store the checkbox value into attribut1 column. But for some reason, the value is not getting stored in the table. I've already spent lot of time diagnosing the issue and I'm at a point where I need your help. Please advise me if I'm missing any of the steps or my approach is incorrect in the first place. I will share more details as needed.
Appreciate your help.
My understanding about your requirement is,
one of the standard page you want to add one checkbox, and save the value in one of the Attribute.
You mentioned that you have extended the EO, VO, why you need to extend the EO, VO,
your standard VO itself you should have Attribute columns, you just need to create the checkbox and associate the Attribute1.
For testing purpose
Dont do any extn, Can you add a textInputField and associate the attribute15(make sure you have attribute15 in std VO and ur std EO) and save the page
and see your textInput entered value getting saved in the table's Attribute15.
Can you make sure your newly added attribute in EO and VO are updatable Always radio box checked in.
As I mentioned can you make that field as TextInputField instead of Checkbox and see it is getting saved in attribute1.
Make sure Attribute is not being used by somebody else.
And can you put some debug just before coming and see you are getting your newly added attribute and getting the value?
I'm running the page from Jdeveloper in a debug mode to trace the program execution. The setter attribute for the additional attribute is being called with correct value too. But after the record is saved, I dont see the value in the table. It's quite intriguing. I will also try to put a sample text box and try that. I will keep you posted.
The issue seems to be with the code in AMImpl. In the standard code, they are constructing the record using rosetta classes that is passed to PL/SQL API which is doing the rest of the job. To test if my value was not making to attribute1 was due to this attribute not being considered in record construction, I added the line in AMImpl to conside my attribute and it worked.
But this is root AM and I cannot extend it. I had just added to standard AM but this is not recommended and not a good practice. What options exist when you need to make changes to AM and that AM turns out to be root AM.