Showing posts with label OAF. Show all posts
Showing posts with label OAF. Show all posts

Tuesday, May 28, 2013

To Download file from Server in OAF

/**
* @param pageContext the current OA page context
* @param file_name_with_path - this is fully qualified file name with its path on unix application
* server. eg "/xxcrp/xxapplcrp/mukul/abc.pdf"
* @param file_name_with_ext - this is file name with extension, you wanna display user
* for download. eg- i wanna display the abc.pdf file download with name five_point_someone.pdf
* then I can pass this as "five_point_someone.pdf"
*/
public void downloadFileFromServer(OAPageContext pageContext,
                                  String file_name_with_path,
                                  String file_name_with_ext) {
  HttpServletResponse response = (HttpServletResponse) pageContext.getRenderingContext().getServletResponse();
  if (((file_name_with_path == null) || ("".equals(file_name_with_path)))){
    throw new OAException("File path is invalid.");
  }

  File fileToDownload = null;
  try{
    fileToDownload = new File(file_name_with_path);
  }catch (Exception e){
    throw new OAException("Invalid File Path or file does not exist.");
  }

  if (!fileToDownload.exists()){
    throw new OAException("File does not exist.");
  }

  if (!fileToDownload.canRead()){
    throw new OAException("Not Able to read the file.");
  }

  String fileType = "application/pdf";//getMimeType(file_name_with_ext);
  response.setContentType(fileType);
  response.setContentLength((int)fileToDownload.length());
  response.setHeader("Content-Disposition", "attachment; filename=\"" + file_name_with_ext + "\"");

  InputStream in = null;
  ServletOutputStream outs = null;

  try{
    outs = response.getOutputStream();
    in = new BufferedInputStream(new FileInputStream(fileToDownload));
    int ch;
    while ((ch = in.read()) != -1){
      outs.write(ch);
    }
  }catch (IOException e){
    // TODO
    e.printStackTrace();
  }finally{
    try{
      outs.flush();
      outs.close();
      if (in != null){
        in.close();
      }
    }catch (Exception e){
      e.printStackTrace();
    }
  }
}
Source:http://mukx.blogspot.in/search/label/OAF

Set Style Sheet Properties Programatically in OAF

In ProcessRequest()
         
import oracle.cabo.style.CSSStyle;

CSSStyle customCss = new CSSStyle();
customCss.setProperty("text-transform","uppercase");
customCss.setProperty("color", "    #ee0000");//# -red
OAMessageStyledTextBean styledTextBean =(OAMessageStyledTextBean)webBean.findIndexedChildRecursive("POCommentsItem");
if(styledTextBean!=null)
{
  styledTextBean.setInlineStyle(customCss);
}

Friday, May 17, 2013

OAF and Profile Options


FND : Diagnostics:
Setting the FND : Diagnostics (FND_DIAGNOSTICS) profile option to "Yes" will enable the diagnostics global button to be rendered on the screen. Pressing this button brings the user to an interface where the user can choose what type of logged messages to display.

Also Enabling the profile "FND: Diagnostics / FND_DIAGNOSTICS" automatically renders the "About this page" link at the bottom of every OA Framework page.

Personalization Levels
Personalizations can be enabled at the function, site, operating unit or responsibility level. Personalizations at lower levels override personalizations at higher levels. Values inherit the definition from the level immediately above unless changed.

FND: Personalization Region Link Enabled:
Valid values:  Yes - renders the "Personalize  Region" links above each  region in a page. Each link  takes you first to the Choose Personalization Context page, then to the Page Hierarchy Personalization page with focus on the region node from which  you selected the "Personalize  Region" link.

Personalize Self-Service Defn: – Set this profile to Yes to allow personalizations.

Disable Self-Service Personalization: - Yes will disable all personalizations at any level.

FND: Personalization Document Root Path: - Set this profile option to a tmp directory with open (777)  permissions for migrating personalizations between instances.


How to See Log on Page
Enable profile Option FND_Diagnostics to "Yes" at User OR Site Level.

In Controller write this code:-
pageContext.writeDiagnostics(this, "Checking profile options", 1);

In Application Module write this code
getOADBTransaction().writeDiagnostics(this, "Checking Profile Option", 1);

Now to see log on screen Click on “Diagnostics” on Page [Top right on page]. Then Choose Show Log on Screen from the picklist and choose log level as Statement Level and Click on Go

How Add Descriptive Flex Field(DFF) in OAF page

How to Check VO state whether it is modified or not

