It works but the output is broken :)

This commit is contained in:
2024-03-21 17:08:36 -05:00
parent 39b0da17b9
commit 118d95a69d
219 changed files with 7927 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>10-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>gfv700ee10</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
<netbeans.hint.jdkPlatform>JDK_11__System_</netbeans.hint.jdkPlatform>
<org-netbeans-modules-projectapi.jsf_2e_language>Facelets</org-netbeans-modules-projectapi.jsf_2e_language>
</properties>
</project-shared-configuration>

View File

@@ -0,0 +1,48 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.slcc.asdv.caleb</groupId>
<artifactId>TermProject1_CalebFontenot</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>TermProject1_CalebFontenot-1.0-SNAPSHOT</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jakartaee>10.0.0</jakartaee>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>${jakartaee}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>13.0.5</version>
<classifier>jakarta</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,13 @@
package edu.slcc.asdv.caleb.termproject1_calebfontenot;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
/**
* Configures Jakarta RESTful Web Services for the application.
* @author Juneau
*/
@ApplicationPath("resources")
public class JakartaRestConfiguration extends Application {
}

View File

@@ -0,0 +1,24 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import java.io.Serializable;
import java.util.ArrayList;
/**
*
* @author A. V. Markou
*/
@Named(value = "matrixBeanA")
@ViewScoped
public class MatrixBeanA implements Serializable
{
ArrayList<ArrayList<String>> matrix = new ArrayList<ArrayList<String>>();
}

View File

@@ -0,0 +1,26 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import org.primefaces.PrimeFaces;
/**
*
* @author A. V. Markou
*/
@Named(value = "matrixBeanB")
@ViewScoped
public class MatrixBeanB implements Serializable
{
ArrayList<ArrayList<String>> matrix = new ArrayList<ArrayList<String>>();
}

View File

@@ -0,0 +1,24 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
/**
*
* @author A. V. Markou
*/
@Named(value = "matrixBeanC")
@ViewScoped
public class MatrixBeanC implements Serializable
{
ArrayList<ArrayList<String>> matrix = new ArrayList<ArrayList<String>>();
}

View File

@@ -0,0 +1,42 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import jakarta.inject.Inject;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.ArrayList;
/**
*
* @author A. V. Markou
*/
@Named(value = "matrixOperations")
@ViewScoped
public class MatrixOperations implements Serializable
{
@Inject
MatrixBeanA matrixA;
@Inject
MatrixBeanB matrixB;
@Inject
MatrixBeanC matrixC;
public String add(){return "";}
public String multiply(){return "";}
public MatrixBeanC getMatrixC(){return this.matrixC;}
public MatrixBeanA getMatrixA(){return matrixA;}
public MatrixBeanB getMatrixB(){return matrixB;}
}

View File

@@ -0,0 +1,64 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.faces.application.FacesMessage;
import jakarta.faces.application.FacesMessage.Severity;
import jakarta.faces.context.FacesContext;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import jakarta.inject.Inject;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.primefaces.PrimeFaces;
@Named(value = "menuBar")
@ViewScoped
public class MenuBar implements Serializable
{
@Inject
MatrixOperations matrixOperations;
private List<List<Object>> menus = new ArrayList<List<Object>>();
public void add()
{
System.out.println("Menu multiply was called");
matrixOperations.multiply();
List<String> idsC = new ArrayList<>();
idsC.add("formC");
idsC.add("formC:datatableC");
idsC.add("formC:datatableC:columnsC");
idsC.add("formC:datatableC:columnsC:inputTextC");
//idsC.add("form-menu");//:menuBar:submenu_matricies:menuitem_add");
PrimeFaces.current().ajax().update(idsC);
}
public void multiply()
{
message(
FacesMessage.SEVERITY_INFO,
"Not implemented.", "To be implemented."
);
}
public void subtract()
{
message(
FacesMessage.SEVERITY_INFO,
"Not implemented.", "To be implemented."
);
}
public void message(Severity severity, String msg, String msgDetails)
{
FacesMessage m = new FacesMessage(severity, msg, msgDetails);
FacesContext.getCurrentInstance().addMessage("msg", m);
}
}

View File

