Sie sind auf Seite 1von 34

ADF Upload Blob File in Table Column

Create Table with Blob Column create table xx_attachment(fileId Number, file_name VARCHAR2(255), file_content_type varchar2(100),file_data blob, CONSTRAINT xx_attach_pk PRIMARY KEY (fileId));

Create EO,VO add it to AM. Create below variable and accessor inside Managed Bean or Backing Bean. import org.apache.myfaces.trinidad.model.UploadedFile; ... private UploadedFile _file; public UploadedFile getFile() { return _file; } public void setFile(UploadedFile file) { _file = file; } On JSF Page(jspx/jsf) or Page Fragment(jsff) 1)From DataControl unde XxAttachmentVO1 --> Operations --> Drag CreateInsert method and drop as ADF Button. (When you click this Button it creates Blank row). 2)From Common Components drag inputFile(af:inputFile) component and drop on page. Make sure you put value as #{<yourMangedBean>.file} <af:inputFile label="Upload File" id="if1" value="#{<yourMangedBean>.file}"/> 3)From Common Components drag Button and drop after inputFile component. Write below code on Button action Listner. <af:commandButton text="Upload" id="cb11" action="#{<yourManagedBean.uploadAttach}"/> 4)Add Commit action method in Bindings. 5)For Page Form make sure usesUpload property is True. <af:form id="f1" usesUpload="true">