ApplicationModule.getTransaction().isDirty() - This method tells you whether the transaction contains any changes in the view objects. This works for transactions made by entity object-based view objects only.

OAViewObject.isDirty() - This method tells you whether a particular view object contains changes or not. This works for both entity object-based view objects and view objects based on OAPlsqlViewObjectImpl. For view objects based on OAPlsqlViewObjectImpl, you can also use OAPlsqlViewObjectImpl.getState() method 

How to Call OAF Page from Workflow Email Notification

In R12  below error will occur if you try to open an OAF Page URL link directly.

You are trying to access a page that is no longer active. The referring page may have come from a previous session. Please select Home to Proceed.

Note: When you call a standard page this error won't appear. This happens only when you try to open a custom page.

Below are the steps to resolve the error:
1.Open the custom page in Jdev and select the PageLayoutRN. In the property inspector set the Security Mode to selfSecured.
2.Set the rendered property to ${oa.FunctionSecurity.}
Eg: ${oa.FunctionSecurity.XXCUSTPG}
Note: Your user id should have access to the custom page function.
3.In your workflow procedure generate the  OA page URL with the below function and set the workflow attribute with the generated URL.

lc_url:= FND_RUN_FUNCTION.get_run_function_url(p_function_id => 53637,
p_resp_appl_id => null,
p_resp_id => null,
p_security_group_id => 0,
p_parameters =>'PARAM1='||p_lease_id,--'&'||'LeaseId=784',
p_override_agent => null,
p_org_id => null,
p_lang_code => null,
p_encryptParameters => false);

Now you should be able to open the OAF page from workflow email notification.

Source:http://www.oraclearea51.com/contribute/post-a-blog-article/how-to-call-oaf-page-from-workflow-email-notification.html

Open Workflow status monitor diagram page in OAF


Create a VO for the query which is given below through this you can get the current diagram url,

select WF_MONITOR.GetDiagramURL(WF_CORE.Translate('WF_WEB_AGENT'),NtfEO.MESSAGE_TYPE,NtfEO.ITEM_KEY,'NO') monitor_url from
(SELECT ITEM_KEY,MESSAGE_TYPE FROM WF_NOTIFICATIONS WHERE NOTIFICATION_ID = :1) NtfEO

Steps:
1.First find the button component of your page.
2.Call VO with the input parameters which will return the diagram url.
3.Put that url into the java script function.
4.Through the java script you can open a new popup window which will display the status monitor diagram

Sample Code:
OASubmitButtonBean reAssignBea1n = (OASubmitButtonBean) paramOAWebBean.findChildRecursive("WfMonDiagramCtrl");

Serializable[] parameters1 = { NotificationId };
Serializable aa1 = am.invokeMethod("getMonitorURL", parameters1);
if (aa1 != null && !aa1.toString().equals(""))
{
String url = "window.open('" + aa1.toString() + "')";
paramOAPageContext.putJavaScriptFunction("LaunchMonitor", url);
}

Source:http://anuj-oaframeworkblog.blogspot.in/2009/09/open-workflow-status-monitor-diagram.html

Call Workflow from OAF Page


Oracle Workflow is tightly integrated with Oracle Apps and it is very common to invoke workflow from OAF Pages too.

The class oracle.apps.fnd.framework.webui.OANavigation provides Java wrappers for Oracle Workflow Engine’s PL/SQL APIs.

It is very simple to invoke Workflow using OAF, again there are two options first using Java wrappers and second through calling PL/SQL procedures but the later approach you can use if you are converting some Oracle Form into OAF form and all the code for Workflow is already ready and tested but if it is new workflow then you should use Java wrappers:

Following piece of code invokes the Workflow from OAF:
import oracle.apps.fnd.framework.webui.OANavigation;
public void launchWorkFlowFromOAF(OAPageContext pageContext)
{
  String wfItemType = “‘XXSR’”;
  String wfProcess = “‘SR_MAIN_PROCESS’”;
  OADBTransaction transaction = getOADBTransaction();
  String Sr_No ;
  String wfItemKey = ” “;

  Sr_No = pageContext.getParameter(“sr_no”);
  wfItemKey = Sr_No+ transaction.getSequenceValue(“xxsr_key_s.NEXTVAL”).toString();
  OANavigation wfClass = new OANavigation();

  // Create Workflow Process
  wfClass.createProcess(pageContext, wfItemType, wfProcess, wfItemKey);

  // Set Number Attribute: SR_NO
  wfClass.setItemAttrNumber( pageContext, wfItemType, wfItemKey, ”SR_NO”, Sr_No);

  // Start Workflow Process
  wfClass.startProcess(pageContext, wfItemType, wfProcess, wfItemKey);
}