@@ -0,0 +1,261 @@
package edu.slcc.asdv.bl;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.RecursiveTask;
/**
*
* @author A. V. Markou
*/
public class Matrices implements Matrix
{
@Override
public ArrayList<ArrayList<BigInteger>> addParallel(ArrayList<ArrayList<BigInteger>> A, ArrayList<ArrayList<BigInteger>> B)
{
RecursiveTask<ArrayList<ArrayList<BigInteger>>> rt
= new Matrices.MatricesAddition(0, A.size() - 1, A, B);
ForkJoinPool pool = new ForkJoinPool();
ArrayList<ArrayList<BigInteger>> result = pool.invoke(rt);
return result;
}
@Override
public ArrayList<ArrayList<BigInteger>> multiplyParallel(ArrayList<ArrayList<BigInteger>> A, ArrayList<ArrayList<BigInteger>> B)
{
RecursiveTask<ArrayList<ArrayList<BigInteger>>> rt
= new Matrices.MatricesMultiplication(0, A.size() - 1, A, B);
ForkJoinPool pool = new ForkJoinPool();
ArrayList<ArrayList<BigInteger>> result = pool.invoke(rt);
return result;
}
static class MatricesAddition extends RecursiveTask<ArrayList<ArrayList<BigInteger>>>
{
ArrayList<ArrayList<BigInteger>> A;
ArrayList<ArrayList<BigInteger>> B;
ArrayList<ArrayList<BigInteger>> AplusB;
final int HOW_MANY_ROWS_IN_PARALLEL = 100;//threshold
int startIndex;
int endIndex;
public MatricesAddition(int startIndex, int endIndex,
ArrayList<ArrayList<BigInteger>> A,
ArrayList<ArrayList<BigInteger>> B)
{
this.startIndex = startIndex;//start at this row of the matrix
this.endIndex = endIndex;//end at this row of the matrix
this.A = A;
this.B = B;
AplusB = new ArrayList<ArrayList<BigInteger>>();
}
@Override
protected ArrayList<ArrayList<BigInteger>> compute()
{
//>>This is the addition of matrices in the IF.
//That is, HOW_MANY_ROWS_IN_PARALLEL from matrix A and HOW_MANY_ROWS_IN_PARALLEL from matrix B
if (this.endIndex - this.startIndex < HOW_MANY_ROWS_IN_PARALLEL)
{
ArrayList<ArrayList<BigInteger>> resultC = new ArrayList<ArrayList<BigInteger>>();
for (int i = this.startIndex; i <= this.endIndex; ++i)
{
//>create a new row to add it to the resulting matrix resultC
ArrayList<BigInteger> rowAplusB = new ArrayList<BigInteger>();
for (int j = 0; j < A.get(0).size(); j++)
//>get the Ith row from A and the Ith row from B and
//and add all the Jth entries from each row
{
BigInteger x = A.get(i).get(j);
BigInteger y = B.get(i).get(j);
BigInteger z = x.add(y);
rowAplusB.add(z);
}
resultC.add(rowAplusB);
}
return resultC;
}
else
{ //>> keep on FORKING the matrix until the
//side of the matric is equal or less to HOW_MANY_ROWS_IN_PARALLEL
int mid = (this.endIndex + this.startIndex) / 2;
RecursiveTask<ArrayList<ArrayList<BigInteger>>> firstHalf
= new MatricesAddition(this.startIndex, mid, A, B);
RecursiveTask<ArrayList<ArrayList<BigInteger>>> secondHalf
= new MatricesAddition(mid + 1, this.endIndex, A, B);
firstHalf.fork();//this line will invoke method compute
secondHalf.fork();///this line will invoke method compute
//>> join what the FORKs returned from the IFs
AplusB.addAll(firstHalf.join());
AplusB.addAll(secondHalf.join());
return AplusB;
}
}
}
/**
* Multiples two lists one 1-t01 correspondence, that is the 1st element of
* the first list is multiplied with 1st elements of the second list and so
* on
*
* @param list1
* @param list2
* @return the multiplied results
*/
public static ArrayList<BigInteger> multiplyLists(ArrayList<BigInteger> list1, ArrayList<BigInteger> list2)
{
ArrayList<BigInteger> resultsOfMultiplications = new ArrayList<BigInteger>();
for (int bi = 0; bi < list1.size();
++bi)
{
resultsOfMultiplications.add(list1.get(bi).multiply(list2.get(bi)));
}
return resultsOfMultiplications;
}
public static ArrayList<ArrayList<BigInteger>> columnMajorOrderReversal(ArrayList<ArrayList<BigInteger>> b)
{
ArrayList<ArrayList<BigInteger>> tranformed = new ArrayList<ArrayList<BigInteger>>();
for (int column = 0;
column < b.get(0).size();
++column)
{
ArrayList<BigInteger> rowTrandormedToColmn = new ArrayList<BigInteger>();
for (int row = 0;
row < b.size();
++row)
{
BigInteger bd = b.get(row).get(column);
rowTrandormedToColmn.add(bd);
}
tranformed.add(rowTrandormedToColmn);
}
return tranformed;
}
/**
* Adds a list of Big Decimals and returns the result of the addition.
*
* @param list - list of BigDecimal type
* @return the sum of the list
*/
public static BigInteger add(ArrayList<BigInteger> list)
{
BigInteger bd = BigInteger.ZERO;
for (int bi = 0; bi < list.size();
bi++)
{
bd = bd.add(list.get(bi));
}
return bd;
}
static class MatricesMultiplication extends RecursiveTask<ArrayList<ArrayList<BigInteger>>>
{
ArrayList<ArrayList<BigInteger>> A;
ArrayList<ArrayList<BigInteger>> B;
ArrayList<ArrayList<BigInteger>> AxB;
final int HOW_MANY_ROWS_IN_PARALLEL = 3;//threshold
int startIndex;
int endIndex;
public MatricesMultiplication(int startIndex, int endIndex,
ArrayList<ArrayList<BigInteger>> A,
ArrayList<ArrayList<BigInteger>> B)
{
this.startIndex = startIndex;//start at this row of the matrix
this.endIndex = endIndex;//end at this row of the matrix
this.A = A;
this.B = B;
AxB = new ArrayList<ArrayList<BigInteger>>();
}
/**
* matrix 1, 2, 3 4, 5, 6
*
* will be transformed to 1, 4 2, 5 3, 6
*
* @param list
* @return
*/
@Override
protected ArrayList<ArrayList<BigInteger>> compute()
{
//>>This is the addition of matrices in the IF.
//That is, HOW_MANY_ROWS_IN_PARALLEL from matrix A and HOW_MANY_ROWS_IN_PARALLEL from matrix B
if (this.endIndex - this.startIndex < HOW_MANY_ROWS_IN_PARALLEL)
{
ArrayList<ArrayList<BigInteger>> resultC = new ArrayList<ArrayList<BigInteger>>();
ArrayList<ArrayList<BigInteger>> bTransformed = columnMajorOrderReversal(B);
for (int biA = this.startIndex;
biA <= this.endIndex;
++biA)
{
ArrayList<BigInteger> rowA = A.get(biA);
ArrayList<BigInteger> rowAxB = new ArrayList<BigInteger>();
ArrayList<BigInteger> rowCalculation = new ArrayList<BigInteger>();
for (int biB = 0;
biB < bTransformed.size();
++biB)
{
ArrayList<BigInteger> rowB = bTransformed.get(biB);
ArrayList<BigInteger> productsOfRow = multiplyLists(rowA, rowB);
BigInteger sumOfRow = add(productsOfRow);
rowCalculation.add(sumOfRow);
}
resultC.add(rowCalculation);
}
return resultC;
}
else
{ //>> keep on FORKING the matrix until the
//side of the matric is equal or less to HOW_MANY_ROWS_IN_PARALLEL
int mid = (this.startIndex + this.endIndex) / 2;
RecursiveTask<ArrayList<ArrayList<BigInteger>>> firstHalf
= new MatricesMultiplication(this.startIndex, mid, A, B);
RecursiveTask<ArrayList<ArrayList<BigInteger>>> secondHalf
= new MatricesMultiplication(mid + 1, this.endIndex, A, B);
firstHalf.fork();//this line will invoke method compute
secondHalf.fork();///this line will invoke method compute
//>> join what the FORKs returned from the IFs
AxB.addAll(firstHalf.join());
AxB.addAll(secondHalf.join());
return AxB;
}
}
}
}