import oracle.adf.model.BindingContext; import oracle.adf.model.binding.DCBindingContainer; import oracle.adf.model.binding.DCIteratorBinding; import oracle.adf.view.rich.event.PopupFetchEvent; import oracle.binding.BindingContainer; import oracle.binding.OperationBinding; import oracle.jbo.Row; import oracle.jbo.domain.BlobDomain; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.sql.SQLException; import javax.faces.event.ActionEvent; ... public String uploadAttach() { // Add event code here... //BindingContainer bindings = (BindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); UploadedFile myfile = (UploadedFile)this.getFile(); BindingContext bindingctx = BindingContext.getCurrent(); BindingContainer bindings = bindingctx.getCurrentBindingsEntry(); DCBindingContainer bindingsImpl = (DCBindingContainer)bindings; DCIteratorBinding iter = bindingsImpl.findIteratorBinding("XxAttachmentVO1Iterator"); Row row = iter.getCurrentRow(); // Upload File into Blob Column row.setAttribute("FileData", createBlobDomain(myfile)); // File Name String fileName = (String)myfile.getFilename(); row.setAttribute("FileName", fileName); // File Content/MIME Type String fileContentType = (String)myfile.getContentType(); row.setAttribute("FileContentType", fileContentType); //Commit Transaction OperationBinding method = bindings.getOperationBinding("Commit"); method.execute(); return null; }

private BlobDomain createBlobDomain(UploadedFile file) { InputStream in = null; BlobDomain blobDomain = null; OutputStream out = null; try { in = file.getInputStream(); blobDomain = new BlobDomain(); out = blobDomain.getBinaryOutputStream(); byte[] buffer = new byte[8192]; int bytesRead = 0; while ((bytesRead = in.read(buffer, 0, 8192)) != -1) { out.write(buffer, 0, bytesRead); } in.close(); } catch (IOException e) { e.printStackTrace(); } catch (SQLException e) { e.fillInStackTrace(); } return blobDomain; }

To download file. http://hasamali.blogspot.com/2011/09/download-file-in-oracle-adf-gui.html

Posted by ADF OAF Tech at 8:40 PM 2 comments: Email ThisBlogThis!Share to TwitterShare to Facebook

ADF Multi Select Options (af:selectMany)


ADF Code Corner https://blogs.oracle.com/jdevotnharvest/entry/how_to_access_selected_rows http://myadfnotebook.blogspot.com/2010/09/getting-string-value-or-item-code-of.html

Create Master Detail Table create table xx_users(user_id NUMBER,user_name VARCHAR2(100),

CONSTRAINT xx_users_pk PRIMARY KEY (user_Id)); create table xx_roles(role_id NUMBER,role_name VARCHAR2(100), CONSTRAINT xx_roles_pk PRIMARY KEY (role_Id)); Create EO,VO for above 2 tables.

create table xx_user_roles(user_role_id NUMBER,user_id NUMBER,role_name VARCHAR2(100), CONSTRAINT xx_user_roles_pk PRIMARY KEY (user_role_Id), CONSTRAINT xx_user_roles_fk1 FOREIGN KEY (user_id) REFERENCES xx_users(user_id)); Create ReadOnly VO based on Above table. Add All VO instances into AppModule. From DataControl Add CreateInsert Operation for XxUsersVo1 as Button on Page. From DataControl XxUsersVo1 as ADF Form. From Data Control add XxRolesLOVVO1 as ADF Select Many Choice as <af:selectManyChoice value="#{bindings.XxRolesLOVVO1.inputValue}" label="#{bindings.XxRolesLOVVO1.label}" id="smc1"> <f:selectItems value="#{bindings.XxRolesLOVVO1.items}" id="si1"/> </af:selectManyChoice>

On Button Pressed public void addRoles() { BindingContext bctx = BindingContext.getCurrent(); BindingContainer bindings = bctx.getCurrentBindingsEntry(); JUCtrlListBinding allRolesList = (JUCtrlListBinding) bindings.get("XxRolesLOVVO1"); Object[] selVals = allRolesList.getSelectedValues(); for (int i = 0; i < selVals.length; i++) { //Integer val = (Integer)selVals[i]; String val = (String)selVals[i]; System.out.println("Int Val "+val); // Insert into Table after getting selected Rows or your Code OperationBinding crRoleMethod =

bindings.getOperationBinding("CreateInsertRoles"); crRoleMethod.execute(); DCBindingContainer bindingsImpl = (DCBindingContainer)bindings; DCIteratorBinding iter = bindingsImpl.findIteratorBinding("XxUserRolesVO2Iterator"); Row row = iter.getCurrentRow(); // Insert Role Name row.setAttribute("RoleName",val ); //... } } Use if you want to pull records based on Indices public void addRolesUsingIndices() { BindingContext bctx = BindingContext.getCurrent(); BindingContainer bindings = bctx.getCurrentBindingsEntry(); JUCtrlListBinding allRolesList = (JUCtrlListBinding) bindings.get("XxRolesLOVVO1"); int[] selVals = allRolesList.getSelectedIndices(); for (int indx : selVals ) { Row rw = allRolesList.getRowAtRangeIndex(indx); Number id = (Number)rw.getAttribute("RoleId"); String val = (String)rw.getAttribute("RoleName"); // Insert into Table after getting selected Rows or your Code OperationBinding crRoleMethod = bindings.getOperationBinding("CreateInsertRoles"); crRoleMethod.execute(); DCBindingContainer bindingsImpl = (DCBindingContainer)bindings; DCIteratorBinding iter = bindingsImpl.findIteratorBinding("XxUserRolesVO2Iterator"); Row row = iter.getCurrentRow(); // Insert Role Name row.setAttribute("RoleName",id+" "+val ); //... } }

If the Choice List is Static eg.


<af:selectManyCheckbox label="Roles" id="smc1" binding="#{backingBeanScope.Backing_xxUserCreation.smc1}" value="#{backingBeanScope.Backing_xxUserCreation.listValue}" autoSubmit="true"> <af:selectItem label="Accountant" value="ACCOUNTANT" id="si3" binding="#{backingBeanScope.Backing_xxUserCreation.si3}"/> <af:selectItem label="Sales Manager" value="SALES_MANAGER" id="si1" binding="#{backingBeanScope.Backing_xxUserCreation.si1}"/> <af:selectItem label="Finance Manager" value="FINANCE_MANAGER" id="si2" binding="#{backingBeanScope.Backing_xxUserCreation.si2}"/> <af:selectItem label="Buyer" value="BUYER" id="si4" binding="#{backingBeanScope.Backing_xxUserCreation.si4}"/> </af:selectManyCheckbox>

Add below method call on Button Pressed addRoles(listValue); Add below code in Managed Bean or Backing Bean private Object[] listValue; public void setListValue(Object[] listvalue){ this.listValue = listvalue; } public Object[] getListValue(){ return listValue; } public String getListString(){ return createString(listValue); }

public String createString(Object[] arr){ if(arr != null){ String values = "["; for(int i=0;i<arr.length;i++) { values = values + arr[i]; if (i <arr.length - 1) values = values + ","; } values = values + "]"; return values; } return null; } public void addRoles(Object[] arr){ BindingContext bindingctx = BindingContext.getCurrent(); BindingContainer bindings = bindingctx.getCurrentBindingsEntry(); if(arr != null){ //String values = "["; for(int i=0;i<arr.length;i++) { //values = values + arr[i]; System.out.println("Roles to be added "+arr[i]); // Insert Row into USer Roles table OperationBinding crRoleMethod = bindings.getOperationBinding("CreateInsertRoles"); crRoleMethod.execute(); DCBindingContainer bindingsImpl = (DCBindingContainer)bindings; DCIteratorBinding iter = bindingsImpl.findIteratorBinding("XxUserRolesVO2Iterator"); Row row = iter.getCurrentRow(); // Insert Role Name row.setAttribute("RoleName",arr[i] ); //if (i <arr.length - 1) //values = values + ","; } //values = values + "]"; } }

Posted by ADF OAF Tech at 1:12 PM No comments: Email ThisBlogThis!Share to TwitterShare to Facebook

Monday, November 5, 2012


R12 SLA Tables
http://apps2fusion.com/at/58-pv/303-r12-sla-subledger-accounting http://oracleapps88.blogspot.com/2011/11/r12-subledger-accounting-tables.html Oracle Sub Ledger accounting (SLA) is accounting hub in Oracle Application Release 12 (R12). It is used to derive all attributes required to account a transaction in Oracle General Ledger. In R12, SLA is used to derive the very basic accounting attributes like entered amount, accounted amount, Date, Currency code etc and the complex attributes like Ledger, Code Combination ID, Periods etc. After deriving these accounting attributes the transactions are then interfaced to GL from SLA. Thus in R12 no sub ledgers (AP, PO, PA etc) interfaces the transactions directly to GL, but all the transactions are interfaced to GL in following 2 steps: 1. Sub ledgers interface the data to SLA. 2. SLA derives the accounting information and interfaces the data to GL. SLA gives the flexibility to manage the entire accounting rule at one place, which acts as a single source of truth for GL. Run Create Accounting to Populate Accounting events (SLA) tables. After running Creating Accounting user can view Accounting. Key Tables for SLA XLA_AE_HEADERS XLA_AE_LINES XLA_TRANSACTION_ENTITIES XLA_DISTRIBUTION_LINKS GL_IMPORT_REFERENCES XLA_TRANSACTION_ENTITIES.entity_code IN ( 'TRANSACTIONS', "RECEIPTS', 'ADJUSTMENTS', 'PURCHASE_ORDER', 'AP_INVOICES', 'AP_PAYMENTS',

'MTL_ACCOUNTING_EVENTS', 'WIP_ACCOUNTING_EVENTS' 'EXPENDITURES' -- Mapping Identifiers --Menu: Setup > Subledger Accounting > Accounting Methods Builder > Events > Event Modal --Entity Code Column Value Column in xla_transaction_entities --EXPENDITURES EXPENDITURE_ITEM_ID SOURCE_ID_INT_1 --REVENUE PROJECT_ID SOURCE_ID_INT_1 --REVENUE DRAFT_REVENUE_NUM SOURCE_ID_INT_2 --AP_INVOICES INVOICE_ID SOURCE_ID_INT_1 --AP_PAYMENTS CHECK_ID SOURCE_ID_INT_1

Taking the example of Oracle Projects in 11i where after costing the transaction user need to run the PRC: Interface Cost to General Ledger followed by Journal Import followed by PRC: Tieback process. But in R12 user only need to run PRC: Generate Cost Accounting Events which will register events in SLA and thereafter SLA will take care of accounting the transaction and interfacing it to GL. There is no tieback process in R12, as there is one to one reference of event id between SLA and sub ledger tables.

Other Oracle Table Information http://oracleappsviews.blogspot.com/2012/06/apps-tables-with-links.html#!/2012/06/apps-tableswith-links.html XLA_AE_HEADERS XAH, XLA_AE_LINES XAL, xla.XLA_TRANSACTION_ENTITIES XTE, XLA_DISTRIBUTION_LINKS XDL, XLA_EVENTS XEVENT R12 Error while running PRC: Create Accounting The application accounting definition Projects Standard Accounting owned by Oracle is not validated. Please validate the application accounting definition or update the application accounting definitions contained in the subledger accounting method Standard Accrual. Solution Run Program Validate Application Accounting Definitions with Ledger and Application Details.

Transaction data not found in XLA_TRANSACTION_ENTITIES


Why are there differences in SELECT * FROM XLA_TRANSACTION_ENTITIES and SELECT * FROM XLA.XLA_TRANSACTION_ENTITIES ? [ID 946314.1]

Solution Query useing xla.xla_transaction_entities

http://oracle.anilpassi.com/mo-global-dive-into-r12-multi-org-design.html
R12: How to Set the ORG_ID (org context) Before Running a Statement in SQL*Plus? [ID 753178.1] 1. The SQL command to set the ORG_ID prior to running a script is: SQL> exec mo_global.init('AR'); exec mo_global.set_policy_context('S','&org_id'); 2. Enter the org_id when prompted. exec fnd_global.apps_initialize(11787,20707,201); exec mo_global.init ('PO');

Posted by ADF OAF Tech at 8:02 PM No comments: Email ThisBlogThis!Share to TwitterShare to Facebook

Saturday, November 3, 2012


ADF Java Data Types

Type Name Array BFileDomain BigDecimal BlobDomain Boolean Byte Char Character ClobDomain DBSequence Date Double

Java Type oracle.jbo.domain.Array oracle.jbo.domain.BFileDomain java.math.BigDecimal oracle.jbo.domain.BlobDomain java.lang.Boolean java.lang.Byte oracle.jbo.domain.Char java.lang.Character oracle.jbo.domain.ClobDomain oracle.jbo.domain.DBSequence oracle.jbo.domain.Date java.lang.Double

Groovy Type java.math.BigDecimal oracle.jbo.domain.BlobDomain java.lang.Boolean java.lang.Byte java.lang.String java.lang.Character oracle.jbo.domain.ClobDomain java.lang.Long java.sql.Date java.lang.Double

Float Integer Long NClobDomain Number Object OrdAudioDomain OrdDocDomain OrdImageDomain

java.lang.Float java.lang.Integer java.lang.Long oracle.jbo.domain.NClobDomain oracle.jbo.domain.Number java.lang.Object oracle.ord.im.OrdAudioDomain oracle.ord.im.OrdDomain oracle.ord.im.OrdImageDomain

java.lang.Float java.lang.Integer java.lang.Long oracle.jbo.domain.NClobDomain java.lang.Long java.lang.Object oracle.ord.im.OrdAudioDomain oracle.ord.im.OrdDomain oracle.ord.im.OrdImageDomain

OrdImageSignatureDo oracle.ord.im.OrdImageSignatureD oracle.ord.im.OrdImageSignatureDo main omain main OrdVideoDomain REF Raw RowID Short String Timestamp TimestampLTZ oracle.ord.im.OrdVideoDomain oracle.sql.REF oracle.jbo.domain.Raw oracle.jbo.domain.RowID java.lang.Short java.lang.String oracle.jbo.domain.Timestamp oracle.ord.im.OrdVideoDomain java.lang.String java.lang.Short java.lang.String java.sql.Timestamp java.sql.Timestamp

oracle.jbo.domain.TimestampLTZ java.sql.Timestamp

TimestampTZ oracle.jbo.domain.TimestampTZ Posted by ADF OAF Tech at 1:15 PM No comments: Email ThisBlogThis!Share to TwitterShare to Facebook

Thursday, November 1, 2012


ADF Generic Code and Information
ADF Blogs https://blogs.oracle.com/shay/entry/new_adf_blogs http://andrejusb-samples.blogspot.com/
Donatas Valys - http://donatas.nicequestion.com Eugene Fedorenko - http://adfpractice-fedor.blogspot.com Deepak C S - http://deepakcs.blogspot.com Timo Hahn - http://tompeez.wordpress.com Amr Gawish - http://mdlwr.amr-gawish.com Mahmoud A. ElSayed - http://mahmoudoracle.blogspot.com Sameh Nassar - http://sameh-nassar.blogspot.com/

Mohammad Jaber - http://mjabr.wordpress.com/ Srinivas Jilla - http://learn-adf.blogspot.com/ Dimitrios Stasinopoulos - http://dstas.blogspot.com/ Chris Muir - https://blogs.oracle.com/onesizedoesntfitall/ Eduardo Rodrigues/Fbio Souza - http://java2go.blogspot.com https://blogs.oracle.com/aramamoo/ http://ramannanda.blogspot.com/

Some WebCenter blogs with good ADF related content: WebCenter A-Team - https://blogs.oracle.com/ATEAM_WEBCENTER/ John Brunswick - http://www.johnbrunswick.com/ George Maggessy - http://george.maggessy.com

And of course Frank Nimphius Code Corner http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

Backing Bean Handy Codes http://biemond.blogspot.com/2009/03/some-handy-code-for-backing-beans-adf.html ADF with OAF https://blogs.oracle.com/jruiz/entry/adf_and_oracle_e_business2 ADF get Current Row Attribute Value import oracle.adf.model.BindingContext; import oracle.adf.model.binding.DCBindingContainer; import oracle.adf.model.binding.DCIteratorBinding; import oracle.jbo.domain.Number; .... DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("XxTestStgVO1Iterator"); Number attItemId = (Number)iterBind.getCurrentRow().getAttribute("ItemId");

Accessing Data Controls and Bindings Access AM DCBindingContainer bc = getBindingContainer(); MyAppModule myAM = (MyAppModule)bc.findDataControl("MyAppModuleDataControl").getDataProvider(); Getting Attribute from Iterator Binding

DCBindingContainer bc = getBindingContainer(); String ename = (String)bc.findIteratorBinding("EmpIter").getCurrentRow().getAttribute("EName"); Access Binding Container with Convenience API BindingContainer bc = BindingContext.getCurrent().getCurrentBindingEntry(); Programmatic Commit import oracle.adf.model.BindingContext; import oracle.binding.BindingContainer; import oracle.binding.OperationBinding; .... BindingContext bindingContext = BindingContext.getCurrent(); BindingContainer bindings = bindingContext.getCurrentBindingsEntry(); OperationBinding commitOper = (OperationBinding) bindings.get("Commit"); commitOper.execute(); Alternate Keys http://docs.oracle.com/cd/E28280_01/web.1111/b31974/bcentities.htm#CJACCDID

How to programmatically access ADF binding values


FacesContext fctx = FacesContext.getCurrentInstance(); ELContext elctx = fctx.getELContext(); Application application = fctx.getApplication(); ExpressionFactory exprFactory = application.getExpressionFactory(); ValueExpression valueExpr = exprFactory.createValueExpression( elctx, "#{bindings.DepartmentId.inputValue}", Object.class); oracle.jbo.domain.Number departmentId = null; departmentId = (oracle.jbo.domain.Number) valueExpr.getValue(elctx); ADF LOV https://blogs.oracle.com/prajkumar/entry/create_lov_in_adf_application http://www.baigzeeshan.com/2010/03/how-to-create-adf-lov-with-view.html 1)Create LOVVO or ViewCriteria for MasterLookup table depending on your condition. 2)Open VO and its attribute on which you want to create List Of Values. Click on List of Values -> Add. It will open Form and default List Of Values name. a)In Configuration Enter ListDataSource as LOV VO or ViewAccessor or Master Lookup TableVO. In case of MasterLookupTableVO after adding DataSource click edit to add ViewCriteria. b)Mention ListAttribute name. 3)In UI Hints you can add Meaning or Description columns.

ADF Set on Current row after Rollback Execute or page refresh http://oracleadf-java.blogspot.in/2012/10/set-on-current-row-after-rollback.html?goback= %2Egde_1801839_member_180755619 DCIteratorBinding Iter = (DCIteratorBinding)bindings.get("<YourIteratorName>"); Key parentKey = Iter.getCurrentRow().getKey(); BindingContainer binding = getBindings(); OperationBinding RollbackBdg = binding.getOperationBinding("Rollback"); RollbackBdg.execute(); OperationBinding ExcBdg = binding.getOperationBinding("Execute"); ExcBdg.execute(); Iter.setCurrentRowWithKey(parentKey.toStringFormat(true));

VO WHERE Clause at Runtime ViewObject vo = am.findViewObject("<YourViewObject>"); String whereClause = " Emp_id = 10"; vo.setWhereClause(whereClause); vo.setOrderBy(orderByClause);

Using Named Bind Variables ViewObject vo = am.findViewObject("<YourViewObject>"); vo.setNamedWhereClauseParam("pEmpId",10); vo.executeQuery(); Add named Bind Variables at Runtime vo.setWhereClause(" emp_id = :pEmpId"); vo.defineNamedWhereClauseParam("pEmpId,null,null); vo.setNamedWhereClauseParam(pEmpId,10);

View Criteria Programmatically ViewCriteria vc = <yourVO>.createViewCriteria(); ViewCriteriaRow HeadDeptRow = vc.createViewCriteriaRow(); ViewCriteriaRow MaintDeptRow = vc.createViewCriteriaRow(); HeadDeptRow.setAttribute("DeptId",10); MaintDeptRow.setAttribute("DeptId",20); vc.addElement(HeadDeptRow); vc.addElement(MaintDeptRow);

<yourVO>.applyViewCriteria(vc); <yourVO>.executeQuery();

Iterate through VO inside VOImpl RowSetIterator iter = createRowSetIterator(null); while (iter.hasNext()) { Row r = iter.next(); System.out.println("Ename *** VoImpl " + r.getAttribute("Ename")); // Do something with the current row. } // close secondary row set iterator iter.closeRowSetIterator(); or Row row; while ((row = this.next()) != null) { System.out.println("Ename " + row.getAttribute("Ename"));

What are validation Options in ADF ? I)Business services: a)ADF BC Metadata (declarative validation) Java (programmatic validation) b)Database (PL/SQL) II)User interface

ADF Logging in Deployed Apps https://blogs.oracle.com/groundside/entry/adf_logging_in_deployed_apps? utm_source=dlvr.it&utm_medium=twitter

ADF - Passing Parameter Value between Pages https://www.youtube.com/watch?v=4eyzBiIf5MM https://www.youtube.com/watch?v=wrpciIzIN9A&feature=related

ADF Create with Parameters http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params169140.pdf http://andrejusb.blogspot.com/2011/02/createwithparams-operation-for-oracle.html

ADF Bounded and Unbounded Task Flows

Managed Bean and Backing Bean Managed Bean can be configured in a)adfc-config b)Task Flow Definition File Backing Bean on page can be created while a)Creating new jsf/jspx or jsfff b)After creation go to Page Design . Tools --> Design --> Page Properties --> Component Binding Click Auto Binding if you want all components on page to be included in Backing bean with acccessors. JSF ADF LifeCycle

