Wednesday, 28 June 2017

ADF : ADF Table not displaying rows 1st time.

ADF : ADF Table not displaying rows 1st time.


If we are using <af:quickQuery component against VO (ADF table), always we should mark "Query Automatically" checked, other wise rows will not be displayed 1st time when we land to the page.

Sunday, 23 April 2017

JavaScript: Read WebCam and take snap shot

JavaScript: Read WebCam and take snap shot


<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>

</head>
<body>
<video id="video"></video>
<canvas id="canvas"></canvas><br>
<button onclick="snap();">Snap</button>
<script type="text/javascript">
alert("coming11");
var video = document.getElementById('video');
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
alert("coming22");
navigator.getUserMedia = navigator.getUserMedia ||
navigator.webkidGetUserMedia ||
navigator.monzGetUserMedia ||
navigator.oGetUserMedia ||
navigator.msGetUserMedia;
alert("coming3");
if(navigator.getUserMedia){
navigator.getUserMedia({video:true}, streamWebCam, throwError);
}

function streamWebCam (stream) {
video.src = wendow.URL.createObjectURL(stream);
video.play();
}

function throwError (e){
alert(e.name);
}

function snap(){
canvas.width=video.clientWidth;
canvas.height=video.height;
canvas.drawImage(video,0,0);
}
</script>
</body>
</html>

https://www.youtube.com/watch?v=K_NP_a78Jpk

Webcam integrating with java code - http://webcam-capture.sarxos.pl/



Friday, 31 March 2017

ADF : REST and WebService

ADF : REST and WebService



RESTService


         https://www.youtube.com/watch?v=aEWqOMQ2a_c

Consuming REST application


        https://www.youtube.com/watch?v=1ujo8c-2UTo

#########################################################################################

WebService


           https://www.youtube.com/watch?v=Cos1qSn4EvU

Consuming WebService application


          https://www.youtube.com/watch?v=yDms-WIYoUw

Thursday, 23 March 2017

ADF : BC : Errors faced.

ADF : BC : Errors faced.

1. Missing bind parameter 1


         ObjectDetailsEO.IMPORT_OBJECT_ID = :Bind_ImportObjectId





2. ADF : BC : Fetch more than 500 Rows



3. JBO-25083: Cannot create a secondary iterator on row set ImportObjectsVO_ImportObjectDetails_ImportObjectsVOToImportObjectDetailsVo_ImportObjectDetailsVO_1 because the access mode is forward-only or range-paging




4. ViewObject -> Entity Usage -> Inner Join / Left outer join



Thursday, 19 January 2017

ADF : Serializable

ADF : Serializable


All the managed beans should be serializable because the container may occassionally serialize and passivate the beans or send it over the network. This occurs in situations 
such as heavy load (our case) or when clustering is enabled.

Another tip:

- The managed beans with pageFlow or session scope are required to be serialized while backingBean or request scope are not required to be serialized.

- The ADF/JSF Rich UI components are not serializable and hence they should not be present in pageFlow scope managed beans.

Response: Your pageFlowScope bean should implements Serializable.


Eg:


Possibility 1:



Possibility 2:







Possibility 3:








Possibility 4:


Report


By setting this in java option we will get to know the issues in diagnostic or em logs.

-Dorg.apache.myfaces.trinidad.CHECK_STATE_SERIALIZATION=all

check : http://hasamali.blogspot.in/2011/09/adf-jsf-adfc-scope-object-serialization.html



About - serialVersionUID


The serialVersionUID is used as a version control in a Serializable class. If you do not explicitly declare a serialVersionUID, JVM will do it for you automatically, based on various aspects of your Serializable class

Check - https://www.mkyong.com/java-best-practices/understand-the-serialversionuid/





How Server does Serialization and Deserialization

A simple way to write / serialize the UserBean object into a file – “c:\\UserBean.ser”.


FileOutputStream fout = new FileOutputStream("c:\\UserBean.ser");
ObjectOutputStream oos = new ObjectOutputStream(fout);
oos.writeObject(UserBean Obj);




A simple way to read / deserialize the UserBean object from file – “c:\\UserBean.ser”.



  FileInputStream fin = new FileInputStream("c:\\UserBean.ser");
  ObjectInputStream ois = new ObjectInputStream(fin);
  UserBean = (UserBean) ois.readObject();