View File

@@ -0,0 +1,19 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java to edit this template
*/
package edu.slcc.asdv.bl;
import java.math.BigInteger;
import java.util.ArrayList;
/**
*
* @author ASDV1
*/
public interface Matrix
{
ArrayList<ArrayList<BigInteger>> addParallel(ArrayList<ArrayList<BigInteger>> A, ArrayList<ArrayList<BigInteger>> B);
ArrayList<ArrayList<BigInteger>> multiplyParallel(ArrayList<ArrayList<BigInteger>> A, ArrayList<ArrayList<BigInteger>> B);
}

View File

@@ -0,0 +1,20 @@
package edu.slcc.asdv.caleb.termproject1_calebfontenot.resources;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Response;
/**
*
* @author
*/
@Path("jakartaee10")
public class JakartaEE10Resource {
@GET
public Response ping(){
return Response
.ok("ping Jakarta EE")
.build();
}
}

View File

@@ -0,0 +1,123 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.utilities;
import jakarta.el.ELContext;
import jakarta.el.ELResolver;
import jakarta.faces.application.Application;
import jakarta.faces.application.FacesMessage;
import jakarta.faces.component.UIComponent;
import jakarta.faces.context.FacesContext;
import java.math.BigInteger;
import java.util.ArrayList;
public class Utilities
{
public static UIComponent findComponent(String id)
{
UIComponent result = null;
UIComponent root = FacesContext.getCurrentInstance().getViewRoot();
if (root != null)
{
result = findComponent(root, id);
}
return result;
}
public static UIComponent findComponent(UIComponent root, String id)
{
UIComponent result = null;
if (root.getId().equals(id))
{
return root;
}
for (UIComponent child : root.getChildren())
{
if (child.getId().equals(id))
{
result = child;
break;
}
result = findComponent(child, id);
if (result != null)
{
break;
}
}
return result;
}
public static void printIDs(UIComponent component)
{
System.out.println("\n\nPARENT ID " + component.getId());
if (component.getChildren() == null)
{
return;
}
for (UIComponent child : component.getChildren())
{
System.out.println("\t\tCHILD ID " + child.getId());
printIDs(child);
}
}
public static boolean isNumberOrDecimal( String s )
{
System.out.println("isNumberOrDecimal called " + s);
//[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)
String regx = "^[+-]?(\\d*\\.)?\\d+$";
return s.matches(regx);
}
public static void message( FacesMessage.Severity severity, String msg, String msgDetails)
{
FacesMessage m = new FacesMessage(severity, msg, msgDetails);
FacesContext.getCurrentInstance().addMessage("msg", m);
}
public static <T> T getCDIBean(String nameOfTheBean)
{
ELContext elc = FacesContext.getCurrentInstance().getELContext();
FacesContext fc = FacesContext.getCurrentInstance();
Application ap = fc.getApplication();
ELResolver elr = ap.getELResolver();
return (T) elr.getValue(elc, null, nameOfTheBean);
}
public static ArrayList<ArrayList<String>> convertBigIntegerToString(ArrayList<ArrayList<BigInteger>> matrix)
{
ArrayList<ArrayList<String>> stringMatrix = new ArrayList<ArrayList<String>>();
for (ArrayList<BigInteger> row : matrix)
{
ArrayList<String> stringRow = new ArrayList<String>();
for (BigInteger bigInt : row)
{
stringRow.add(new String(bigInt.toString()));
}
stringMatrix.add(stringRow);
}
return stringMatrix;
}
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="3.0" xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd">
<!-- Define Persistence Unit -->
<persistence-unit name="my_persistence_unit">
</persistence-unit>
</persistence>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="all">
</beans>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="6.0" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd">
<context-param>
<param-name>jakarta.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
</web-app>

View File

@@ -0,0 +1,56 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
<title></title>
</h:head>
<h:body>
<ui:composition
template="resources/templates/generic/generic-layout.xhtml">
<ui:param name="wrapperWidth" value="80%"/>
<ui:define name="title">
Application Software Development, SLCC
</ui:define>
<ui:define name="top">
Templates, and Menus Illustration
</ui:define>
<ui:param name="loginsearch" value="true"/>
<ui:define name="logo"> </ui:define>
<ui:define name="login">
<ui:include src="/login-n-search/login.xhtml"/>
</ui:define>
<ui:define name="search">
<ui:include src="/login-n-search/search.xhtml"/>
</ui:define>
<ui:define name="menu">
<ui:include src="/matrices/menuMatrices.xhtml">
<ui:param name = "isMenu" value="true" />
</ui:include>
</ui:define>
<ui:param name="left" value="false"/>
<!-- if we do NOT want right to appear, set right to false -->
<ui:param name="right" value="false"/>
<ui:param name="content" value="true"/>
<ui:define name="content">
<ui:include src="/matrices/compose.xhtml"/>
</ui:define>
<ui:define name="bottom">ASDV 2800 , Templates</ui:define>
</ui:composition>
<br />
</h:body>
</html>

View File

@@ -0,0 +1,25 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:f5="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
<title>Login</title>
>
</h:head>
<h:body>
<ui:composition>
<h:form id="loginFormId">
<h:inputText styleClass="inputs" value="" f5:type="email" f5:placeholder="E-mail"/>
<h:inputSecret styleClass="inputs" value="" f5:placeholder="Password"/>
<h:commandButton styleClass="lbutton" value="Login"/>
</h:form>
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,21 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f5="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
<title>Login</title>
>
</h:head>
<h:body>
<ui:composition>
<h:form id="searchFormId">
<h:inputText styleClass="inputs" value="" f5:type="email" f5:placeholder="Search"/>
<h:commandButton styleClass="lbutton" value="Search!"/>
</h:form>
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,26 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<ui:fragment>
<p:panelGrid columns="3" >
<p:column >
<ui:include src="/matrices/matrixA.xhtml"/>
</p:column>
<p:column >
<ui:include src="/matrices/matrixB.xhtml"/>
</p:column>
<p:column >
<ui:include src="/matrices/matrixC.xhtml"/>
</p:column>
</p:panelGrid>
</ui:fragment>
</h:body>
</html>

View File

@@ -0,0 +1,24 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>MatriX A</title>
<h:outputStylesheet name="css/layout-css/dataTable.css" />
<h:outputScript library="js" name="do_validation.js"/>
</h:head>
<h:body>
<h:form id="form_matrix_A">
<p:tooltip globalSelector="true"/>
<p:growl id="id_messageA" showDetail="true"/>
<h3>Matrix A</h3>
<h4>DataTable of dynamically created of input-texts</h4>
</h:form>
</h:body>
</html>

View File

@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>MatriX A</title>
</h:head>
<h:body>
<h:form id="form_matrix_B">
<h3>Matrix B</h3>
<h4>DataTable of dynamically created of input-texts</h4>
</h:form>
</h:body>
</html>

View File

@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>MAtrix C</title>
</h:head>
<h:body>
<h:form id="formC" >
<h3> Matrix C = A menu-operation B </h3>
</h:form>
</h:body>
</html>

View File

@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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="jakarta.faces.html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Menu Matricies</title>
</h:head>
<h:body>
<ui:fragment rendered="#{isMenu eq 'true' ? true : false}">
<p:tooltip globalSelector="true"/>
<h:form id="form_menu">
<p:growl id="id_message" showDetail="true"/>
<p:menubar id="menuBar">
<p:submenu id="submenu_matricies" label="Matrix" icon="pi pi-table">
<p:menuitem title="Addition" id ="menuitem_add" value="Add" disabled="false"
action="#{menuBar.add()}" icon="pi pi-plus" update="id_message"/>
<p:menuitem title="Multiplication" id ="menuitem_multiply" value="Multiply" disabled="false"
action="#{menuBar.multiply()}" icon="pi pi-plus" update="id_message"/>
<p:menuitem title="Subtraction" id ="menuitem_subtract" value="Subtract" disabled="false"
action="#{menuBar.subtract()}" icon="pi pi-plus" update="id_message"/>
</p:submenu>
</p:menubar>
</h:form>
</ui:fragment>
</h:body>
</html>

View File

@@ -0,0 +1,39 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
<title>Menu</title>
</h:head>
<h:body>
<ui:fragment rendered="#{ isMenu eq 'true' ? true : false}">
<p:tooltip globalSelector="true"/>
<h:form id="form_menu">
<p:growl id="id_message" showDetail="true"/>
<p:menubar id="menuBar">
<p:submenu id ="submenu_matrices"
label="Matrix" icon="pi pi-table">
<p:menuitem title="This does addition"
id ="menuitem_add" value="Add" disabled="false"
action="#{menuBar.add()}"
icon="pi pi-plus" update="id_message "/>
<p:menuitem icon="pi pi-times" title="Multiplication"
id ="menuitem_multiply" value="Multiply"
disabled="false"
action="#{menuBar.multiply()}"
update="id_message"/>
<p:menuitem title="Subtraction" id ="menuitem_subtract" value="Subtract"
action="#{menuBar.subtract}" disabled="false"
icon="pi pi-minus" update="id_message"/>
</p:submenu>
</p:menubar>
</h:form>
</ui:fragment >
</h:body>
</html>

View File

@@ -0,0 +1,18 @@
#bottom {
margin: 0px 0px 0px 0px;
text-align:center;
color: #ffffff;
background-image: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, blue),
color-stop(1, blue)
);
background-image: -o-linear-gradient(bottom, blue 0%, #120205 100%);
background-image: -moz-linear-gradient(bottom, blue 0%, #120205 100%);
background-image: -webkit-linear-gradient(bottom, blue 0%, #120205 100%);
background-image: -ms-linear-gradient(bottom, blue 0%, #120205 100%);
background-image: linear-gradient(to bottom, blue 0%, #120205 100%);
}

View File

@@ -0,0 +1,3 @@
#content {
background: white;
}

View File

@@ -0,0 +1,50 @@
#wrapper {
margin-left:auto;
margin-right:auto;
}
#title {
position: relative;
margin: 1px 0px 0px 0px;
}
#login_and_search {
position: relative;
margin: 0px 0px 5px 0px;
}
#login {
float: left;
position: relative;
}
#search {
float: right;
position: relative;
}
#top {
position: relative;
overflow: hidden;
}
#bottom {
position: relative;
}
#left {
float: left;
}
#logo {
float: left;
}
#right {
float: right;
}
#content {
overflow: hidden;
}