Custom Phase Listener http://docs.oracle.com/cd/E12839_01/web.1111/b31974/adf_lifecycle.htm#CIAJGBID for fragments you should extend oracle.adf.model.RegionController http://adfpractice-fedor.blogspot.com/2012/02/understanding-immediate-attribute.html

Diif in af:commandButton,af:commandLink and af:goButton,af:goLink Command Submit requests and fire action event when activated. Typically ued for internal validation. Go Navigate directly without server side actions. Do not use control flow rules. Typically used for external validation. Implementing Security https://forums.oracle.com/forums/thread.jspa?threadID=2216386 http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/adding_security.htm#BABD EICH http://download.oracle.com/docs/cd/E17904_01/web.1111/e13707/atn.htm http://e-ammar.net/Oracle_TIPS/filtering_adf_pgaes_based_on_log.htm http://ramannanda.blogspot.com/2011/09/opss-adf-security-utility.html ADF Working with Popups http://www.adftips.com/2010/10/adf-ui-popuputil-class-to-show-or-hide.html

Oracle Forms to ADF From Forms to ADF - When, Why, How? https://www.youtube.com/watch?v=C4Dz8zO623U When-Validate-Record in Forms --> Add Entity Level Validation(Business Rules) in ADF. http://jdeveloperandadf.blogspot.com/2011/02/oracle-adf-interview-questions-and.html

