Profile cover photo
Profile photo
StudyEasy Organization
12 followers -
Fantastic content maker and fabulous presenters.
Fantastic content maker and fabulous presenters.

12 followers
About
StudyEasy Organization's posts

Post has attachment
**


Post has attachment
Sample model in JSF : Database connectivity.
public class DBHelper {     String getEmail(){         Connection conn = GetConnection();     Statement myStmt = null; ResultSet myRs = null; String email = null; try{ String sql = "select * from users"; myStmt = conn.createStatement(); myRs = myStmt.execut...

Post has attachment
JSF template (Sample)
Header ****************************************************************** <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"     xmlns:h...

Post has attachment
JSF 2.2 Dependencies for Maven
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2....

Post has attachment
Custom Validation ManagedBean Method sample
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {  String test = value.toString();  if(!test.endsWith("@studyeasy.org")){  throw new ValidatorException(new FacesMessage("Value is invalid!"));  }       }

Post has attachment
How to get both label and value from ManagedBean (JSF)
ManagedBean _____________________________________________________________________________ import java.util.LinkedHashMap; import java.util.Map; import javax.faces.bean.ManagedBean; @ManagedBean public class CakeFlavors { private Map<String,String> listFla...

Post has attachment
**
JSF namespace HTML  <html xmlns = "http://www.w3.org/1999/xhtml" xmlns:h = "http://java.sun.com/jsf/html" >

Post has attachment
Onclick javascript confirm button
Needs to be added on a HTML tag < a href="URL" onclick="if (!(confirm('Are you sure to perform this action ?'))) return false"> URL label </a>

Post has attachment
import Java into JSP page
 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"     pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" conten...

Post has attachment
**

Wait while more posts are being loaded