Oracle ADF Knowledge

Source: Internet
Author: User


1.refresh:ifneeded (region)
In a A.JSFF page drag a taskflow b,b taskflow need an input parameter, from A.JSFF corresponding manage bean to give this parameter value,
Each time a page in the browser calls this B-Taskflow, the error will always be that this parameter is null.
Workaround: Select the B taskflow in the A.JSFF, set the refresh:ifneeded in its properties (when there is a change in the properties will refresh)

2.activation:conditional. Active:true (el expression)
An ADF region must has an active state before it can invoke a task flow.

3.Popup inside button, if not set to Partialsubmit= "true", click Btn after the popup is automatically hidden away.

4.pqsebmodule.xml on the left side of Datamodel does not display the optional link because it is not able to connect to the DB

5. Set the last step on the console data source to select which server to build on, and not select the equivalent of the newly built data source is useless.

6.popup btn Partialsubmit not automatically hidden?
(partialsubmit= "true" partial commit will not go to brush the popup, do not set a brush will be the popup brush away)

7. Child VO If the condition with a where connection is not found after the transaction commits, the transaction can be checked before committing the transactions.
(Before the data is submitted in the session, all through the largest Thera Prdt vo and the value conversion between the bean, there is no re-check ingredient this sub vo. And after the transaction has been submitted, to re-check VO, while the sub-Vo also to re-check, sub-vo where the parameter is not set value, so can not find the sub-VO matching the conditions of the data)
{The outermost big VO when the first load to check the DB, sub-Vo must also be checked, and then the various new operations just plug the data into Vo or bean inside, and do not refresh the operation to check again big Vo and sub Vo, so the transaction before the data can be found}

8. When you create a new view link, the final step is to check the Applicationmodule checkbox. In the parent-child relationship of module, I select a sub Vo from the left, choose to go to the right, each time it will re-create a parent VO instance. But I just need to create a new instance of the child Vo, do not need to create the parent Vo, so do not tick the last Ckeckbox

9. Error when submitting a transaction: jbo-27023:failed to validate all rows in a transaction. (It should be that EO validation does not pass, primary key conflicts and so on, and transaction settings should not be related)
But do not know what the specific is wrong, what validation did not pass. Add the following row validate that line, will prompt the specific error.
Before commiting its necessary to validate the row. That'll fire all validations of EO

Vo.insertrow (row);
Row.validate ();
Appmodule.gettransaction (). commit ();

Using This approach ADF Model layer would handle the error message and exception for you:

10. Commit a transaction: Modify the error
Jbo-27024:failed to validate a row with key:. Error message parameters is {0=tdaddress, 1=oracle.jbo.key[25898]}

The reason is prdtrow.setupdatedtime (time); Setting the update time is the type of oracle.jbo.domain.Timestamp, and the EO field type is java.sql.Timestamp; It would be nice to change the type of row to Java.sql.Timestamp. (The type of eo and Vo row is not the same result)

11. The default table how to hide the 7 columns, select the full display, a refresh and back again.
Because I have columns that have the Visible property set, these 7 columns are due to visible=false, normal behavior

12.q1:refresh set to Defalt, and now do not report Pojo bean is null wrong
Q2:samplingtab that page, taskflow drag it in and do not refresh. and editprdtdetails that Taskflow dragged in. If not refresh, my Pojo bean is null. Why
Refresh is to brush taskflow,samplingtab inside dragged Taskflow just show my VO table, add a row on more than one line, commit the transaction commits the transaction, not to brush. And editprdtdetails that Taskflow was dragged in, the outside of the page's bean as input parameters to editprdtdetails that taskflow inside the Pojo bean. The first default out of the bean is null, so the bean passed in is also null. But when you click the Edit button, the bean outside is assigned a value in the code, but the bean inside Taskflow is still null because the Taskflow is not refreshed. A re-refresh will re-execute the process of assigning the value. (The outside value is paid to a variable called Tdprdtbean, and then the Tdprdtbean to the Pageflowscope Tdprdtbean, the first point is the null address, and then the outside changed to have the address, the back of the change does not follow But if all are the same value address, the value outside, the inside of the not refresh should follow the automatic change, this test with a direct new Bean (), rather than the default null can "pass the address!!!" The address outside has changed, if not (refresh) to re-assign the bean inside the new address, the address will not be changed ")

--My idea is right! If the bean at the beginning of the new is passed, then the new bean will not be re-used only for the properties inside, so no refresh is necessary.
-Note: Do not refresh if you do not want to re-execute this taskflow init method.
--If I set up a taskflow activation:conditional. Active:true (el expression), refresh: set to Default (not ifneeded), but do not error null,why?
Although the bean outside the initialization time is null and then passed to the popup's Pojo bean, but this time Taskflow's Active property is False, Taskflow has not yet loaded, so null has not passed to the Pojo bean, And when you're in
Click on the button method to set Taskflow's active to True when you also put the bean to new, this time will be executed Taskflow input parameters of the value, so the passing of the past is not NULL.
(The active assignment is true and the new bean assignment, the execution order of the 2 sentences should not matter, as long as all in the same event method, the ADF should be the first to execute all the statements of your method, and then go to load your taskflow according to Active=true,
Unless you execute a statement that shows that Taskflow popup in the same method)

13.Post change: Called in the same way as commit (), Vo.getapplicationmodule (). Gettransaction (). Postchanges (); is to post the change (data changes) to the database cache,
However, there is no commit (), which is equivalent to performing an update operation in a session of a database without executing a commit operation (this data is locked), which cannot be successful if the same data is manipulated in another database session. Because this data is in a locked state, the session can continue unless the previous session executes a commit. If the previous session did not execute the commit and then the session is closed, then the data is locked.
Post Change function: Based on the same EO built 2 vo, normal if a VO on the page data changes but there is no commit, the other VO is not the query. But if the first VO changes after calling the Postchange () method, the other VO can be found on the page. It is equivalent to putting the data that was originally cached in the WebLogic into the database cache.
Post change is similar to the database session, if the user enters various data on the page, clicks the Save button in the popup, executes the post change (if the commit is not problematic after post change), This time the main page of non-popup can also display this data (because the same EO and post change), but if the user does not click on the main screen button to execute a commit, but directly close the browser, the session is turned off, the modified data is locked! This is the only way to unlock the database.












Oracle ADF Knowledge

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.