ADF Multi Choice List http://myadfnotebook.blogspot.com/2010/09/getting-string-value-or-item-code-of.html https://blogs.oracle.com/jdevotnharvest/entry/how_to_access_selected_rows ADF Date Format Conversion http://mahmoudoracle.blogspot.com/2012/03/date-classes-conversion-in-adf.html ADF Using doDML protected void doDML(int operation, TransactionEvent e) { // super.doDML(i, transactionEvent);

if(operation == DML_INSERT){ Date vDate = getCurrentDateWithTime(); setCreationDate(vDate); } http://andrejusb.blogspot.com/2012/05/how-to-update-data-from-db-view-using.html http://jneelmani.blogspot.com/2012/01/adf-11g-get-user-name-role.html ADF Skip Validation on Page http://andrejusb.blogspot.com/2012/12/skip-validation-for-adf-required-tabs.html Open page definition file and select root tag in the structure window. Go to Properties window and search for SkipValidation property. Set SkipValidation to true: Diff in Vo.getFetchedRowCount() and Vo.getRowCount() http://andrejusb.blogspot.com/2011/08/difference-between-fetched-row-count.html To String BigDecimal big = new BigDecimal("987654321"); String str = big.toString(); Export to PDF BI Publisher Integration or Jasper Reports http://www.ramkitech.com/2011/11/jsf-jpa-jasperreports-ireport.html https://pinboard.in/search/u:OracleADF?query=BI_Publisher http://jdevelopertips.blogspot.com/2009/08/integrating-bi-publisher-into-jdevelo.html http://www.vogella.com/articles/JavaPDF/article.html https://forums.oracle.com/forums/thread.jspa?threadID=2198973 https://forums.oracle.com/forums/thread.jspa?threadID=2320987 some of the links are on that threads. http://sameh-nassar.blogspot.com/2009/10/using-jasper-reports-with-jdeveloper.html