If you want to invoke this workflow using callable statement then you have to write code like this:
OAF code:

if(pageContext.getParameter(“btnSubmit”)!=null)
{
  String sql = "BEGIN xx_sr_notf_pkg.invoke_wf (:1); END;";
  String status = null;
  OracleCallableStatement cs = (OracleCallableStatement)
  am.getOADBTransaction().createCallableStatement(sql,1);
  try
  {
    cs.setString(1,srNo);
    cs.execute();
    cs.close();
  }
  catch (Exception ex)
  {
    throw new OAException(ex.getMessage().toString(),
    OAException.ERROR);
  }
  throw new OAException("SR "+srNo+" has been submitted",
  OAException.CONFIRMATION);
}

PL/SQL Code to Invoke Workflow:
PROCEDURE invoke_wf (p_sr_doc_number IN VARCHAR2)
IS
   l_item_key             VARCHAR2 (50);
   BEGIN
        SELECT p_sr_doc_number ||  xxegasr_key_s.NEXTVAL
        INTO l_item_key
        FROM DUAL;
        wf_engine.createprocess ('XXSR', l_item_key, 'SR_MAIN_PROCESS');
        wf_engine.setitemattrnumber(itemtype      => 'XXSR',
                            itemkey       => l_item_key,
                            aname         => 'P_SR_DOC_NO',
                            avalue        => p_sr_doc_number
                           );    
        wf_engine.startprocess ('XXSR', l_item_key);
        COMMIT;
END invoke_wf;

Source:http://dineshnair.wordpress.com/2009/06/02/integrating-workflow-and-oaf/

Thursday, May 16, 2013

Call Concurrent Program from OA Framework


OA Framework provides the ConcurrentRequest class to call the concurrent program from the page. The submitRequest() method in the ConcurrentRequest class takes 6 parameters and returns request id of the submitted concurrent request:

public int submitRequest( 
String ProgramApplication ,
String ProgramName ,
String ProgramDescription ,
String StartTime,
boolean SubRequest,
Vector Parameters ) throws RequestSubmissionException

ProgramApplication -Application Short name of application under which the program is registered.
ProgramName - Concurrent Program Name for which the request has to be submitted
ProgramDescription - Concurrent Program Description
StartTime - Time at which the request has to start running.
SubRequest - Set to TRUE if the request is submitted from another running request and has to be treated as a sub request.
Parameters - Parameters of the concurrent Request

Here is the example for calling a concurrent program from a OA framework page.
import oracle.apps.fnd.cp.request.ConcurrentRequest;
import oracle.apps.fnd.framework.server.OADBTransaction;

public int submitCPRequest(Number headerId) {
try {
OADBTransaction tx = (OADBTransaction)getDBTransaction();
java.sql.Connection pConncection = tx.getJdbcConnection();
ConcurrentRequest cr = new ConcurrentRequest(pConncection);

String applnName = "PO"; //Application that contains the concurrent program
String cpName = "POXXXX"; //Concurrent program name
String cpDesc = "Concurrent Program Description"; // concurrent Program description

// Pass the Arguments using vector
// Here i have added my parameter headerId to the vector and passed the vector to the concurrent program
Vector cpArgs = new Vector();
cpArgs.addElement(headerId.stringValue());

// Calling the Concurrent Program
int requestId = cr.submitRequest(applnName, cpName, cpDesc, null, false, cpArgs);
tx.commit();
return requestId;
} catch (RequestSubmissionException e) {
OAException oe = new OAException(e.getMessage());
oe.setApplicationModule(this);
throw oe;
}
}

Source:http://prasanna-adf.blogspot.in/2008/11/call-concurrent-program-from-oa.html

Delete Multiple rows from a Table


Step 1. Add one transient attribute "SelectFlag" of type string to your VO
Step 2. create multiple selection based on this attribute
Step 3. In table actions add one button called "Delete"

