Stream

 
Import data from XLS and XLSX (Excel) to #ADF Table Using #ApachePOI
1
Add a comment...

muhammad wasem

Discussions  - 
 
any one could tell me whats wrong here
i am trying to verify my username and password from database but sql exception arises and did not connect to database.....


package adf.test.app.view;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

import oracle.jdbc.OracleDriver;


public class LoginBean {
private String userName;
private String password;

public void setUserName(String userName) {
this.userName = userName;
}

public String getUserName() {
return userName;
}

public void setPassword(String password) {
this.password = password;
}

public String getPassword() {
return password;
}

public String doLogin() {
String un = userName;
byte[] pw = password.getBytes();
FacesContext ctx = FacesContext.getCurrentInstance();
Connection conn;
try{
conn = getConnection();

Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery ("SELECT digest('"+un+"','"+pw+"') FROM dual");//a function where i encrypt password
ResultSet rset_password = stmt.executeQuery ("select password from fnd_users where upper(user_name)=upper('"+un+") ");//encrypted password stored here


if (rset.equals(rset_password)) {
/// System.out.println("Matched");
FacesMessage msg;
msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Matched", "Matched");
ctx.addMessage(null, msg);

}
else{
System.out.println("Not Matched");
FacesMessage msg;
msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Username ="+un +" Password ="+pw, " Password ="+un +"Username ="+pw);
ctx.addMessage(null, msg);
}
}
catch (SQLException e) {
FacesMessage msg;
msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "SQLException", "SQLException");
ctx.addMessage(null, msg);
}


return null;
}
public static Connection getConnection() throws SQLException {
String username = "WASEEM";
String password = "SSS7878";
String thinConn = "jdbc:oracle:thin:@192.168.1.13:1521:TESTDB";
DriverManager.registerDriver(new OracleDriver());
Connection conn =
DriverManager.getConnection(thinConn, username, password);
conn.setAutoCommit(false);
return conn;
}

}

1
Ashish Awasthi's profile photoOmar Abdullwahhab's profile photo
3 comments
 
Better way to create a data source in the application server and use the following ...code


import java.sql.Connection;

import javax.naming.Context;
import javax.naming.InitialContext;

import javax.sql.DataSource;

public class ConnectionManager {

static Connection connection = null;
public static Connection getConnection() {
if(connection == null){
try {
Context ctx = new InitialContext();
DataSource ds= (DataSource) ctx.lookup("yourDS");
connection = ds.getConnection();
} catch (SomeException e) {
//handle your exce
}
}
return connection;
}

public static void close() {
if (connection != null) {
try {
connection .close();
} catch (SomeException e) {
//E handling code goes here
}
}
}
}
Add a comment...

muhammad wasem

Discussions  - 
 
Any one could tell me that how to make login bean in oracle adf and how to validate username and pass word from database. plaese share javabean or vedio tutotrial.
I will be thank full
2
muhammad wasem's profile photomunir sheikh's profile photo
8 comments
 
How to add user Authorization from tables in weblogic Policy Store

Add a comment...
 
New blog post Uploading mulitiple files to server path in #ADF using af:inputFile
http://www.awasthiashish.com/2017/01/uploading-mulitiple-files-to-server.html
Hello All :) Previously I have posted about uploading and downloading files from server path (Refer this post for more clarification), In that post I have described the process of uploading single file at a time but sometimes...
1
Add a comment...

Wahid Rezgui

Questions  - 
 
HOW TO CALL PL/SQL function and put the result into field 
1
Ashish Awasthi's profile photoWahid Rezgui's profile photo
3 comments
 
Thanks , yes I called the function in AM it works fine but when creating a page i want to execute this function and put the result which is simple number to a binded field as proposition to the user to create new row

Add a comment...
 
#ADF Basics: Duplicate Record Validation Using Model Level Business Rules
Hello All Hope you all are doing well :) When we are creating any data entry form , at that time preventing duplicate entries for some of attributes is very basic validation requirement . Suppose We are creating a form to mak...
1
Add a comment...
 
Timo Hahn originally shared:
 