Static Class or Static methods can not be instantiated. System Files Location C:\Users\<user_home>\AppData\Roaming\JDeveloper\system11.1.1.5.37.60.13 Popup Not Closing on clicking any button. Fix -- af:popup Auto Cancel Enabled

Column value entered in Popup and after Closing popup it removes all previously entered records. Fix -- Change Auto Submit property to True for previuos fields.

How to import custom classes from model to view controller in adf? Right click your ViewController project > Project properties > Dependencies > Select Model and click the pencil. Here you select 'Build output' and press OK twice. Rebuild your application and you should be able to access classes from your model in your viewcontroller. File Download http://smconsultants.in/file-download-in-adf/ Display selected table row number and total rows https://blogs.oracle.com/jdevotnharvest/entry/display_selected_table_row_number eg. Row #{(bindings.EmpVO1Iterator.rangeStart < 0 ? 1 : bindings.EmpVO1Iterator.rangeStart+1) + ( bindings.EmpVO1Iterator.currentRowIndexInRange == -1 ? 0 : bindings.EmpVO1Iterator.currentRowIndexInRange)} of #{bindings.EmpVO1Iterator.estimatedRowCount} Summit Application https://blogs.oracle.com/jdevotnharvest/entry/adf_summit_sample_application_a ADF Logger https://blogs.oracle.com/groundside/entry/adventures_in_logging_index

ADF Refresh http://jjzheng.blogspot.com/2010/11/manually-refresh-row-in-table-after.html Data Dirty http://oracleadfhowto.blogspot.com/2012/03/iterator-uncommitted-data-availability.html


#{!bindings.Commit.enabled} #{!controllerContext.currentRootViewPort.dataDirty} #{!controllerContext.currentViewPort.dataDirty} #{!bindings.EmployeesView1Iterator.dataControl.TransactionDirty}

http://adfbugs.blogspot.com/2009/12/pending-changes-in-adf-application.html http://adfsnippets.blogspot.com/

AM Handle from Bean http://ioracle-erp.blogspot.com/2012/08/different-ways-of-getting-handle-to-am.html AM acces from VO ViewObjectImpl.getApplicationModule()

ADF Performance Tuning http://docs.oracle.com/cd/E16764_01/core.1111/e10108/adf.htm#BDCCCEAB http://www.gebs.ro/blog/oracle/adf-view-object-performance-tuning-analysis/ Contextual Events http://www.oracle.com/technetwork/developertools/adf/learnmore/regionpayloadcallbackpattern-1865094.pdf ADF Page Variables to Store Data. http://andrejusb.blogspot.com/2011/10/page-definition-variables-to-store.html 1)Create Page Variable in Page Definition P_INPUT 2)Add Page Variable in Bindings as _var(Just to rename) P_INPUT_VAR 3)On Input Text put as Value #{bindings.P_INPUT_VAR.inputValue} 4)From Backing bean access String vinput = (String)evaluateEL("#{bindings.P_INPUT_VAR.inputValue}"); public static Object evaluateEL(String el) { FacesContext facesContext = FacesContext.getCurrentInstance(); ELContext elContext = facesContext.getELContext(); ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory(); ValueExpression exp = expressionFactory.createValueExpression(elContext, el, Object.class); return exp.getValue(elContext); }

ADF InputText Field Suffix From Navaneetha https://forums.oracle.com/forums/thread.jspa?threadID=2190564

