Hassan's requirement is, suppose you have two pages Manager and User from where you can navigate to Order page. Items in Order page say Order Number, Order date are editable only when you come from Manager page. Otherwise they are read only or display only fields. This is a perfect example to show use of Application Items.
There are two types of items in APEX: page items and application items. Page items are placed on a page and have associated user interface properties, such as Display As, Label and Label Template. Examples of page-level items include a check box, date picker, display
as text, file browse field, popup list of values, select list, or a text area. Application
items are not associated with a page and therefore have no user interface properties.
You can use an application item as a global variable.
You can create application item from Shared Components > Application Items (Logic Section).
Implementation:
To implement this requirement, I will create three pages Manager, User and Order pages. You can navigate to Order page from Manager page using Edit button or from User page using View button. I will also create an application item called 'PARENT_PAGE_ID' which is set to substitution string &APP_PAGE_ID. in branches for Edit and View buttons. APEX engine substitutes &APP_PAGE_ID. with current page id during run-time.
In Order page, two fields Order Num and Order Date uses Read-Only condition which evaluates if PARENT_PAGE_ID = User page id. This condition evaluates to TRUE when you navigate from User page to Order page, so the two fields in Order page are now non-editable. If you navigate from Manager page to Order page, read-only condition evaluates to FALSE and the two fields in Order page are editable.
I will also create a Back button in Order page, to branch to parent page. The target page for this branch would be &PARENT_PAGE_ID. This functionality demonstrates use of application item as a substitution string.
Detailed steps to implement above requirement are:
- Create Manager page (24) with HTML region having buttons Edit and Switch Role. Edit button takes you to Order Page and Switch Role takes you to User page. Branches are conditional on button requests.
- Create User page (25) similar to Manager page. It also has two buttons View and Switch Role. View button takes you to Order Page and Switch Role takes you to Manager page. Branches are conditional on button requests.
- Create Order page (26) similar to above pages. It has two fields Order Num and Order Date along with buttons Back and Submit. Back button takes you to page you navigated from. Submit button branches to same page i.e. 26. I will cover how branch for Back button is implemented, in later part of the article.
Order Num text field is defaulted with a static value 12982. Order Date item is of type Date Picker (comes with calendar). It is defaulted with current date.
- Create application item in Shared Components > Application Items (Logic Section).
- Now I will edit the branches for Edit button in Manager page and View button in User page to set PARENT_PAGE_ID with substitution string &APP_PAGE_ID. during branching.
- In Order page, Read-Only condition is set for Order Num and Order Date fields.
- Finally, for branching for Back button in Create page set target page as &PARENT_PAGE_ID. APEX Engine substitutes &PARENT_PAGE_ID. with application item value.
The requirement is successfully implemented. The screenshot below shows the functionality.
URL for the page:
This example can be accessed using the url http://apex.oracle.com/pls/otn/f?p=15944:24
Comments
(5)
...
written by Aakash Gupta , June 06, 2009
written by Aakash Gupta , June 06, 2009
Hi Kishore,
Can APEX be used in tight integrated with E-Business suite R12?
Aakash
Votes: +0
Can APEX be used in tight integrated with E-Business suite R12?
Aakash
report abuse
vote down
vote up
I have a problema
written by oscar , July 24, 2009
written by oscar , July 24, 2009
Hi.
I have a problem related to this.
When i copy a value between screens the process copy just de default value, not the actual value that the item contains.
For example i have a field "campo" and it's default value is 12345, when the creen is changed the value of the target item is 12345, the problem is when i change the value of "campo" to 54321 and i change the screen, the value of the target item is still 12345.
Please help!
Thanks
Votes: +0
I have a problem related to this.
When i copy a value between screens the process copy just de default value, not the actual value that the item contains.
For example i have a field "campo" and it's default value is 12345, when the creen is changed the value of the target item is 12345, the problem is when i change the value of "campo" to 54321 and i change the screen, the value of the target item is still 12345.
Please help!
Thanks
report abuse
vote down
vote up






Thanks for dedicating the article for the requirement mentioned.
Regards,
Hassan Shoaib