OAF-in-depth View of Action and Navigation Buttons

Source: Internet
Author: User

OAF Study Notes-in-depth View of Action and Navigation Buttons
 
Action/Navigation Buttons:
Execute the action on this page.
Navigate to another page.
Execute the action and navigate to another page.
Location of Action/Navigation Buttons:
Single Text field, Poplist.
Groups composed of multiple items
Table
Entire page
 
Action Buttons
Execute the Page Post action when you click the button
 
Create a button (Dynamic button)
Import oracle. apps. fnd. framework. webui. beans. form. OASubmitButtonBean;
Import oracle. apps. fnd. framework. webui. OAWebBeanConstants;
OASubmitButtonBean aa = (OASubmitButtonBean) pageContext. getWebBeanFactory (). createWebBean (pageContext, OAWebBeanConstants. BUTTON_SUBMIT_BEAN); // instantiate
Aa. setID ("Go"); // defines the ID
Aa. setUINodeName ("xxSubmitButton"); // define UINodename
Aa. setEvent ("Go"); // defines the event name
Aa. setText ("Go"); // define the Prompt
WebBean. addIndexedChild (aa); // displayed on the page
Note: This is a general routine for dynamically generating items. The setUINodeName can be omitted, and OAF will automatically allocate it. The last sentence is to specify the Region in which the button is generated. Here is the entire page, if you have specific Region, use the following method to generate it:
 
Assume that you need to generate a button in the Region of TableLayout:
 
Import oracle. apps. fnd. framework. webui. beans. layout. OATableLayoutBean;
OATableLayoutBean cont = (OATableLayoutBean) webBean. findIndexedChildRecursive ("RepeatRN"); // instantiate Region
OASubmitButtonBean aa = (OASubmitButtonBean) pageContext. getWebBeanFactory (). createWebBean (pageContext, OAWebBeanConstants. BUTTON_SUBMIT_BEAN); // instantiate the button
Aa. setID ("Go ");
Aa. setUINodeName ("xxSubmitButton ");
Aa. setEvent ("Go ");
Aa. setText ("abcd ");
Cont. addIndexedChild (aa); // note that a button is displayed on the page using the method of the previously instantiated webbean object.
 
Control visual property (dynamic attribute setting)
At runtime, only one attribute may need to be changed, that is, the button's Prompt. You can call setText to implement it (first instantiate the button)
 
Control Behavior. and Data (Behavior and Data Control)
Availability: The setDisabled (Boolean) Setting button is unavailable.
Verification: After the setUnvalidated (Boolean) button is clicked, onSubmit validation (Client) is not triggered)
After the setServerUnvalidated (Boolean) button is clicked, onSubmit validation (Server) is not triggered)
 
Handle Button Press Events (get Button event)
Two methods:
Use the Page Post action to obtain
Public void processFormRequest (OAPageContext pageContext, OAWebBean webBean)
{
... // Check to see if a submit button named "Go" has been pressed.
If (pageContext. getParameter ("Go ")! = Null)
{
 
...
 
Use FireAction to obtain
First, define the Event name of the FireAction button, and then obtain the Event in processFormRequest.
Public void processFormRequest (OAPageContext pageContext, OAWebBean webBean)
{
Super. processFormRequest (pageContext, webBean );
If (pageContext. getParameter (EVENT_PARAM). equals ("Go "))
{
PageContext. getApplicationModule (webBean). invokeMethod ("updatedata ");

}
}

 

Author: "Soy Milk"

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.