<af:panelFormLayout id="pfl1"> <af:panelLabelAndMessage id="plam2" label="#{bindings.Email.hints.label}"> <af:inputText value="#{bindings.Email.inputValue}" required="#{bindings.Email.hints.mandatory}" columns="#{bindings.Email.hints.displayWidth}" maximumLength="#{bindings.Email.hints.precision}" shortDesc="#{bindings.Email.hints.tooltip}" id="it1" simple="true"> <f:validator binding="#{bindings.Email.validator}"/> </af:inputText> <f:facet name="end"> <af:outputText value="@SubbanaSolutions.com" id="ot1"/> </f:facet> </af:panelLabelAndMessage> </af:panelFormLayout> 1) Ensure that the label for the component is set in the af:panelLabelAndMessage 2) For the inner component, set simple="true" so that there is no label displayed for it.

ADF EL Expression Calling Method from EL Expression http://technology.amis.nl/2009/12/04/adf-security-simple-el-expression-to-check-if-user-has-arole/ Calling EL from Bean http://www.oracle.com/technetwork/developer-tools/adf/learnmore/003-advanced-el-tips169117.pdf

ADF Search Form http://docs.oracle.com/cd/E23943_01/web.1111/b31974/web_search_bc.htm http://www.baigzeeshan.com/2010/04/creating-simple-search-form-in-oracle.html ADF Programmatically Select check boxes http://umeshagarwal24.blogspot.com/2012/06/selectdeselect-all-check-box-in-table.html ADF Download FIle http://hasamali.blogspot.com/2011/09/download-file-in-oracle-adf-gui.html ADF Regular Expression Validation <af:inputText label="Email Validation" id="it1" binding="#{backingBeanScope.backing_MainPage.it1}"> <af:validateRegExp pattern="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Zaz]{2,4}" messageDetailNoMatch="The value {1} is not a valid email address:"/>

</af:inputText> https://forums.oracle.com/forums/thread.jspa?threadID=972049 Posted by ADF OAF Tech at 6:13 AM No comments: Email ThisBlogThis!Share to TwitterShare to Facebook

Saturday, October 27, 2012


OAF Generic Questions

Difference between fire Action and firePartialAction?


FireAction is used to Submit the whole Form and whole page will render again. FirePartialAction is user for Partial Page Rendering(PPR). It will not cause whole page to render again. It causes only partial refresh of page. Fire Action will do the form submit , cause entire page to be rendered . FirePartial Action ( Similar to AJAX in java application ) only part of the page gets rendered or refreshed .

