Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the knowledge in OAF development?

Shulou Source: shulou.com Published: 2022-06-01 03:37:03 10月19日 Update

This article is to share with you about the knowledge of OAF development, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Small knowledge points summarized during OAF development:

1: conversion between variable types:

(1): int = > other types

Int xxxx

Number yyyy = (Number) xxxx

Number yyyy=new Number (xxxx)

String yyyy = String.valueOf (xxxx)

String yyyy = Integer.toString (xxxx)

String yyyy = "" + xxxx

(2): number = > other types

Number xxxx

Int yyyy = xxxx.intValue ()

Int yyyy = (int) xxxx

String yyyy = "" + xxxx

String yyyy = String.valueOf (xxxx)

(3): date = > other types

Date xxxx

String yyyy= String.valueOf (xxxx)

String yyyy= xxxx.toString ()

(4): String = > other types

String xxxx

Int yyyy = Integer.parseInt (xxxx)

Int yyyy = Integer.valueOf (xxxx)

Try {

Number yyyy = new Number (xxxx)

}

Catch (Exception e) {

}

Number yyyy = (Number) xxxx

Date yyyy = Date.valueOf (xxxx)

Date yyyy = (Date) xxxx

Some basic implementation methods between 2:OAF:

(1): generally do not write specific logic code in CO, put all methods into AM, and then call functions or procedures in AM in CO. The specific methods are:

OAApplicationModule am = pageContext.getApplicationModule (webBean)

Calling procedure: String useId = "" + useid

Serializable [] parameters = {useId}

Am.invokeMethod ("init", parameters)

(am.invokeMethod ("init");

Call function: String supplierid = Integer.toString (n)

Serializable [] param = {supplierid}

Serializable SupplierName = am.invokeMethod ("GetSupplierName", param)

Note: SupplierName can be used directly, depending on the type returned by the function.

3: the method of obtaining and assigning variables or items on the page:

(1): the value of the variable passed in on the link:

(OA.jsp?page=/oracle/apps/xxpos/xxpos5961/back/webui/CreatePG&BackNumber= {@ BackNumber} & HeaderId= {@ HeaderId} & HeaderStatus= {@ HeaderStatus} & retainAM=Y&addBreadCrumb=Y&UpdateFlg=Y)

String backnumber = pageContext.getParameter ("BackNumber")

(2): get the item on the page:

OAMessageLovInputBean asnBean1 = (OAMessageLovInputBean) webBean.findChildRecursive ("NumberFromSearch")

String aa= ""

AsnBean1.setValue (pageContext,aa)

4: how to get the VO and the current line:

OAViewObject voDetail = (OAViewObject) am.findViewObject ("BackPVO1")

BackPVORowImpl rowDetail = (BackPVORowImpl) voDetail.getCurrentRow ()

How to get a field in VO:

String N = "" + rowDetail.getUserTypeID ()

Or:

Number headerid =

(Number) voDetail.getCurrentRow () getAttribute ("HeaderId")

5: loop the method of judging the records on the page:

/ / verify whether the paid-in quantity is greater than the replacement quantity

OAViewObject voline = (OAViewObject) am.findViewObject ("DetailLineVO1")

Row rowLine = voline.first ()

Int rec_record = 0

While (rowLine! = null) {

Number backquan = (Number) rowLine.getAttribute ("BackQuantity")

Number actualquan = (Number) rowLine.getAttribute ("ActualQuantity")

String TOsubinv = (String) rowLine.getAttribute ("ToSubinventoryCode")

String TOlocator = "" + (Number) rowLine.getAttribute ("ToLocatorId")

Rec_record = rec_record + 1

String record_num = "" + rec_record

String ACTUALQUAN = "" + actualquan

If (! (TOsubinv! = null & & TOsubinv.length ()! = 0)) {

System.out.println ("enter this 1111")

MessageToken [] errTokens = {new MessageToken ("RECORD_NUM", record_num)}

Throw new OAException ("XXPOS", "FWK_TBX_T_BACK_NO_TOLOTSUB", errTokens)

}

If ("null" .equals (TOlocator)) {

System.out.println ("enter into here 2222")

MessageToken [] errTokens = {new MessageToken ("RECORD_NUM", record_num)}

Throw new OAException ("XXPOS", "FWK_TBX_T_BACK_NO_TOLOCATOR", errTokens)

}

If ("null" .equals (ACTUALQUAN)) {

System.out.println ("enter into here 3333")

MessageToken [] errTokens = {new MessageToken ("RECORD_NUM", record_num)}; throw new OAException ("XXPOS", "FWK_TBX_NO_ACTU_QUAN", errTokens)

}

Else {

If (backquan.compareTo (actualquan))

Tags: Methods types knowledge functions development variables procedures pages between quantity more knowledge points articles utility code depends on comments fields that is work will Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Huawei MySQL macOS Shulou Information