To handle delete functionality write following code:
public void deleteRow()
{
    XXEGASRLinesVOImpl pervo = getXXEGASRLinesVO1();
    Row row[] = pervo.getAllRowsInRange();
   for (int i=0;i   {
     XXEGASRLinesVORowImpl rowi = (XXEGASRLinesVORowImpl)row;
    if (rowi.getSelectFLag()!= null && rowi.getSelectFLag().equals("Y"))
    {
       rowi.remove();
    }
  }
}

Delete a Row from Advanced Table


if ("delete".equals(pageContext.getParameter(EVENT_PARAM)))
{
  String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
  OARow row = (OARow)am.findRowByRef(rowRef);
  row.remove();
}

Creae Submit Button Dynamically/Programatically in OAF page


OASubmitButtonBean oasb = (OASubmitButtonBean)pageContext.getWebBeanFactory().createWebBean(pageContext, "BUTTON_SUBMIT");
OAAdvancedTableBean oatb =(OAAdvancedTableBean)webBean.findChildRecursive("WOResultsTab");
oasb.setID("SubmitPrintButton");
oasb.setUINodeName("SubmitPrintButton");
oasb.setEvent("SubmitPrintButton");
oasb.setText("Click Here");
oatb.setFooter(oasb);

Wednesday, May 15, 2013

OAF Debug Messages

1.You have encountered an unexpected error. Please contact the System Administrator for assistance.

You need to enable the profile option FND :Diagnostic profile option at site level so that this message
gets converted to

You have encountered an unexpected error. Please contact the System Administrator for assistance.
Click here for exception details.

Tuesday, May 14, 2013

sendRedirect, forwardImmediately, setforwardURL


When we use forward, then servlet container forwards all request to the target page. but in the case sendRedirect, container makes a new request to the target Page. So in forward , url link doesn't change but in sendRedirect url line change . Because container makes a new request, sendRedirect is much slower than forward. If a target page has no relation with current page , then we can use sendRedirect.

Controller CO


The Controller responds to user action and direct application flow. It provides the wiring between the UIX web bean and the middle-tier. All the controllers that we create subclass the
oracle.apps.fnd.framework.webui.OAControllerImpl.

When the browser issues an OA.jsp request:-
The oracle.apps.fnd.framework.webui.OAPageBean(the main OA Framework page processing class) uses the page name to determine which root AM it refers to, so that the VO’s related to the page can be accessed. Then user session is validated and then OAPageBean evaluates request parameter or figure out if it dealing with an HTTP POST or GET request. During the iteration, if the framework finds a web bean referencing a controller class it will call one of the following methods.

Process Request - This phase is invoked upon a browser 'Get' or redirect/forward. This is where
custom code can call the application module to initialize and query the data. This phase may
optionally construct or modify the web beans to create or alter the page structure and web bean
properties.

Process Form Data - This phase is invoked upon a browser 'Post'. During this phase the
framework will automatically applies form changes back to the underlying view objects. Rarely is
custom code required in this phase. If exceptions are thrown during this phase, the Process Form Request phase is skipped and the page is redisplayed.

Process Form Request - This phase is invoked upon a browser 'Post', assuming no exceptions
were thrown during the Process Form Data phase. This is were custom code can handle the form
submit events and call the application module to process the event.

Framework passes two parameters OAPageContext and OAWebBean to the processRequest and processFormRequest.

Following are the usages of OAPageContext parameters.
1. To get and set values of the fields, using oapagecontext.getParameter and
oapagecontext.putParameter
2. For redirecting to the current page or another page. For example to redirecting to current page
itself use oapagecontext.forwardImmediatelyToCurrentPage. Or you may use
oapagecontext.sendRedirect(snewpage)
3. To get a handle to application module(remember we attached AM to page)
oapagecontext.getRootApplicationModule()
4. Write debug messages, using oapagecontext.writeDiagnostics
5. Get message text from FND Message dictionary, using oapagecontext.getMessage

Usages of parameter OAWebBean:-
Remember that webbean represents the hierarchy/structure of components in the page. Hence
using this paremeter object, you can get a handle to any bean/component in that page hierarchy.
Once you have a handle to that bean (say field bean or button bean), you can then invoke methods like setRendered etc to change the behaviour of page at runtime.
Some examples are
1. OAWebBean LastName = oawebbean.findIndexedChildRecursive("personLastName");
Note: In this example, our page must have just one field whose name is personLastName
2. Get a handle to region
OAStackLayoutBean oastacklayoutbean =
(OAStackLayoutBean)oawebbean.findIndexedChildRecursive("stackRegionName");

Source: http://kohlivikram.blogspot.in/search/label/OAF

What is Passivation?

The process of saving application state to a secondary medium (in the case of OA Framework,
database tables) is called passivation.

The process of saving object state to a secondary medium. This is similar to Java I/O serialization, but passivation is a more generic concept. Serialization is one way to save data.

Consider a multi-page purchase order creation flow where the user describes the order in the first page, enters one or more line items in the second page, and reviews the order before submitting it in the third page. The purchase order data (its state) must remain intact between each of the browser requests for the transaction to be completed successfully.

NOTE:-->Set the Retention Level for root application modules only. Do not set it for nested application modules as their passivation behavior is determined by the root application module's configuration. For example, do not set this property for application modules associated with LOVs and attachment pages as these application modules are nested under the main page's root application module. However, because they are passivated with the root application module, nested application modules must observe all the state management coding standards.

Set each root application module's Retention Level to MANAGE_STATE.
Reason why---> This allows OA Framework to recover connections and memory under resource load, support session failover, and other pending features such as Save For Later and JVM failover.

Source: https://forums.oracle.com/forums/thread.jspa?threadID=859349

Tuesday, July 24, 2012

Query Modes in OAF Query Region


Construction Modes:
There are three construction modes available. Here is a brief comparison of the three modes.

1] resultsBasedSearch:
  • OA Framework automatically renders both the Simple and Advanced search regions based on the designated queryable items in the associated table.
  • The search regions automatically include both a Go and a Clear button.
  • OA Framework automatically executes the underlying search when the user selects the Go button.