This post shows how to implement a use case where you don’t want the user to leave a field which has a validation error. ADF does a good job enforcing that all validations are checked at the time you submit the data. However, if you want the user to…
This post shows how to implement a use case where you don’t want the user to leave a field which has a validation error. ADF does a good job enforcing that all validations are checked at the …
1
Add a comment...

Hazi Rony

Discussions  - 
 
Remember-One thing first -We are excepting the term "JDeveloper".,it's some how become OK beyond error/s of machine/s.,but The Holy Truth is advancement meaning including Javascript-an Oracle2-3-5 etc version application+there is Font matters too++?/The Mujjaded Alpha Tulut Rahmakumullah Hafez AlAllah-Chief Editor-StateExpressBangladesh[Convention Constitution-Human Rights & TQMS based first Global Review-Journal-Magazine Online
1
Timo Hahn's profile photoChris Muir's profile photo
2 comments
 
Account banned.
Add a comment...
 
Oracle ADF - Strategic Oracle Technology
A blog about ADF, JDeveloper, JET, Cloud, NetBeans, BPM, Mobile, MAF, SOA, WebCenter
1
Add a comment...
 
Learn about new ADF BC REST feature in 12.2.1.2
A blog about ADF, JDeveloper, JET, Cloud, NetBeans, BPM, Mobile, MAF, SOA, WebCenter
5
Add a comment...

About this community

For anyone who uses Oracle's JDeveloper, ADF and other ADF related technologies. Before posting have a look at the style of previous posts to see what this group will allow. Please no spamming, keep discussions polite, no job ads (that's for LinkedIn), no boring press releases (hint hint marketing/sales people), we're not interested in your 500 IT training courses, nothing illegal, and we reserve the right to kick you off this group and change the rules at anytime because you're being a sod. As a reminder the JDev OTN Forums remains the best place to ask technical questions and seek help on JDev/ADF. The ADF EMG is a great place for questions around best practices and methodologies. And this G+ group is a location for bloggers and others to share information and content, as well details about events and online training that is relevant to JDeveloper and ADF. Community language: English
 
#ADF Basics: Duplicate Record Validation Using Custom Java Method
2
Add a comment...

Dinesh kumar.p

Questions  - 
 
Hi All,

I need one help in ADF, I created Pivot table in JSF Page. I want to download in PDF format as a file.

Let me know how to procedure.

I have Export in Excel Format, but I need pdf format.


2
Omar Abdullwahhab's profile photoDinesh kumar.p's profile photo
2 comments
 
ya thanks,,jasper report working..

Let me know It's possible to add one extra column in pivot table (custom calculation of sub total )
Add a comment...
 
Horn up your ADF Skills and learn WebCenter Portal 12c...
1
Add a comment...
 
feel in love to ADF
1
muhammad wasem's profile photo
 
good-- could you share me how to validate username and password from database in oracle adf
Add a comment...
 
 
Quo vadis ADF?
Thoughts on the future of ADF.
Last week I attended DOAG Konferenz & Ausstellung in Nürnberg Germany. The DOAG (Deutsche ORACLE-Anwendergruppe e.V.) is the biggest German Oracle user group. The conference covers all Oracle p…
2
Add a comment...
 
hamed roknizadeh originally shared:
 
Oracle ADF Composite Primary Key Bug
Oracle ADF, Composite Primary Key, Oracle ADF Composite Primary Key, Oracle ADF Table Multi Primary Key, oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type,
1
Add a comment...
 
Hi all.
I have a question regarding JavaScript api.
When calling Adf table method...getRows()
What exaclty it should return ?
The number of the visible rows ?
Or the number of rows of the model behind , for example an Adf VO ?.


1
Add a comment...
 
Another year filled with memories and joyous times has passed Another year filled with endless possibilities and happiness has come You all have made my year very special, and I wish a very Happy New Year to all of you ...
3
Add a comment...
 
Custom method call workaround for JDeveloper 12.2.1.2 wizard issue
A blog about ADF, JDeveloper, JET, Cloud, NetBeans, BPM, Mobile, MAF, SOA, WebCenter
2
Add a comment...