LOV firePartialAction
if (pageContext.isLovEvent()) { // // if ("myLovInput".equals(lovInputSourceId)) // { // logic begins here // } }

MOAC(Multi Org Access Control) in OA Framework


http://mukx.blogspot.in/2009/04/moacmulti-org-access-control-in-oa.html OAF Dynamic VO http://anuj-oaframeworkblog.blogspot.com/2009/09/create-run-time-vo-in-oa-framework.html http://apps2fusion.com/apps/14-fwk/353-controller-extension-sql-pl-sql

In CO Pls Refer http://apps2fusion.com/apps/14-fwk/353-controller-extension-sql-pl-sql for details //First get the Application Module OAApplicationModule oam = pageContext.getApplicationModule(webBean); //Lets say I need to get the description of FND_USER Names ANILPASSI String sWhereClauseValue = "ANILPASSI" ; //Build the select statement for this on the fly view object String xxOnTheFlyVOQuery = "select description xxdesc from fnd_user "; //Specify the Where Clause for the same xxOnTheFlyVOQuery = xxOnTheFlyVOQuery + "where user_name = :1 "; //First see if this VO is already attached to view object ViewObject xxOnTheFlyViewObject = oam.findViewObject("xxFNDUserDescVO"); if(xxOnTheFlyViewObject == null) xxOnTheFlyViewObject = oam.createViewObjectFromQueryStmt("xxFNDUserDescVO", xxOnTheFlyVOQuery); //By now we are sure that the view object exists xxOnTheFlyViewObject.setWhereClauseParams(null); //Set the where clause xxOnTheFlyViewObject.setWhereClauseParam(0, sWhereClauseValue); xxOnTheFlyViewObject.executeQuery(); oracle.jbo.Row row = xxOnTheFlyViewObject.first(); //get the value of description column from View Object record returned if(row != null) { String mSupHierarchyUsed = row.getAttribute(0).toString(); System.out.println("Result from Dynamic VO is =>" + mSupHierarchyUsed ); } //Remove the view object, as this is no longer required xxOnTheFlyViewObject.remove();

Embedding Custom Region Inside Standard OAF Pages


https://blogs.oracle.com/manojmadhusoodanan/entry/embedding_custom_region_inside_standar d

OAF Generic http://imdjkoch.wordpress.com/tag/oaf/

Integrating XML Publisher and OA Framework


http://apps2fusion.com/at/51-ps/260-integrating-xml-publisher-and-oa-framework http://bipublisher.blogspot.com/2008/03/bi-publisher-bip-in-oa-framework-part-1.html

Abstract Classess and Methods


An abstract class can not be instantiated. Abstract methods must be implemented by subclassess. When you declare abstract method, you provide only signature for method, which comprises name,argument list and return type. Abstract class does not provide body. Each concrete subclass must override the method and provide its body. Public abstract class InventoryItem{ abstract boolean isRentable(); } eg. public abstract class OAEntityImpl extends OAJboEntityImpl { ... public abstract void setCreationDate(Date date); ... } Abstract classess can contain method that are not declared as abstract. Those method can be overriden by subclassess. Interfaces An interface is like fully abstract class. -- All its methods are abstract. -- All variables are public static final. An interface lists a set of method signature without code details. A class that imlements interface must provide code details for all methods of the interface. A class can implement many interfaces but can extend only one class.

Exposing AM Methods to Controller


package xx.oracle.apps.pa.conthrrt; import oracle.jbo.ApplicationModule; public interface xxConthrrtAM extends ApplicationModule { int getConcReqId(String pAppName, String pCpName); int ContExistCheck(String ContSso); oracle.jbo.domain.Date castToJBODate(String aDate); }

public class xxConthrrtAMImpl extends OAApplicationModuleImpl implements xx.oracle.apps.pa.conthrrt.xxConthrrtAM {

In CO Use import xx.oracle.apps.pa.conthrrt.server.xxConthrrtAMImpl; int cReqId; cReqId = -9; xxConthrrtAMImpl amObject = (xxConthrrtAMImpl)pageContext.getApplicationModule(webBean); String pAppName = "GEPSPA"; String pCpName = "GEPS_PA_CONTRATE_PRG"; cReqId = amObject.getConcReqId(pAppName,pCpName);

Using DFF in OA Framework https://blogs.oracle.com/manojmadhusoodanan/entry/adding_descriptive_flex_field_dff http://www.slideshare.net/ngcoders2001/steps-to-enable-dff-on-oaf-form http://pradeep-krishnan.blogspot.com/2012/06/personalization-and-creating-custom-dff.html

OAF Personalizations Information from Tables http://www.project.eu.com/e-business-suite/querying-the-oa-framework-personalizationrepository/ Upgrading Form Personalizations and OA Framework Personalizations from Oracle E-Business Suite Release 11i to 12.1 [ID 1292611.1] https://forums.oracle.com/forums/thread.jspa?messageID=10497398&#10497398 https://forums.oracle.com/forums/thread.jspa?messageID=10471005&#10471005

SELECT PATH.PATH_DOCID PERZ_DOC_ID, jdr_mds_internal.getdocumentname(PATH.PATH_DOCID) PERZ_DOC_PATH FROM JDR_PATHS PATH WHERE PATH.PATH_DOCID IN (SELECT DISTINCT COMP_DOCID FROM JDR_COMPONENTS WHERE COMP_SEQ = 0 AND COMP_ELEMENT = customization AND COMP_ID IS NULL) ORDER BY PERZ_DOC_PATH;

Lov VO Personalization http://easyapps.blogspot.com/2010/07/personalization-of-oaf-page-lov-column.html Lov Vo Extension http://imdjkoch.wordpress.com/2011/10/29/how-to-customize-a-lov-in-oaf-vo-extension/ Posted by ADF OAF Tech at 7:37 PM No comments: Email ThisBlogThis!Share to TwitterShare to Facebook

Thursday, October 25, 2012


Oracle AME Notes
AME responsibilities in 11i.AME.A are assigned directly to the users. However, In R12 or 11i.AME.B and higher, AME responsibilities are assigned indirectly to users through roles. The roles are assigned to the users by the SYSADMIN user using the User Management responsibility. Once the roles are assigned, the AME responsibilities are automatically available to the users without specifically assigning the AME responsibilities to the users.

Oracle Approvals Management Implementation Guide Rel 11i Part No. B25324-01, MetaLink Note 336901.1 Oracle Approvals Management Developers Guide Release AME.B, MetaLink Note 289927.1 How to Implement the Invoice Approval Workflow, MetaLink Note 269057.1 Oracle Payables Users Guide 11i Part No. A81180-07 Oracle Approvals Management Not Enabled? What does it take to

Enabled It?, MetaLink Note 413300.1 About Oracle Approvals Management Minipack B, MetaLink Note 336004.1 ====================================================== How to create Approval Transaction Type for AME.B or Higher Metalink Note 420387.1

How To Setup And Use AME For Purchase Requisition Approvals [ID 434143.1]
How to Diagnose Issues in Building Requisition Approval List Metalink Note 412833.1 How to create the Approval Transaction Type for AME.A Metalink Note 420381.1 FAQ's on AME11i Metalink Note 431815.1 11.5.10 FAQ Approvals Management Integration for iProcurement and Purchasing Metalink Note 293315.1

Examples http://oraclemaniac.com/2012/03/31/oracle-approvals-management-ame-setup-and-testingprocess/ Posted by ADF OAF Tech at 2:20 PM No comments: Email ThisBlogThis!Share to TwitterShare to Facebook

Wednesday, October 24, 2012


ADF call managed bean from EL Expression Language
Passing parameters to managed bean methods using EL https://blogs.oracle.com/jdevotnharvest/entry/passing_parameters_to_managed_bean_method_us ing_el ADF function call from EL statement in jspx page http://adf-tools.blogspot.com/2010/09/adf-function-call-from-el-statement-in.html

Posted by ADF OAF Tech at 12:21 PM No comments: Email ThisBlogThis!Share to TwitterShare to Facebook

Tuesday, October 23, 2012


R12 GL Changes
R12-GL Tables and Changes Reference http://www.club-oracle.com/forums/r12-gl-tables-and-changes-t4912/ http://krishnareddyoracleapps.blogspot.com/2012/06/r12-general-ledger-changes.html

Table Name Feature Area Replaced By GL_IEA_AUTOGEN_MAP Global Intercompany System Advanced Global Intercompany System feature GL_IEA_CLEARING_ACCOUNTS Global Intercompany System Advanced Global Intercompany System feature GL_IEA_IMPORT_REGISTRY Global Intercompany System Advanced Global Intercompany System feature GL_IEA_INTERFACE Global Intercompany System Advanced Global Intercompany System feature GL_IEA_RECUR_BATCHES Global Intercompany System Advanced Global Intercompany System feature GL_IEA_RECUR_LINES Global Intercompany System Advanced Global Intercompany System feature GL_IEA_SEGMENT_MAP Global Intercompany System Advanced Global Intercompany System feature GL_IEA_SEGMENT_RULE_MAP Global Intercompany System Advanced Global Intercompany System feature GL_IEA_TRANSACTION_LINES Global Intercompany System Advanced Global Intercompany System feature GL_IEA_TRANSACTION_TYPES Global Intercompany System Advanced Global Intercompany System feature

GL_IEA_TRANSACTIONS Global Intercompany System Advanced Global Intercompany System feature GL_INTERCOMPANY_ACC_SETS Global Intercompany System Advanced Global Intercompany System feature GL_INTERCOMPANY_ACCOUNTS Global Intercompany System Advanced Global Intercompany System feature GL_MC_BOOK_ASSIGNMENTS Setup Forms and Programs GL_LEDGER_RELATIONSHIPS GL_MC_CONVERSION_RULES Setup Forms and Programs GL_JE_INCLUSION_RULES GL_MC_REPORTING_OPTIONS Setup Forms and Programs GL_LEDGER_RELATIONSHIPS GL_OASIS_FIN_ASSIGNMENTS Financial Intelligence GL_OASIS_FIN_ITEMS Financial Intelligence GL_OASIS_FIN_METRICS Financial Intelligence GL_OPEN_INTERIM Balances and Related Objects GL_POSTING_INTERIM GL_SETS_OF_BOOKS Setup Forms and Programs GL_LEDGERS GL_SHARES_ACTIVITY Financial Intelligence GL_SHARES_OUTSTANDING Financial Intelligence GL_SYSTEM_SETUP Setup Forms and Programs Relevant columns were moved to the GL: Number of formulas to validate for each MassAllocation batch, GL: Number of formulas to validate for each Recurring Journal batch and GL: Archive Journal Import Data profile options GL_TRANSLATION_RATES Revaluation, Translation and Conversion Rates GL_DAILY_RATES RG_DSS_DIM_SEGMENTS Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_DIMENSIONS

Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_HIERARCHIES Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_HIERARCHY_DETAILS Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_REQUESTS Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_SEG_RANGE_SETS Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_SEG_RANGES Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_SYSTEM_SEG_ORDER Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_SYSTEM_VARIABLES Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_SYSTEMS Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_VAR_DIMENSIONS Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_VAR_SELECTIONS Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_VAR_TEMPLATES Financial Analyzer Enterprise Planning and Budgeting product RG_DSS_VARIABLES Financial Analyzer Enterprise Planning and Budgeting product New Views A number of new views have been added to support UIs and processing of new features. Some of the views are mentioned below. View Name Feature Area GL_ACCESS_SET_LEDGERS Setup Forms and Programs GL_ALC_LEDGER_RSHIPS_V

Setup Forms and Programs GL_AUTOREV_CRITERIA_SETS_V Journal Entry GL_BUDGET_ASSIGNMENTS_UNIQUE_V Budgets and Related Objects GL_BUDORG_BC_OPTIONS_V Budgets and Related Objects GL_DEFAS_ASSIGNMENTS_V Setup Forms and Programs GL_DEFAS_RESP_ASSIGN_V Setup Forms and Programs GL_ENTERED_CURRENCIES_V Balances and Related Objects GL_HISTORICAL_RATES_PERIOD_V Revaluation, Translation and Conversion Rates GL_JE_LINES_RECON_V Journal Entry GL_LEDGER_LE_BSV_SPECIFIC_V Setup Forms and Programs GL_LEDGER_LE_V Setup Forms and Programs GL_LEDGER_NAMES_V Setup Forms and Programs GL_LEDGER_NORM_BSVS_V Setup Forms and Programs GL_LEDGER_SET_ASSIGNMENTS_V Setup Forms and Programs GL_LEDGER_SET_NORM_ASSIGN_V Setup Forms and Programs GL_LEDGER_SETS_V Setup Forms and Programs GL_LEDGERS_PUBLIC_ALL_V Setup Forms and Programs GL_LEDGERS_PUBLIC_V Setup Forms and Programs GL_LEDGERS_V Setup Forms and Programs GL_REC_BATCHES_LOV_V Recurring Journals and Budgets GL_SECONDARY_LEDGER_RSHIPS_V Setup Forms and Programs GL_SETS_OF_BOOKS Setup Forms and Programs GL_SUMMARY_BC_OPTIONS_V Summarization GL_SUMMARY_TEMPLATES_V

Summarization GL_TRANSLATION_RATES Revaluation, Translation and Conversion Rates Changed Views All views used to support Discoverer workbooks have been updated as necessary to uptake the data model changes. Views that retrieve balances have been updated as necessary to retrieve entered ledger currency balances. A large number of other views have also been updated to uptake various data model changes. Some changed views are highlighted below. View Name Feature Area Brief Description of Change GL_SETS_OF_BOOKS_V Setup Forms and Programs Modify to refer to GL_LEDGERS instead of GL_SETS_OF_BOOKS GL_TAX_CODES_V Setup Forms and Programs Modify to uptake new eTax data model Obsoleted Views A number of views related to Global Intercompany System and Oracle Financial Analyzer have been obsoleted. Some other obsolete views are mentioned below. View Name Feature Area Replaced By GL_ALL_JE_CATEGORY_NAME_VIEW Setup Forms and Programs GL_ALLOC_BATCHES_ACTIVE_V MassAllocations, Budgets and Encumbrances GL_AUTOPOST_OPTIONS_CURRENT_V Posting GL_CONS_FLEXFIELD_MAP_HIGH Consolidation and Eliminations GL_CONS_FLEXFIELD_MAP_LOW Consolidation and Eliminations GL_JE_BATCHES_AP_V Journal Entry GL_JE_HEADERS_LOV_V Journal Entry GL_MC_BOOKS_ASSIGNMENTS_V Setup Forms and Programs GL_MRC_REPORTING_SOB_PROFILE_V Setup Forms and Programs GL_PERIOD_STATUSES_REV_BUD_V Setup Forms and Programs GL_TRANS_BUDGET_PERIODS_V Revaluation, Translation and Conversion Rates GL_TRANS_PERIODS_BSV_V

Revaluation, Translation and Conversion Rates GL_TRANSLATION_RATES_CURR_V Revaluation, Translation and Conversion Rates GL_TRANSLATION_RATES_PERIODS_V Revaluation, Translation and Conversion Rates GL_TRANSLATION_RATES_V Revaluation, Translation and Conversion Rates GL_TRANSLATION_TRACKING_V Revaluation, Translation and Conversion Rates RG_REPORT_STANDARD_AXES_V Financial Statement Generator

Das könnte Ihnen auch gefallen