2] autoCustomizationCriteria:
  • OA Framework automatically renders both the Simple and Advanced search regions based on the corresponding Simple search and Advanced search regions that you define and specify as named children of the query region.
  •  The search regions automatically include a Go button. In addition, the Advanced search region includes a Clear button.
  • OA Framework automatically executes the underlying search when the user selects the Go button. However, developers must explicitly define mappings between items in the Search panel and items in the table region.

3] none
  • The Search regions are rendered based on the Simple Search and Advanced Search regions that you define and specify as named children of the query region.
  • You must implement your own Go button in this mode.
  • The underlying search must be executed by the developer.

Thursday, April 12, 2012

Interview Questions 1


1) What is BC4J?
Business Components for Java is JDeveloper's programming framework for building multitier database applications from reusable business components. These applications typically consist of:

• A client-side user interface written in Java and/or HTML.
• One or more business logic tier components that provide business logic and views of business objects.
• Tables on the database server that store the underlying data.

2.What are all the components of BC4J?
Following are the components of BC4J:
• Entity Object - EO encapsulates the business logic and rules. EO’s are used for Inserting, Updating and Deleting data from the database table. E0 is also used for validating the records across the applications.
• View Object - View object encapsulates the database query. It is used for selecting data. It provides iteration over a query result set. VO’s are primarily based on EO’s. It can be used on multiple EO’s if the UI is for update.
• Application Module - Application Modules serve as containers for related BC4J components. The pages are related by participating in the same task. It also defines the logical data model and business methods needed.

2) What is an EO?
EO encapsulates the business logic and rules.EO’s are used for Inserting, Updating and Deleting data. This is used for validating across the applications. We can also link to other EO’s and create a Association object.

3) What is an VO?
View object encapsulates the database query. It is used for selecting data. It provides iteration over a query result set.VO’s are primarily based on Eo’s. It can be used on multiple EO’s if the UI is for update. It provides a single point of contact for getting and setting entity object values. It can be linked together to form View Links.

4) What is an AO?
An association object is created where we link EO’s. For example take the search page where we link the same EO to form a association between the manager and employee. Every employee should have a manager associated. But if it President then no there is no manager associated. This is a perfect example to understand the AO.

5) What is an VL?
A view link is an active link between view links. A view link can be created by providing the source and destination views and source and destination attributes. There are two modes of View link operation that can be performed. A document and Master/Detail operation.

6). What is UIX?
UIX is an extensible, J2EE-based framework for building web applications. It is based on the Model-View-Controller (MVC) design pattern, which provides the foundation for building scalable enterprise web applications.

7). Where the VO is located in the MVC architecture?
VO is located in the View Layer in MVC which is responsible for presenting the data to the user.

9) Which package should include EO and AO.
The EO and AO will be present in the schema.server package.

10) What is the difference between inline lov and external lov.
Inline lov is a lov which is used only for that particular page for which it was created and cannot be used by any other page.

External lov is a common lov which can be used by any page. It is a common component for any page to use it. It can be used by giving the full path of the lov in the properties section “External LOV” of the item.


11) what is a Javabean?
JavaBeans is an object-oriented programming interface that lets you build re-useable applications or program building blocks called components that can be deployed in a network on any major operating system platform.