View File

@@ -0,0 +1,237 @@
.rowNumber{
margin-right:20px;
width : 100px;
background: blue;
font-family: Impact;
font-size: 1.2em;
color: white;
}
body .ui-datatable .ui-paginator {
position: relative;
text-align: left;
bottom: 0px;
width: inherit;
padding: 2px;
z-index: 1;
}
.input {
font-size: 1em;
max-width: 35px;
min-width: 35px;
height : 35px;
font-size: 1em;
font-family: inherit;
background-color: #fff;
border: solid 1px;
border-color: blueviolet;
border-radius: 4px;
}
.dataTables {
overflow-y:scroll;
overflow-x:scroll;
height : 386px;
width: 300px;
display:block;
background-color: #fff;
zoom: 1;
}
.ui-datatable table{
border-collapse:collapse;
width:100%;
}
.ui-datatable.ui-datatable-header,.ui-datatable.ui-datatable-footer{
text-align:center;
padding:4px 10px;
}
.ui-datatable.ui-datatable-header{
border-bottom:0px none;
}
.ui-datatable.ui-datatable-footer{
border-top:0px none;
}
.ui-datatable thead th
{
font-family: Arial;
font-size: 1.2em;
color: blue;
background: white;
}
.ui-datatable thead td
{
font-family: Impact;
font-size:1.2em;
color: blue;
}
.ui-datatable tfoot td{
text-align:center;
}
ui-datatable thead th
{
overflow:hidden;
}
.ui-datatable tbody td , .ui-datatable tfoot td{
padding:4px 10px;
overflow:hidden;
white-space:nowrap;
border-width:1px;
border-style:solid;
}
.ui-datatable tbody tr
{
clear: both;
}
.ui-datatable .ui-sortable-column{
cursor:pointer;
}
.ui-datatable div.ui-dt-c{
position:relative;
}
.ui-datatable .ui-sortable-column-icon{
display:inline-block;
margin:-3px 0px -3px 2px;
}
.ui-datatable .ui-column-filter{
display:block;
width:100px;
margin:auto;
}
.ui-datatable .ui-expanded-row{
border-bottom:0px none;
}
.ui-datatable .ui-expanded-row-content{
border-top:0px none;
}
.ui-datatable .ui-row-toggler{
cursor:pointer;
}
.ui-datatable tr.ui-state-highlight{
cursor:pointer;
}
.ui-datatable .ui-selection-column .ui-chkbox-all{
display:block;
margin:0px auto;
width:16px;
height:16px;
}
.ui-datatable-scrollable table{
table-layout:auto;
}
.ui-datatable-scrollable-body{
overflow:auto;
}
.ui-datatable-scrollable-header,.ui-datatable-scrollable-footer{
overflow:hidden;
border:0px none;
}
.ui-datatable-scrollable .ui-datatable-scrollable-header,.ui-datatable-scrollable .ui-datatable-scrollable-footer{
position:relative;
}
.ui-datatable-scrollable .ui-datatable-scrollable-header td{
font-weight:normal;
}
.ui-datatable-scrollable-body::-webkit-scrollbar{
-webkit-appearance:none;
width:15px;
background-color:transparent;
}
.ui-datatable-scrollable-body::-webkit-scrollbar-thumb{
border-radius:8px;
border:1px solid white;
background-color:rgba(194,194,194,.5);
}
.ui-datatable .ui-datatable-data tr.ui-state-hover{
border-color:inherit;
font-weight:inherit;
cursor:pointer;
}
.ui-datatable .ui-paginator,.ui-datatable .ui-paginator{
padding:2px;
}
.ui-column-dnd-top, ui-column-dnd-bottom{
display:none;
position:absolute;
}
.ui-column-dnd-top .ui-icon, ui-column-dnd-bottom .ui-icon{
position:absolute;
top:-4px;
}
/* InCell Editing */.ui-datatable .ui-cell-editor-input{
display:none;
}
.ui-datatable .ui-row-editing .ui-cell-editor .ui-cell-editor-output{
display:none;
}
.ui-datatable .ui-row-editing .ui-cell-editor .ui-cell-editor-input{
display:block;
}
.ui-datatable .ui-row-editor span{
cursor:pointer;
display:inline-block;
}
.ui-datatable .ui-row-editor .ui-icon-pencil{
display:inline-block;
}
.ui-datatable .ui-row-editing .ui-row-editor .ui-icon-pencil{
display:none;
}
.ui-datatable .ui-row-editor .ui-icon-check,.ui-datatable .ui-row-editor .ui-icon-close{
display:none;
}
.ui-datatable .ui-row-editing .ui-row-editor .ui-icon-check,.ui-datatable .ui-row-editing .ui-row-editor .ui-icon-close{
display:inline-block;
}
.ui-datatable .ui-datatable-data tr.ui-row-editing td.ui-editable-column,.ui-datatable .ui-datatable-data td.ui-cell-editing{
padding:0;
margin:0;
}
/*resizer */.ui-datatable .ui-column-resizer{
width:8px;
height:20px;
padding:0px;
cursor:col-resize;
background-image:url("/ScraperOnWeb/javax.faces.resource/spacer/dot_clear.gif.jsf?ln=primefaces");
margin:-4px -10px -4px 0px;
float:right;
}
.ui-datatable .ui-filter-column .ui-column-resizer{
height:45px;
}
.ui-datatable .ui-column-resizer-helper{
width:1px;
position:absolute;
z-index:10;
display:none;
}
.ui-datatable-resizable{
padding-bottom:1px;/*fix for webkit overlow*/
overflow:auto;
}
.ui-datatable-resizable table{
table-layout:auto;
}
.ui-datatable-rtl{
direction:rtl;
}
.ui-datatable-rtl.ui-datatable thead th, .ui-datatable-rtl.ui-datatable tfoot td{
text-align:right;
}

