Tuesday 26 May 2015

Oracle ADF: Basic Concepts

What is Auto Submit?
It is related to an input component such as inputText and selectOneChoice or a table select component.When you use with component it is value will be automatically submitted.

What is Partial Submit?
It is related to a command component such as button,command link.The page partially submits when the button or link is clicked.

What is PPR(Partial Page Rendering)?
It is used to dynamically refresh the part of page.It is done with the use of partial triggers.

What is the use of Action Listener?
It is used to when you want execute some logic and to stay on the page itself.

Syntax:
public void yourActionListenerName(ActionEvent actionEvent)
{

}

What is use of Action?
It is used when you want to execute some logic before navigating to another page.

Syntax:
public String yourActionName() 
{
// Add event code here...
       return null;
}

Flow of immediate=true:

For Input component(inputText,selectOneChoice):
Restore View->Apply Request Values->Process Validations->Update Model->Invoke App->Render Response 

For Command component(button,command link):
Restore View->Apply Request Values->Render Response //skip validations part

Tuesday 19 May 2015

Oracle ADF - How to reuse the taskflow of one application into another application.

Steps :
1.) Create a fusion web application let say Rahul_apps1.



2.) Create a bounded taskflow and drop a view on it.



3.) Click on your view and create a hello.jsff page.



4.) Double click the view controller project.In the project properties dialog, click the Deployment section.Create a new deployment profile by clicking the New option.In the archive type select the ADF library jar file as shown below.



5.) Deploy the project using the newly created deployment profile



6.) Create a another application  and go to file system connection in the resource palette
to point to that directory as shown below. Give some connection name and in the directory
path, point to the jar file deployed directory.Select the deployment and say add to the
project as shown below.



7.) Drop taskflow on your .jspx page.



8.) Run your page.

Monday 18 May 2015

How To Apply ADF Skinning In Your Fusion Web Application By Rahul Sharma

What is CSS?

CSS stands for Cascading Style Sheets.Basically it is a style language which is used for defines
the layout of html documents.It covers fonts, colors, margins, lines, height, width, background images, advanced positions and many other things.

Steps to apply CSS in Fusion Web Application(ADF).

1.) Create your Fusion Web Application(ADF).
2.) Create an xml file called trinidad-skins.xml under view-controller WEB-INF and put this below
code.

<?xml version="1.0" encoding="windows-1252" ?>
<skins xmlns="http://myfaces.apache.org/trinidad/skin">
<skin>
<id>lspskin.desktop</id>
<family>sharmaskin</family>   //must be same as you defined in trinidad-config.xml
<extends>blafplus-rich.desktop</extends>
<style-sheet-name>css/my.css</style-sheet-name>
</skin>
</skins>

3.) In trinidad-config.xml, add the below 3rd line.

<?xml version="1.0" encoding="windows-1252"?>
<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
<skin-family>sharmaskin</skin-family>
</trinidad-config>

4.) my.css file code.

body
{
background :white ;
}
af|inputText.lspCustomSkin::content  
{
background-color: Fuchsia;
}
af|inputText.lspCustomSkin::label
{
background-color: Orange;
color: Aqua;
}

If you getting any error in you css file then Go to - Tools - Preferences - CSS Editor - Check ADF
Extension Check Box - Press OK.

5.) Test.jspx Page Code.

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:inputText label="Rahul Sharma" id="it1" styleClass="lspCustomSkin"/>
</af:form>
</af:document>
</f:view>
</jsp:root>

You want to see the your modify CSS results without restarting the web application.
Go to web.xml file context parameters set this context parameter value true.

org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION = true.

Now just deploy your application with this parameter and modify your CSS code then press
F5.You can see the changes.








Thursday 14 May 2015

INSTALLATION OF LOGSTASH, ELASTICSEARCH AND KIBANA by Rahul Sharma

In this post, We are going to talk about how to perform log analytic's using Logstash,
Elasticsearch and Kibana.To start with, we will see how to install this software's on
windows.

What is Logstash?

Logstash is a tool for managing events and logs for your application etc.You can use it to
collect logs,parse them, and store them for later user.One of the best features it has is, you
can read the logs in certain formats(e.g. Apache Logs, NGnix Logs, SysLogs etc) and put
them into Elastic Search.

Installation Of Logstash On Windows :

You can download Logstash from this download here url.Here we have downloaded version
logstash-1..4.2.tar.gz. Now unzip this downloaded file at your desired location.

Steps to ready the logstash environment :

1.) Set the java home in environment vaiables and logstash.bat file.
2.) Go to logstash bin directory.

And that's it, logstash is ready to use.

What is Elasticsearch?

Elasticsearch is a standalone database server, written in Java, that takes data in and stores it in a sophisticated format optimized for language based searches. Working with it is convenient as
its main protocol is implemented with HTTP/JSON. Elasticsearch is also easily scalable,
supporting clustering and leader election out of the box.

Installation Of Elasticsearch On Windows :

Download latest Elasticsearch zip file from download here location and unzip it in your suitable directory.

Steps to run the Elasticsearch:

1.) Set the java path in environment vaiables(No needed if already is set).
2.) Go to elasticsearch bin directory type elasticsearch press enter.

This will start the Elasticsearch service.

What is Kibana?

Kibana is a JavaScript library which allows us to create beautiful dashboard reports using elasticsearch data.

Installation Of Kibana On Windows :

Download Kibana 4 from download here url. Just unzip the zip file and save it in folder.Kibana configuration is very easy, simply edit config/kibana.yml to add the elasticsearch url and done.
Open config/kibana.yml and update property elasticsearch_url: "http://localhost:9200".

Steps to run the Kibana:

1.) Set the java path in environment vaiables(No needed if already is set).
2.) Go to kibana bin directory type kibana press enter.

For Kibana GUI open this url http://localhost:5601/

Enjoy!!