12) What is query Bean?
QueryBean is used to execute and return the results of a query on behalf of the QueryPortlet application.

13) what is the difference between autocustomization criteria and result based search?
Results based search generates search items automatically based on the columns on the results table.
In Autocustomization search we need to set what all fields are required to display as a search criteria.

14) what is MDS?
MDS is MetaData Service. When a web page is broken into small units like buttons,fields etc they are stored in a database. These are not stored as binary files but as data in tables. The data are present in JDR tables. MDS provides service to store & return page definitions. MDS collects those definitions in components/fields in a meaningful manner to build a page.

15) What is XML?
XML is a markup language for documents containing structured information.
Structured information contains both content (words, pictures, etc.) and some indication of what role that content plays (for example, content in a section heading has a different meaning from content in a footnote, which means something different than content in a figure caption or content in a database table, etc.).

16) What is the difference between customization and extension?
Customization is under direct user control. The user explicitly selects between certain options. Using customization a user can:
    Altering the functionality of an application
    Altering existing UI
    Altering existing business logic

Extension is about extending the functionality of an application beyond what can be done through personalization. Using extension we can:

    Add new functional flows
    Extend or override existing business logic
    Create New application/module
    Create New page
    Create New attribute
    Extend/Override defaults & validations

17) What is Personalization?
Personalization enables you to declaratively tailor the UI look-and-feel, layout or visibility of page content to suit a business need or a user preference. Using Personalization we can:

    • Tailor the order in which table columns are displayed.
    • Tailor a query result.
    • Tailor the color scheme of the UI.
    • Folder Forms
    • Do Forms Personalization
  
18)Can you extend every possible Application Module?
Answer: No..Root AM cannot be extended.

19) What is rootAM?
The application module which is associated with the top-level page region (the pageLayout region) is root application module.

20) Why can’t Root AM be extended?
The root AM is loaded first and after that the MDS Substitutions are parsed. Hence ROOT AM gets loaded even before the time the substitutions definition from MDS layer get worked out. Obviously, the root am cant substitute itself, hence it can't be extended.

21) Why Should we give retainAM=Y?
The AM should be retained whenever you are navigating away from a page and when you know that there is a possibility to come back to the page again and data is to be retained. Example : Any navigation link that opens in a new page or any navigation which has a back button to come back to the initial page.
The AM should not be retained for two independent pages, especially if they have common VOs which fetch different result sets. In such cases, retaining the AM may not remove the cache of VOs and so the result may not be as expected.

22) What is the significance of addBreadCrumb=Y
The basic intention of the breadcrumb is to let the user know of the navigation path he took to reach the current page.

   a) The first page should have retainAM =Y and addBreadCrumb= Y set in the HTML call of the function
   b) Bread cumbs for the first page wont appear if you run the page through Jdeveloper ,you can see it when you deploy the page on instance.

23) How do you find right jdev patch for your oracle application version.
Search in oracle.metalink.com as Jdev with OA Extension.

24) What are the tools you had used for decompiling java class?
Jad is one of the tool for decompiling the java class.

25) What is an EO?
EO serves the following purpose:
    It is used to map to a database table or other data source
    Each entity object instance represents a single row of a table
    It is fundamental BC4J object through which all DML operations i.e. inserts/updates/deletes interact with the database
    It contains attributes representing database columns
    It is a central point for business logic and validation related to a table
    It encapsulates attribute-level and entity-level validation logic
    It can contain custom business methods

26) What is a VO?
    VO represents a query result
    VOs Are used for joining, filtering, projecting, and sorting your business data
    VOs can be based on any number of entity objects
    VOs can also be constructed from a SQL statement

27) What are the methods in controller?
ProcessRequest
processFormRequest
processFormData

28) What is a Controller?
Controller is the java file and can be associated to a complete OAF page or to a specific region.

There are several tasks you will do routinely in your controller code.
    Handle button press and other events
    Automatic queries
    Dynamic WHERE clauses
    Commits
    JSP Forwards

The logic for accomplishing all these tasks is written in controller

29) When is the processRequest method called?
PR method is called when the page is getting rendered onto the screen and a region is displayed.

30) When is processFormRequest method called?
PFR method is called when we perform some action on the screen like click of submit button or click on lov.

31)In my LOV,if I type something and  press tab key nothing is happening. I want it to open LOV popup what should I change?
Set Disable Validation property to False for LOV.

Wednesday, April 11, 2012

Related Posts Plugin for WordPress, Blogger...