Is this BUG or Feature of APEX 4.0.1 - Any expert please help to answer

Try this to stimulate the BUG or Feature
- Development -
1. Create Basic Master Detail with tabular form
2. Create a basic LOV and display NULL -> RETURN NULL
- Run -
1. Run the Page click "ADD ROW"
2. Do not enter any data into the tabular
3. Click on Apply Changes
Apex smart enough to know user do not want to add anything very nice....
now... observe this
- Development -
1. Modify the LOV, remove the display NULL, so it will show first value of the LOV
- Run -
1. Run the Page click "ADD ROW"
2. Do not enter any data into the tabular
3. Click on Apply Changes
Apex don't bother to test all validations straight to GIGO and end user see those ORA-.
I have a page that the tabular form has a default value (not LOV but default value) the validation is not working, GIGO....
Any expert please explain is this suppose how Apex work? or do we need to handle those default value.
I try to debug the page with good one and bad one, I think I still have a lot to learn I don't understand the debug message. I guess is something about Branching....
Siere

Hi,
Unfortunately there isn't really much that could be done to work around this issue in 4.0.x. The validation logic treats these new rows as not having been touched by the user, hence they are ignored. But the DML (update/insert) logic thinks the data did change due to that default value, and thus attempts an insert for the new row. There might be a way to trick APEX into doing the right thing with some JavaScript, but I would advice against that, considering that this might break after a future upgrade.
Regards,
Marc

Similar Messages

Maybe you are looking for