Posts

Oracle JET with Firebase Realtime Database (Part 1)

Image
Oracle JET with Firebase Realtime Database (Part 1)
With Firebase Realtime Database we can store and sync data in NoSQL database.  It is a cloud database and data store as JSON. There are SDKs for iOS, Android and JavaScript. you can find information about Firebase in this link: https://firebase.google.com/docs/database/
In this post, I want to explain how can we use firebase database as backend and Oracle JET as frontend.
1. Firstly we need to login in Firebase Cloud console. https://firebase.google.com/
2. After login to Firebase on the first page, there is "Add Project". I click on Add project".

3. display a popup for creating a project: Project name: JetApplication ProjectId: - Country/region: Germany


4. After creating the project, I am in Start page on Firebase Cloud. There are three icons for iOS, Android, Web.

5. I click on the "Add Firebase to your web app". Display popup with some information about initializing Firebase.
6. Create Oracle JET project and create a fo…

Oracle JET module communication

Image
How can call method from another module1. As see the picture I have a project.
The Main page and two sub page as person and department.



2. In my mainPage.html define two buttons to call a function from another module. Change Person and Change Employee. Also, we have to set two module person and department.
In my person.html and department.html, there is an input text.

3. Finally, you can see in this picture how this code works it.


Git Project Link: https://github.com/hamedoracle/JetCommunication.git

ADF Filter LOV View Object , af:selectOneChoice Programmatically

Image
Filter LOV and populate selectOneChoice Programmatically In This post, I want to filter LOV View object before loading to the page,1. I have main.xml as taskflow, frag1.jsfffrag2.jsff as fragment and index.jsf as page.


2. drag main.xml taskflow and drop into the index.jsf page als region.

3.there is a employee list in frag1.jsff and employee form in frag2.jsff for editing.



4.with edit button in frag1.jsff we navigate to the frag2.jsff.


5. drag a af:selectonechoice component and drop into the frag2.jsff.

6. set #{bindings.DepartmentId.inputValue} as value and #{pageFlowScope.EmployeeBean.customList} for the selectItems component.


7.the EmployeeBean managebean is as blow.



8. in Department viewobject there is viewceriteria that I initialse bind variabale and apply viewceriteria with the code, and set the resultl into the lov .

Oracle ADF Composite Primary Key

Image
In this Post discuss about Oracle ADF Composite Primary Key Bug,
There is a bug in Oracle ADF when we have a composite primary key in table and we want to insert into to this column, especially when one of the primary key columns is foreign key,
Problem:

I made a sample for this problem.

1. We have two Table Organisation for Master Table and Bemerkung for Detail Table,(Master-Detail)


2. also there are two pages with one task flow.


3. In The Master page, there is a form for organization and table for bemerkung. via Edit button we go to the Detail page for edit the Bemerkung(Detail)

4.after click to Edit button we go to the Detail page. In this, via + Button we want to Insert into Bemerkung. Here Onr and Seite is Composite primary Key,

5.After insert automatically onr set with number becauase is master and get form master .

6. So we Enter the data for Seite and Name column.

7. After commit we see Exception like this two pictures,




This is the bug from ADF to support Composite Key.
Solution:
8.In view…

Oracle ADF Table colspan

Image
How can we use colspan in Oracle ADF Table Component:
1. I change the query of department as below:

2.Create View Object from above Query,
3.Drag and drop as read only table in jsf page.

4.set render for the column that we want to show as colspan

5. set ColSpan when inx is 0 then colSpan 5(because we have 5 column) and 
when inx is 1 then colSpan 1(show as normally).
6. After run application.