View File

@@ -0,0 +1,8 @@
body {
background-color: #ffffff;
font-size: 12px;
font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif;
color: #000000;
margin: 2px;
}

View File

@@ -0,0 +1,34 @@
* {box-sizing: border-box;}
.img-zoom-container {
position: relative;
}
.img-zoom-lens {
position: absolute;
/*set the size of the lens:*/
width: 40px;
height: 40px;
}
.img-zoom-result {
/*border: 5px solid #000000;*/
/*set the size of the result div:*/
width: 300px;
height: 300px;
}
.myDiv
{
align: center;
padding: 30px;
margin: 10;
border-left: 10px solid navy;
}
.hpanel{
position: relative;
top: 0px; left: 0px;
}

View File

@@ -0,0 +1,22 @@
#left {
background-image: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, #2D4A37),
color-stop(1, #789480)
);
background-image: -o-linear-gradient(bottom, #2D4A37 0%, #789480 100%);
background-image: -moz-linear-gradient(bottom, #2D4A37 0%, #789480 100%);
background-image: -webkit-linear-gradient(bottom, #2D4A37 0%, #789480 100%);
background-image: -ms-linear-gradient(bottom, #2D4A37 0%, #789480 100%);
background-image: linear-gradient(to bottom, #2D4A37 0%, #789480 100%);
-moz-box-shadow: 0px 0px 15px 3px #333333;
-webkit-box-shadow: 0px 0px 15px 3px #333333;
box-shadow: 0px 0px 15px 3px #333333;
text-align:left;
padding-left:10px;
margin-right: 5px;
}

View File

@@ -0,0 +1,65 @@
.inputs {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background-color: #00f;
background: -moz-linear-gradient(top, #FFF, #EAEAEA);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #FFF), color-stop(1.0, #EAEAEA));
border: 1px solid #CACACA;
color: #444;
font-size: 1.1em;
margin: 0px 10px 0px 0px;
padding-left: 2px;
width:200px;
}
.inputs:focus {
color: #ffffff;
background: #0000cc;
-webkit-box-shadow: 0 0 25px #CCC;
-moz-box-shadow: 0 0 25px #cccc00;
box-shadow: 0 0 25px #CCCC00;
-webkit-transform: scale(1.05);
-moz-transform: scale(1.05);
transform: scale(1.05);
}
.lbutton {
-moz-box-shadow: 4px 7px 13px -7px #276873;
-webkit-box-shadow: 4px 7px 13px -7px #276873;
box-shadow: 4px 7px 13px -7px #276873;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #171717), color-stop(1, #d92323));
background:-moz-linear-gradient(top, #171717 5%, #222 100%);
background:-webkit-linear-gradient(top, #171717 5%, #222 100%);
background:-o-linear-gradient(top, #171717 5%, #222 100%);
background:-ms-linear-gradient(top, #171717 5%, #222 100%);
background:linear-gradient(to bottom, #171717 5%, #222 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#171717', endColorstr='#d92323',GradientType=0);
background-color:#222;
-moz-border-radius:17px;
-webkit-border-radius:17px;
border-radius:17px;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:arial;
font-size:12px;
font-weight:bold;
padding:2px 12px;
text-decoration:none;
text-shadow:0px 1px 0px #3d768a;
}
.lbutton:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #222), color-stop(1, #171717));
background:-moz-linear-gradient(top, #00f 5%, #222 100%);
background:-webkit-linear-gradient(top, 00f 5%, #222 100%);
background:-o-linear-gradient(top, #00f 5%, #222 100%);
background:-ms-linear-gradient(top, #00f 5%, #222 100%);
background:linear-gradient(to bottom, #00f 5%, #222 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d92323', endColorstr='#222',GradientType=0);
background-color:#00f;
}
.lbutton:active {
position:relative;
top:1px;
}

View File

@@ -0,0 +1,8 @@
#login_and_search {
width:100%;
height:90px;
background-color: white;
padding: 20px;
display: inline-block;
}

View File

@@ -0,0 +1,9 @@
#logo {
background-image : url("#{resource['images/owl.png']}") ;
background-repeat: no-repeat;
margin-right: 0px;
width:60px;
height:60px;
float: left;
}

View File

@@ -0,0 +1,37 @@
#menu {
white-space: nowrap;
height: 28px;
width:100%;
background: #fff url("#{resource['images/menu.png']}") bottom center ;
margin-bottom: 5px;
}
#menu ul {
margin: 0;
padding: 0;
list-style:none;
float:left;
}
#menu li {
float: left;
margin: 0 3px 0 3px;
padding: 0;
background: transparent;
}
#menu a {
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: normal;
float:left;
display:block;
height: 26px;
line-height: 24px;
padding: 2px 10px 0 10px;
color: #cccc00;
text-decoration: none;
background: transparent;
}

View File

@@ -0,0 +1,5 @@
#right {
background-color: #FA0519;
text-align:center;
margin-left: 5px;
}

View File

@@ -0,0 +1,3 @@
#search {
color: #ffffff;
}

View File

@@ -0,0 +1,67 @@
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: normal;
float:left;
display:block;
height: 26px;
line-height: 24px;
padding: 2px 10px 0 10px;
color: #cccc00;
text-decoration:#A3979A;
background-color: white;
border: white;
padding: 0px
}
a.hover {
float: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: normal;
float:left;
display:block;
height: 26px;
line-height: 24px;
color: #cccc00;
text-decoration: none;
background-color: white;
border: white;
padding: 0px
}
.menus
{
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: normal;
float:right;
color: #cccc00;
text-decoration:#A3979A;
background-color: white;
border: white;
padding: 0px ;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
.affaires .ui-menuitem-text{color:#cccc00;
decoration: bold, italic;
}
.affaires .ui-menu-child{background: white; mouseover: #000;
background-color: #A80000;}
.affaires .ui-menubar{mouseover: #000;
background-color: #A80000;}
.affaires .ui-state-hover {}
a.active {
color: #D09d23;
font-weight: bold;
background-color : #c7c3c3;
}

View File

@@ -0,0 +1,9 @@
#title {
background: white;
color:blue;
text-align:center;
font-size: 24px;
font-weight: bold;
}

View File

@@ -0,0 +1,9 @@
#top {
color: blue;
font-family: cursive, sans-serif;
font-size: 22px;
font-style: italic;
text-align: center;
height:60px;
background: white;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -0,0 +1,22 @@
function validateText(textInputID)
{
var htmlInputText = document.getElementById(textInputID);
var text = htmlInputText.value;
var regex = /[^A-Za-z0-9]/g;
if (text.search( regex) != -1)
{
newText = text.replace(regex, "");
htmlInputText.value = newText;
//alert("alphanumeric chars only please");
}
}

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition >
<h1>This is default footer</h1>
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
This is default content
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
This is default left side
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
Default Login Section
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
LOGO
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
<h:body>
<ui:composition>
Menu default
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
This is default right side
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
Default Search Section
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
This is default title
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
<h1>This is default header</h1>
</ui:composition>
</h:body>
</html>

View File

@@ -0,0 +1,115 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<h:outputStylesheet name="#{title eq false ? 'css/layout-css/default.css' : 'css/layout-css/titleStyle.css'}"/>
<h:outputStylesheet name="#{loginsearch eq false ? 'css/layout-css/default.css' : 'css/layout-css/login_and_searchStyle.css'}"/>
<h:outputStylesheet name="#{top eq false ? 'css/layout-css/default.css' : 'css/layout-css/topStyle.css'}"/>
<h:outputStylesheet name="#{bottom eq true ? 'css/layout-css/default.css' : 'css/layout-css/bottomStyle.css'}"/>
<h:outputStylesheet name="#{left eq false ? 'css/layout-css/default.css' : 'css/layout-css/stylesLinks.css'}"/>
<h:outputStylesheet name="#{right eq false ? 'css/layout-css/default.css' : 'css/layout-css/rightStyle.css'}"/>
<h:outputStylesheet name="#{content eq false ? 'css/layout-css/default.css' : 'css/layout-css/dataTable.css'}"/>
<h:outputStylesheet name="#{login eq false ? 'css/layout-css/default.css' : 'css/layout-css/loginStyle.css'}"/>
<h:outputStylesheet name="#{login_and_search eq false ? 'css/layout-css/default.css' : 'css/layout-css/login_and_searchStyle.css'}"/>
<h:outputStylesheet name="#{search eq false ? 'css/layout-css/default.css' : 'css/layout-css/searchStyle.css'}"/>
<h:outputStylesheet name="#{menu eq false ? 'css/layout-css/default.css' : 'css/layout-css/menuStyle.css'}"/>
<h:outputStylesheet name="#{logo eq false ? 'css/layout-css/default.css' : 'css/layout-css/logoStyle.css'}"/>
<title>Generic Template</title>
</h:head>
<h:body>
<div id="wrapper"
style="margin:auto; width: #{empty wrapperWidth ? '100%' : wrapperWidth}">
<ui:fragment rendered="#{empty title ? true : title}">
<div id="title"> <!-- div is needed to associate this div with css for title -->
<ui:insert name="title">
<ui:include src="/resources/default/titleDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty top ? true : top}">
<div id="logo_and_top" style="overflow:auto;">
<ui:fragment rendered="#{empty logo ? true : logo}">
<div id="logo">
<ui:insert name="logo">
<ui:include src="/resources/templates/default/logoDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<div id="top">
<ui:insert name="top">
<ui:include src="/resources/templates/default/topDefault.xhtml" />
</ui:insert>
</div>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty loginsearch ? true : loginsearch}">
<div id="login_and_search"> <!-- div is needed for css -->
<ui:fragment rendered="#{empty login ? true : login}">
<div id="login">
<ui:insert name="login">
<ui:include src="/resources/templates/default/loginDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty search ? true : search}">
<div id="search">
<ui:insert name="search">
<ui:include src="/resources/templates/default/searchDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty menu ? true : menu}">
<div id="menu">
<ui:insert name="menu">
<ui:include src="/resources/templates/default/menuDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<div id="main" style="overflow:auto;">
<ui:fragment rendered="#{empty left ? true : left}">
<div id="left"
style="width: #{empty leftWidth ? '150px' : leftWidth}">
<ui:insert name="left">
<ui:include src="/resources/templates/default/leftDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty right ? true : right}">
<div id="right" style="width: #{empty rightWidth ? '150px' : rightWidth}">
<ui:insert name="right">
<ui:include src="/resources/templates/default/rightDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty content ? true : content}">
<div id="content">
<ui:insert name="content">
<ui:include src="/resources/templates/default/contentDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
</div>
<ui:fragment rendered="#{empty bottom ? true : bottom}">
<div id="bottom">
<ui:insert name="bottom">
<ui:include src="/resources/templates/default/bottomDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
</div>
</h:body>
</html>