IVAN ALEJANDRO PADILLA CORDOVA
7 months ago
commit
3d9c3d1c62
66 changed files with 8148 additions and 0 deletions
@ -0,0 +1,71 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- You may freely edit this file. See commented blocks below for --> |
|||
<!-- some examples of how to customize the build. --> |
|||
<!-- (If you delete it and reopen the project it will be recreated.) --> |
|||
<!-- By default, only the Clean and Build commands use this build script. --> |
|||
<!-- Commands such as Run, Debug, and Test only use this build script if --> |
|||
<!-- the Compile on Save feature is turned off for the project. --> |
|||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> |
|||
<!-- in the project's Project Properties dialog box.--> |
|||
<project name="Inventario-war" default="default" basedir="."> |
|||
<description>Builds, tests, and runs the project Inventario-war.</description> |
|||
<import file="nbproject/build-impl.xml"/> |
|||
<!-- |
|||
|
|||
There exist several targets which are by default empty and which can be |
|||
used for execution of your tasks. These targets are usually executed |
|||
before and after some main targets. They are: |
|||
|
|||
-pre-init: called before initialization of project properties |
|||
-post-init: called after initialization of project properties |
|||
-pre-compile: called before javac compilation |
|||
-post-compile: called after javac compilation |
|||
-pre-compile-single: called before javac compilation of single file |
|||
-post-compile-single: called after javac compilation of single file |
|||
-pre-compile-test: called before javac compilation of JUnit tests |
|||
-post-compile-test: called after javac compilation of JUnit tests |
|||
-pre-compile-test-single: called before javac compilation of single JUnit test |
|||
-post-compile-test-single: called after javac compilation of single JUunit test |
|||
-pre-dist: called before archive building |
|||
-post-dist: called after archive building |
|||
-post-clean: called after cleaning build products |
|||
-pre-run-deploy: called before deploying |
|||
-post-run-deploy: called after deploying |
|||
|
|||
Example of pluging an obfuscator after the compilation could look like |
|||
|
|||
<target name="-post-compile"> |
|||
<obfuscate> |
|||
<fileset dir="${build.classes.dir}"/> |
|||
</obfuscate> |
|||
</target> |
|||
|
|||
For list of available properties check the imported |
|||
nbproject/build-impl.xml file. |
|||
|
|||
|
|||
Other way how to customize the build is by overriding existing main targets. |
|||
The target of interest are: |
|||
|
|||
init-macrodef-javac: defines macro for javac compilation |
|||
init-macrodef-junit: defines macro for junit execution |
|||
init-macrodef-debug: defines macro for class debugging |
|||
do-dist: archive building |
|||
run: execution of project |
|||
javadoc-build: javadoc generation |
|||
|
|||
Example of overriding the target for project execution could look like |
|||
|
|||
<target name="run" depends="<PROJNAME>-impl.jar"> |
|||
<exec dir="bin" executable="launcher.exe"> |
|||
<arg file="${dist.jar}"/> |
|||
</exec> |
|||
</target> |
|||
|
|||
Notice that overridden target depends on jar target and not only on |
|||
compile target as regular run target does. Again, for list of available |
|||
properties which you can use check the target you are overriding in |
|||
nbproject/build-impl.xml file. |
|||
|
|||
--> |
|||
</project> |
Binary file not shown.
@ -0,0 +1,131 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- |
|||
|
|||
Licensed to the Apache Software Foundation (ASF) under one |
|||
or more contributor license agreements. See the NOTICE file |
|||
distributed with this work for additional information |
|||
regarding copyright ownership. The ASF licenses this file |
|||
to you under the Apache License, Version 2.0 (the |
|||
"License"); you may not use this file except in compliance |
|||
with the License. You may obtain a copy of the License at |
|||
|
|||
http://www.apache.org/licenses/LICENSE-2.0 |
|||
|
|||
Unless required by applicable law or agreed to in writing, |
|||
software distributed under the License is distributed on an |
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
KIND, either express or implied. See the License for the |
|||
specific language governing permissions and limitations |
|||
under the License. |
|||
|
|||
--> |
|||
<project default="-deploy-ant" basedir="."> |
|||
<target name="-init-cl-deployment-env" if="deploy.ant.enabled"> |
|||
<property file="${deploy.ant.properties.file}" /> |
|||
<available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/> |
|||
<available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/> |
|||
<available file="${deploy.ant.resource.dir}" property="has.setup"/> |
|||
<tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> |
|||
<echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/> |
|||
</target> |
|||
|
|||
<target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present"> |
|||
<tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/> |
|||
<copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/> |
|||
<!-- The doctype triggers resolution which can fail --> |
|||
<replace file="${temp.sun.web}"> |
|||
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken> |
|||
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue> |
|||
</replace> |
|||
<replace file="${temp.sun.web}"> |
|||
<replacetoken><![CDATA[<sun-web-app]]></replacetoken> |
|||
<replacevalue><![CDATA[--> <sun-web-app]]></replacevalue> |
|||
</replace> |
|||
<xmlproperty file="${temp.sun.web}" validate="false"> |
|||
</xmlproperty> |
|||
<delete file="${temp.sun.web}"/> |
|||
<condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}"> |
|||
<isset property="sun-web-app.context-root"/> |
|||
</condition> |
|||
<condition property="deploy.context.root.argument" value="&contextroot=${sun-web-app.context-root}" else="/${ant.project.name}"> |
|||
<isset property="sun-web-app.context-root"/> |
|||
</condition> |
|||
</target> |
|||
<target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present"> |
|||
<tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/> |
|||
<copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/> |
|||
<!-- The doctype triggers resolution which can fail --> |
|||
<replace file="${temp.gf.web}"> |
|||
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken> |
|||
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue> |
|||
</replace> |
|||
<replace file="${temp.gf.web}"> |
|||
<replacetoken><![CDATA[<glassfish-web-app]]></replacetoken> |
|||
<replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue> |
|||
</replace> |
|||
<xmlproperty file="${temp.gf.web}" validate="false"> |
|||
</xmlproperty> |
|||
<delete file="${temp.gf.web}"/> |
|||
<condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}"> |
|||
<isset property="glassfish-web-app.context-root"/> |
|||
</condition> |
|||
<condition property="deploy.context.root.argument" value="&contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}"> |
|||
<isset property="glassfish-web-app.context-root"/> |
|||
</condition> |
|||
</target> |
|||
<target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present"> |
|||
<property name="deploy.context.root.argument" value=""/> |
|||
</target> |
|||
<target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup"> |
|||
<tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/> |
|||
<mkdir dir="${gfv3.resources.dir}"/> |
|||
<mkdir dir="${gfv3.resources.dir}/META-INF"/> |
|||
<copy todir="${gfv3.resources.dir}/META-INF"> |
|||
<fileset dir="${deploy.ant.resource.dir}"/> |
|||
</copy> |
|||
<jar destfile="${deploy.ant.archive}" update="true"> |
|||
<fileset dir="${gfv3.resources.dir}"/> |
|||
</jar> |
|||
<delete dir="${gfv3.resources.dir}"/> |
|||
</target> |
|||
<target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled"> |
|||
<antcall target="-deploy-without-pw"/> |
|||
<antcall target="-deploy-with-pw"/> |
|||
</target> |
|||
|
|||
<target name="-deploy-without-pw" unless="gfv3.password"> |
|||
<echo message="Deploying ${deploy.ant.archive}"/> |
|||
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> |
|||
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/> |
|||
<get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&force=true&name=${ant.project.name}" |
|||
dest="${gfv3.results.file}"/> |
|||
<delete file="${gfv3.results.file}"/> |
|||
</target> |
|||
<target name="-deploy-with-pw" if="gfv3.password"> |
|||
<echo message="Deploying ${deploy.ant.archive}"/> |
|||
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> |
|||
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/> |
|||
<get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&force=true&name=${ant.project.name}" |
|||
dest="${gfv3.results.file}"/> |
|||
<delete file="${gfv3.results.file}"/> |
|||
</target> |
|||
<target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled"> |
|||
<antcall target="-undeploy-without-pw"/> |
|||
<antcall target="-undeploy-with-pw"/> |
|||
</target> |
|||
|
|||
<target name="-undeploy-without-pw" unless="gfv3.password"> |
|||
<echo message="Undeploying ${deploy.ant.archive}"/> |
|||
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> |
|||
<get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}" |
|||
dest="${gfv3.results.file}"/> |
|||
<delete file="${gfv3.results.file}"/> |
|||
</target> |
|||
<target name="-undeploy-with-pw" if="gfv3.password"> |
|||
<echo message="Undeploying ${deploy.ant.archive}"/> |
|||
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> |
|||
<get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}" |
|||
dest="${gfv3.results.file}"/> |
|||
<delete file="${gfv3.results.file}"/> |
|||
</target> |
|||
</project> |
File diff suppressed because it is too large
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<Scene Scope="Project" version="2"> |
|||
<Scope Scope="Faces Configuration Only"/> |
|||
<Scope Scope="Project"/> |
|||
<Scope Scope="All Faces Configurations"/> |
|||
</Scene> |
@ -0,0 +1,8 @@ |
|||
build.xml.data.CRC32=d0ca52af |
|||
build.xml.script.CRC32=796f502a |
|||
build.xml.stylesheet.CRC32=1707db4f@1.96.0.1 |
|||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. |
|||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. |
|||
nbproject/build-impl.xml.data.CRC32=d0ca52af |
|||
nbproject/build-impl.xml.script.CRC32=d8f0ad16 |
|||
nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.96.0.1 |
@ -0,0 +1,94 @@ |
|||
annotation.processing.enabled=true |
|||
annotation.processing.enabled.in.editor=true |
|||
annotation.processing.processors.list= |
|||
annotation.processing.run.all.processors=true |
|||
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output |
|||
auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=JSP |
|||
build.classes.dir=${build.web.dir}/WEB-INF/classes |
|||
build.classes.excludes=**/*.java,**/*.form |
|||
build.dir=build |
|||
build.generated.dir=${build.dir}/generated |
|||
build.generated.sources.dir=${build.dir}/generated-sources |
|||
build.test.classes.dir=${build.dir}/test/classes |
|||
build.test.results.dir=${build.dir}/test/results |
|||
build.web.dir=${build.dir}/web |
|||
build.web.excludes=${build.classes.excludes} |
|||
client.urlPart= |
|||
compile.jsps=false |
|||
conf.dir=${source.root}/conf |
|||
debug.classpath=${build.classes.dir}:${javac.classpath} |
|||
debug.test.classpath=\ |
|||
${run.test.classpath} |
|||
display.browser=true |
|||
# Files to be excluded from distribution war |
|||
dist.archive.excludes= |
|||
dist.dir=dist |
|||
dist.ear.war=${dist.dir}/${war.ear.name} |
|||
dist.javadoc.dir=${dist.dir}/javadoc |
|||
dist.war=${dist.dir}/${war.name} |
|||
endorsed.classpath=\ |
|||
${libs.javaee-endorsed-api-7.0.classpath} |
|||
excludes= |
|||
file.reference.primefaces-12.0.0.jar=libs\\primefaces-12.0.0.jar |
|||
includes=** |
|||
j2ee.compile.on.save=true |
|||
j2ee.copy.static.files.on.save=true |
|||
j2ee.deploy.on.save=true |
|||
j2ee.platform=1.7 |
|||
j2ee.platform.classpath=${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar |
|||
j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar |
|||
j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar |
|||
j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar |
|||
j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar |
|||
j2ee.platform.wsit.classpath= |
|||
j2ee.server.type=gfv4ee7 |
|||
jar.compress=false |
|||
javac.classpath=\ |
|||
${reference.Inventario-ejb.dist}:\ |
|||
${file.reference.primefaces-12.0.0.jar} |
|||
# Space-separated list of extra javac options |
|||
javac.compilerargs= |
|||
javac.debug=true |
|||
javac.deprecation=false |
|||
javac.processorpath=\ |
|||
${javac.classpath} |
|||
javac.source=1.7 |
|||
javac.target=1.7 |
|||
javac.test.classpath=\ |
|||
${javac.classpath}:\ |
|||
${build.classes.dir} |
|||
javac.test.processorpath=\ |
|||
${javac.test.classpath} |
|||
javadoc.additionalparam= |
|||
javadoc.author=false |
|||
javadoc.encoding=${source.encoding} |
|||
javadoc.noindex=false |
|||
javadoc.nonavbar=false |
|||
javadoc.notree=false |
|||
javadoc.preview=true |
|||
javadoc.private=false |
|||
javadoc.splitindex=true |
|||
javadoc.use=true |
|||
javadoc.version=false |
|||
javadoc.windowtitle= |
|||
lib.dir=${web.docbase.dir}/WEB-INF/lib |
|||
persistence.xml.dir=${conf.dir} |
|||
platform.active=JDK_1.8 |
|||
project.Inventario-ejb=../Inventario-ejb |
|||
reference.Inventario-ejb.dist=${project.Inventario-ejb}/dist/Inventario-ejb.jar |
|||
resource.dir=setup |
|||
run.test.classpath=\ |
|||
${javac.test.classpath}:\ |
|||
${build.test.classes.dir} |
|||
# Space-separated list of JVM arguments used when running a class with a main method or a unit test |
|||
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): |
|||
runmain.jvmargs= |
|||
source.encoding=UTF-8 |
|||
source.root=src |
|||
src.dir=${source.root}/java |
|||
test.src.dir=test |
|||
war.content.additional= |
|||
war.ear.name=${war.name} |
|||
war.name=Inventario-war.war |
|||
web.docbase.dir=web |
|||
webinf.dir=web/WEB-INF |
@ -0,0 +1,37 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://www.netbeans.org/ns/project/1"> |
|||
<type>org.netbeans.modules.web.project</type> |
|||
<configuration> |
|||
<data xmlns="http://www.netbeans.org/ns/web-project/3"> |
|||
<name>Inventario-war</name> |
|||
<minimum-ant-version>1.6.5</minimum-ant-version> |
|||
<explicit-platform explicit-source-supported="true"/> |
|||
<web-module-libraries> |
|||
<library dirs="100"> |
|||
<file>${reference.Inventario-ejb.dist}</file> |
|||
</library> |
|||
<library dirs="200"> |
|||
<file>${file.reference.primefaces-12.0.0.jar}</file> |
|||
<path-in-war>WEB-INF/lib</path-in-war> |
|||
</library> |
|||
</web-module-libraries> |
|||
<web-module-additional-libraries/> |
|||
<source-roots> |
|||
<root id="src.dir"/> |
|||
</source-roots> |
|||
<test-roots> |
|||
<root id="test.src.dir"/> |
|||
</test-roots> |
|||
</data> |
|||
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1"> |
|||
<reference> |
|||
<foreign-project>Inventario-ejb</foreign-project> |
|||
<artifact-type>jar</artifact-type> |
|||
<script>build.xml</script> |
|||
<target>dist</target> |
|||
<clean-target>clean</clean-target> |
|||
<id>dist</id> |
|||
</reference> |
|||
</references> |
|||
</configuration> |
|||
</project> |
@ -0,0 +1,2 @@ |
|||
Manifest-Version: 1.0 |
|||
|
@ -0,0 +1,66 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.seguridad; |
|||
|
|||
import java.io.IOException; |
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import javax.faces.application.NavigationHandler; |
|||
import javax.faces.context.FacesContext; |
|||
import javax.faces.event.PhaseEvent; |
|||
import javax.faces.event.PhaseId; |
|||
import javax.faces.event.PhaseListener; |
|||
|
|||
/** |
|||
* |
|||
* @author Ivan Alejandro PC |
|||
*/ |
|||
|
|||
|
|||
//--------------------------------------------------------------
|
|||
|
|||
@Named(value = "autorizacionListener") |
|||
@SessionScoped |
|||
public class AutorizacionListener implements PhaseListener { |
|||
|
|||
/** |
|||
* Creates a new instance of AutorizacionListener |
|||
*/ |
|||
public AutorizacionListener() { |
|||
} |
|||
|
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Override |
|||
public void afterPhase(PhaseEvent event) { |
|||
try { |
|||
//Obtener la pagina actual para validar la sesion
|
|||
String paginaActual = event.getFacesContext().getViewRoot().getViewId(); |
|||
|
|||
//inicializar la sesion en caso de no haber sesion
|
|||
Login.getSesion(); |
|||
|
|||
//Revisar que no sea la pafina index y que no estes logueado
|
|||
//para redireccionar
|
|||
if (!paginaActual.contains("login.xhtml") && Login.getEstatus() == false) { |
|||
FacesContext.getCurrentInstance().getExternalContext().redirect("faces/login.xhtml?faces-redirect=true"); |
|||
|
|||
NavigationHandler nh = event.getFacesContext().getApplication().getNavigationHandler(); |
|||
nh.handleNavigation(event.getFacesContext(), null, "login"); |
|||
} |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void beforePhase(PhaseEvent event) {} |
|||
|
|||
@Override |
|||
public PhaseId getPhaseId() { |
|||
return PhaseId.RESTORE_VIEW; |
|||
} |
|||
} |
@ -0,0 +1,108 @@ |
|||
package mx.edu.tsj.chapala.sistemas.inventario.seguridad; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import javax.annotation.PostConstruct; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import javax.servlet.http.HttpSession; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.UsuariosBL; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Usuarios; |
|||
|
|||
@Named(value = "demoBeanLogin") |
|||
@SessionScoped |
|||
public class Login implements Serializable { |
|||
private static HttpSession httpSession; |
|||
private UsuariosBL usuariosBL; |
|||
private String username; |
|||
private String password; |
|||
|
|||
public Login(){ |
|||
|
|||
} |
|||
|
|||
@PostConstruct |
|||
public void init() { |
|||
usuariosBL = new UsuariosBL(); // O cualquier método adecuado para inicializar usuariosBL
|
|||
} |
|||
|
|||
public static void getSesion(){ |
|||
httpSession = (HttpSession) |
|||
FacesContext.getCurrentInstance().getExternalContext().getSession(false); |
|||
} |
|||
|
|||
public static String logout(){ |
|||
httpSession.removeAttribute("sesionActiva"); |
|||
httpSession.invalidate(); |
|||
return "login.xhtml"; |
|||
} |
|||
public void limpiarCampos() { |
|||
username = ""; |
|||
password = ""; |
|||
} |
|||
|
|||
public String buscarPorLogin() { |
|||
Usuarios usuario = new Usuarios(); |
|||
usuario.setUsuario(username); |
|||
usuario.setPassword(password); |
|||
short status = 1; |
|||
usuario.setStatus(status); |
|||
usuario = usuariosBL.buscarPorLoginStatus(true, usuario); |
|||
if (usuario != null) { |
|||
httpSession.setAttribute("sesionActiva", true); |
|||
limpiarCampos(); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Login exitoso", "Bienvenido, " + usuario.getUsuario())); |
|||
|
|||
return "productosLista.xhtml"; |
|||
} else { |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error de inicio de sesión", "Usuario o contraseña incorrectos")); |
|||
return "login.xhtml"; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
public UsuariosBL getUsuariosBL() { |
|||
return usuariosBL; |
|||
} |
|||
|
|||
public void setUsuariosBL(UsuariosBL usuariosBL) { |
|||
this.usuariosBL = usuariosBL; |
|||
} |
|||
|
|||
public String getUsername() { |
|||
return username; |
|||
} |
|||
|
|||
public void setUsername(String username) { |
|||
this.username = username; |
|||
} |
|||
|
|||
public String getPassword() { |
|||
return password; |
|||
} |
|||
|
|||
public void setPassword(String password) { |
|||
this.password = password; |
|||
} |
|||
|
|||
public static boolean getEstatus(){ |
|||
if(httpSession!=null&&httpSession.getId()!=null&&!httpSession.getId().isEmpty()&&httpSession.getAttribute("sesionActiva")!=null){ |
|||
return true; |
|||
}else{ |
|||
return false; |
|||
} |
|||
} |
|||
//private boolean mostrarError;
|
|||
|
|||
// Getter y Setter para username y password
|
|||
|
|||
/*public boolean isMostrarError() { |
|||
return mostrarError; |
|||
} |
|||
|
|||
public void setMostrarError(boolean mostrarError) { |
|||
this.mostrarError = mostrarError; |
|||
}*/ |
|||
} |
@ -0,0 +1,27 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.seguridad; |
|||
|
|||
/** |
|||
* |
|||
* @author Ivan Alejandro PC |
|||
*/ |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.component.UIComponent; |
|||
import javax.faces.context.FacesContext; |
|||
import javax.faces.validator.Validator; |
|||
import javax.faces.validator.ValidatorException; |
|||
|
|||
public class PasswordValidator implements Validator { |
|||
|
|||
@Override |
|||
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { |
|||
String password = (String) value; |
|||
if (password == null || !password.matches("[a-zA-Z0-9]+")) { |
|||
FacesMessage message = new FacesMessage("La contraseña debe contener solo letras y números"); |
|||
throw new ValidatorException(message); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.faces.view.ViewScoped; |
|||
import java.io.Serializable; |
|||
|
|||
|
|||
@Named(value = "bean") |
|||
@ViewScoped |
|||
public class DemoBean implements Serializable { |
|||
|
|||
/** |
|||
* Creates a new instance of bean |
|||
*/ |
|||
public DemoBean() { |
|||
} |
|||
|
|||
} |
@ -0,0 +1,155 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.faces.view.ViewScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.CategoriaBL; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.CategoriaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Categoria; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.msg.Mensaje; |
|||
|
|||
/** |
|||
* |
|||
* @author gael4 |
|||
*/ |
|||
@Named(value = "demoBeanCategoria") |
|||
@SessionScoped |
|||
public class DemoBeanCategoria implements Serializable { |
|||
|
|||
/** |
|||
* Creates a new instance of DemoBeanCategoria |
|||
*/ |
|||
@EJB |
|||
private CategoriaBLLocal marcaBL; |
|||
|
|||
private Categoria categoria = new Categoria(); |
|||
|
|||
private boolean nuevo; |
|||
|
|||
private String titulo; |
|||
|
|||
/** |
|||
* Creates a new instance of DemoBeanCategoria |
|||
*/ |
|||
public DemoBeanCategoria() { |
|||
} |
|||
|
|||
public String agregar(){ |
|||
marcaBL.agregar(categoria); |
|||
categoria = new Categoria(); |
|||
return "categoriaLista.xhtml"; |
|||
/* |
|||
Categoria a = new Categoria(); |
|||
//Para que te marque como id duplicaod tienes que asignarlo
|
|||
//a.setId(1);
|
|||
a.setCategoria("Botas"); |
|||
|
|||
|
|||
Mensaje m = marcaBL.agregar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
return "index.xhtml"; |
|||
*/ |
|||
} |
|||
|
|||
public void editarCategoria(){ |
|||
marcaBL.editarCategoria(categoria); |
|||
} |
|||
|
|||
public void eliminarCategoria(){ |
|||
marcaBL.eliminarCategoria(categoria); |
|||
} |
|||
|
|||
public String buscar(){ |
|||
Categoria a = new Categoria(); |
|||
a.setId(10); |
|||
Mensaje m = marcaBL.buscarId(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre la Categoria: "); |
|||
System.out.println(marcaBL.buscarId(a)); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
//System.out.println("Encontre el Autor: ");
|
|||
//System.out.println(autorBL.buscarId(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String eliminar(){ |
|||
Categoria a = marcaBL.buscarIdLi(new Categoria(3)); |
|||
System.out.println("Categoria eliminada: "); |
|||
Mensaje m = marcaBL.eliminarCategoria(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
//System.out.println(autorBL.eliminar(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String editar() { |
|||
try{ |
|||
Categoria a = marcaBL.buscarIdLi(new Categoria(10)); |
|||
a.setCategoria("Adidas"); |
|||
|
|||
Mensaje m = marcaBL.editarCategoria(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
}catch(Exception e){ |
|||
System.out.println("Ha ocurrido un error: " + Mensaje.ELEMENTO_NO_ENCONTRADO); |
|||
} |
|||
//autorBL.editar(a);
|
|||
return "index.xhtml"; |
|||
} |
|||
public List<Categoria> getCategoria(){ |
|||
return marcaBL.buscarTodos(); |
|||
} |
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public Categoria getCategorias() { |
|||
return categoria; |
|||
} |
|||
|
|||
public void prepararEditar(Categoria categoria){ |
|||
nuevo=false; |
|||
titulo="Editando Categoria"; |
|||
this.categoria = categoria; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo=true; |
|||
titulo="Agregando Categoria"; |
|||
categoria = new Categoria(); |
|||
} |
|||
|
|||
public void prepararEliminar(Categoria categoria){ |
|||
this.categoria = categoria; |
|||
} |
|||
} |
@ -0,0 +1,117 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Color; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.msg.Mensaje; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.ColorBLLocal; |
|||
|
|||
/** |
|||
* |
|||
* @author Ivan Alejandro PC |
|||
*/ |
|||
@Named(value = "demoBeanColor") |
|||
@SessionScoped |
|||
public class DemoBeanColor implements Serializable { |
|||
|
|||
|
|||
|
|||
@EJB |
|||
private ColorBLLocal colorBL; |
|||
|
|||
private Color rol = new Color(); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
|
|||
|
|||
|
|||
|
|||
/** |
|||
* Creates a new instance of DemoBean |
|||
*/ |
|||
public DemoBeanColor() { |
|||
} |
|||
|
|||
//Aqui empieza lo de la clase pasada
|
|||
//Metodo para eliminar
|
|||
|
|||
public void eliminarRoles(){ |
|||
colorBL.eliminar(rol); |
|||
} |
|||
|
|||
public void prepararEliminar(Color rol){ |
|||
this.rol=rol; |
|||
} |
|||
|
|||
//Metodo de editar
|
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
public void editarRoles(){ |
|||
colorBL.editar(rol); |
|||
} |
|||
|
|||
|
|||
public void prepararEditar(Color rol){ |
|||
nuevo = false; |
|||
titulo="Editando Colores"; |
|||
this.rol=rol; |
|||
} |
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo =true; |
|||
titulo="Agregando Colores"; |
|||
rol = new Color(); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
//------------------
|
|||
|
|||
|
|||
public String agregarRol(){ |
|||
|
|||
colorBL.agregar(rol); |
|||
|
|||
rol = new Color(); |
|||
|
|||
return "colorLista.xhtml"; |
|||
} |
|||
|
|||
public Color getRol() { |
|||
return rol; |
|||
} |
|||
|
|||
public void setRol(Color rol) { |
|||
this.rol = rol; |
|||
} |
|||
|
|||
public List<Color> getListRolll(){ |
|||
//Este codigo es para poner los combos en blanco
|
|||
/*List<Color> colores = colorBL.buscarTodos(); |
|||
colores.add(0, new Color(null, "")); // Agregar un color vacío al inicio
|
|||
return colores;*/ |
|||
return colorBL.buscarTodos(); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,106 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.GeneroBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Genero; |
|||
|
|||
@Named(value = "demoBeanGenero") |
|||
@SessionScoped |
|||
public class DemoBeanGenero implements Serializable { |
|||
|
|||
ArrayList<String> Lista = new ArrayList(); |
|||
|
|||
private String Titulo; |
|||
private boolean nuevo; |
|||
private String gen; |
|||
|
|||
@EJB |
|||
private GeneroBLLocal GeneroBL; |
|||
|
|||
private Genero genero = new Genero(); |
|||
/** |
|||
* Creates a new instance of DemoBeanGenero |
|||
*/ |
|||
public DemoBeanGenero() { |
|||
} |
|||
|
|||
|
|||
//METODOS DE VISTA
|
|||
public List<Genero> getGenero(){ |
|||
return GeneroBL.buscarTodos(); |
|||
} |
|||
|
|||
public String agregarGenero(){ |
|||
genero.setGenero(gen); |
|||
GeneroBL.agregar(genero); |
|||
genero = new Genero(); |
|||
|
|||
return "vistaGenero.xhtml"; |
|||
} |
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo = true; |
|||
Titulo="Agregando Genero"; |
|||
genero = new Genero(); |
|||
} |
|||
|
|||
public void editarGenero(){ |
|||
genero.setGenero(gen); |
|||
nuevo = false; |
|||
GeneroBL.editarGenero(genero); |
|||
} |
|||
|
|||
public void prepararEditar(Genero g){ |
|||
nuevo = false; |
|||
Titulo="Editando Genero"; |
|||
this.genero = g; |
|||
} |
|||
public void eliminarGenero(){ |
|||
GeneroBL.eliminarGenero(genero); |
|||
} |
|||
|
|||
public void prepararEliminar(Genero g){ |
|||
this.genero = g; |
|||
} |
|||
|
|||
public List<String> Seleccionar(){ |
|||
Lista.clear(); |
|||
Lista.add("Hombre"); |
|||
Lista.add("Mujer"); |
|||
Lista.add("Otro"); |
|||
return Lista; |
|||
} |
|||
|
|||
//METODOS GET Y SET
|
|||
public String getGen() { |
|||
return gen; |
|||
} |
|||
|
|||
public void setGen(String gen) { |
|||
this.gen = gen; |
|||
} |
|||
public String getTitulo() { |
|||
return Titulo; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
public Genero getGeneros() { |
|||
return genero; |
|||
} |
|||
|
|||
public void setGenero(Genero genero) { |
|||
this.genero = genero; |
|||
} |
|||
} |
@ -0,0 +1,153 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.faces.view.ViewScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.MarcaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Marca; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.msg.Mensaje; |
|||
|
|||
/** |
|||
* |
|||
* @author gael4 |
|||
*/ |
|||
@Named(value = "demoBeanMarca") |
|||
@SessionScoped |
|||
|
|||
public class DemoBeanMarca implements Serializable { |
|||
|
|||
@EJB |
|||
private MarcaBLLocal marcaBL; |
|||
|
|||
private Marca marca = new Marca(); |
|||
|
|||
private boolean nuevo; |
|||
|
|||
private String titulo; |
|||
|
|||
/** |
|||
* Creates a new instance of DemoBeanMarca |
|||
*/ |
|||
public DemoBeanMarca() { |
|||
} |
|||
|
|||
public String agregar(){ |
|||
|
|||
marcaBL.agregar(marca); |
|||
marca = new Marca(); |
|||
return "marcaLista.xhtml"; |
|||
/* |
|||
Marca a = new Marca(); |
|||
//Para que te marque como id duplicaod tienes que asignarlo
|
|||
//a.setId(1);
|
|||
a.setMarca("Nike"); |
|||
|
|||
|
|||
Mensaje m = marcaBL.agregar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
return "index.xhtml"; |
|||
*/ |
|||
} |
|||
|
|||
public void editarMarca(){ |
|||
marcaBL.editarMarca(marca); |
|||
} |
|||
|
|||
public void eliminarMarca(){ |
|||
marcaBL.eliminarMarca(marca); |
|||
} |
|||
|
|||
public String buscar(){ |
|||
Marca a = new Marca(); |
|||
a.setId(10); |
|||
Mensaje m = marcaBL.buscarId(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el Autor: "); |
|||
System.out.println(marcaBL.buscarId(a)); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
//System.out.println("Encontre el Autor: ");
|
|||
//System.out.println(autorBL.buscarId(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String eliminar(){ |
|||
Marca a = marcaBL.buscarIdLi(new Marca(30)); |
|||
System.out.println("Autor eliminado: "); |
|||
Mensaje m = marcaBL.eliminarMarca(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
//System.out.println(autorBL.eliminar(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String editar() { |
|||
try{ |
|||
Marca a = marcaBL.buscarIdLi(new Marca(40)); |
|||
a.setMarca("Adidas"); |
|||
|
|||
Mensaje m = marcaBL.editarMarca(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
}catch(Exception e){ |
|||
System.out.println("Ha ocurrido un error: " + Mensaje.ELEMENTO_NO_ENCONTRADO); |
|||
} |
|||
//autorBL.editar(a);
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public List<Marca> getMarca(){ |
|||
return marcaBL.buscarTodos(); |
|||
} |
|||
|
|||
public Marca getMarcas() { |
|||
return marca; |
|||
} |
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public void prepararEditar(Marca marca){ |
|||
nuevo=false; |
|||
titulo="Editando marca"; |
|||
this.marca = marca; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo=true; |
|||
titulo="Agregando Marca"; |
|||
marca = new Marca(); |
|||
} |
|||
|
|||
public void prepararEliminar(Marca marca){ |
|||
this.marca = marca; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,338 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.ProveedoresBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.UbicacionBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.TallaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.MarcaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.CategoriaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.GeneroBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Productos; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.msg.Mensaje; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.ProductosBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.dao.ProductosDAO; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Categoria; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Genero; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Marca; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Proveedores; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Rol; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Talla; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Ubicacion; |
|||
|
|||
/** |
|||
* |
|||
* @author Ivan Alejandro PC |
|||
*/ |
|||
@Named(value = "demoBeanProductos") |
|||
@SessionScoped |
|||
public class DemoBeanProductos implements Serializable { |
|||
|
|||
@EJB |
|||
private ProductosBLLocal productosBL; |
|||
@EJB |
|||
private ProveedoresBLLocal proovedoresBL; |
|||
@EJB |
|||
private UbicacionBLLocal ubicacionBL; |
|||
@EJB |
|||
private TallaBLLocal tallaBL; |
|||
@EJB |
|||
private MarcaBLLocal marcaBL; |
|||
@EJB |
|||
private CategoriaBLLocal categoriaBL; |
|||
@EJB |
|||
private GeneroBLLocal generoBL; |
|||
|
|||
private Productos producto = new Productos(); |
|||
|
|||
private String titulo; |
|||
private boolean nuevo; |
|||
|
|||
|
|||
|
|||
public DemoBeanProductos() { |
|||
} |
|||
|
|||
//Aqui empieza lo de la clase pasada
|
|||
//Metodo para eliminar
|
|||
|
|||
public void eliminarProductos(){ |
|||
productosBL.desactivarProductos(producto); |
|||
} |
|||
|
|||
public void prepararEliminar(Productos productos){ |
|||
this.producto=productos; |
|||
} |
|||
|
|||
//Metodo de editar
|
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
public void editarProductos(){ |
|||
productosBL.editar(producto); |
|||
} |
|||
|
|||
|
|||
public void prepararEditar(Productos productos){ |
|||
nuevo = false; |
|||
titulo="Editando Productos"; |
|||
this.producto=productos; |
|||
} |
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo =true; |
|||
titulo="Agregando Productos"; |
|||
producto = new Productos(); |
|||
} |
|||
|
|||
|
|||
//------------------
|
|||
|
|||
|
|||
public String agregarProducto(){ |
|||
System.out.println(producto.getProveedoresid()); |
|||
System.out.println(producto.getUbicacionid()); |
|||
System.out.println(producto.getTallaid()); |
|||
System.out.println(producto.getMarcaid()); |
|||
System.out.println(producto.getCategoriaid()); |
|||
System.out.println(producto.getGeneroid()); |
|||
|
|||
/*producto.setStatus((short)1); |
|||
producto.setProveedoresid(proovedoresBL.buscarIdLi(new Proveedores(1))); |
|||
producto.setUbicacionid(ubicacionBL.buscarIdLi(new Ubicacion(3))); |
|||
producto.setTallaid(tallaBL.buscarIdLi(new Talla(1))); |
|||
producto.setMarcaid(marcaBL.buscarIdLi(new Marca(1))); |
|||
producto.setCategoriaid(categoriaBL.buscarIdLi(new Categoria(1))); |
|||
producto.setGeneroid(generoBL.buscarIdLi(new Genero(1)));*/ |
|||
|
|||
|
|||
productosBL.agregar(producto); |
|||
|
|||
producto = new Productos(); |
|||
|
|||
return "productosLista.xhtml"; |
|||
} |
|||
|
|||
public Productos getProducto() { |
|||
return producto; |
|||
} |
|||
|
|||
public void setProducto(Productos productos) { |
|||
this.producto = productos; |
|||
} |
|||
|
|||
public List<Productos> getStatusProductos(){ |
|||
short status = 1; |
|||
return productosBL.buscarStatus(status); |
|||
} |
|||
|
|||
public String metodo(){ |
|||
// try{
|
|||
Productos a = new Productos(); |
|||
|
|||
a.setNombre("dsd"); |
|||
a.setDescripcion("Para uso otro"); |
|||
a.setPrecio("1,500$"); |
|||
|
|||
a.setMaterial("Textil"); |
|||
a.setExistencia(22); |
|||
a.setProveedoresid(proovedoresBL.buscarIdLi(new Proveedores(1))); |
|||
//Ubi riene ID 2
|
|||
a.setUbicacionid(ubicacionBL.buscarIdLi(new Ubicacion(2))); |
|||
a.setTallaid(tallaBL.buscarIdLi(new Talla(1))); |
|||
a.setMarcaid(marcaBL.buscarIdLi(new Marca(1))); |
|||
a.setCategoriaid(categoriaBL.buscarIdLi(new Categoria(1))); |
|||
a.setGeneroid(generoBL.buscarIdLi(new Genero(1))); |
|||
|
|||
|
|||
Mensaje m = productosBL.agregar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Se agrego el producto: " + a.getNombre()); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
/* }catch(Exception e){ |
|||
System.out.println("Ha ocurrido un error: " + Mensaje.CAMPOS_INCOMPLETOS); |
|||
}*/ |
|||
return "index.xhtml"; |
|||
} |
|||
//BUSCAR POR ID este si funciona
|
|||
public String buscarID(){ |
|||
Productos a = new Productos(); |
|||
a.setId(1); |
|||
Mensaje m = productosBL.buscarId(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el ID_Producto: " + a.getId()); |
|||
//System.out.println("Encontre el Usuario: " + usuariosBL.buscarId(a));
|
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
|
|||
|
|||
// para buscar por nombre
|
|||
public String buscarNombre(){ |
|||
Productos a = new Productos(); |
|||
a.setNombre("Zapato"); |
|||
Mensaje m = productosBL.buscarNombre(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el Producto: " + a.getNombre()); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
//V3 status ganador
|
|||
public String buscarSTATUS() { |
|||
//short status = 1;
|
|||
List<Productos> usuariosStatus1 = productosBL.buscarStatus((short) 1); |
|||
if (!usuariosStatus1.isEmpty()) { |
|||
System.out.println("Busqueda por Status: "); |
|||
for (Productos usuario : usuariosStatus1) { |
|||
|
|||
System.out.println("Encontre el Producto con status 1: " + usuario.getNombre()); |
|||
} |
|||
|
|||
} else { |
|||
System.out.println("No se encontraron Productos con status 1."); |
|||
} |
|||
|
|||
List<Productos> usuariosStatus0 = productosBL.buscarStatus((short) 0); |
|||
if (!usuariosStatus0.isEmpty()) { |
|||
for (Productos usuario : usuariosStatus0) { |
|||
System.out.println("Encontre el Producto con status 0: " + usuario.getNombre()); |
|||
} |
|||
System.out.println("---------------------------------------------------------"); |
|||
} else { |
|||
System.out.println("No se encontraron Productos con status 0."); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String buscarTODOS() { |
|||
//short status = 1;
|
|||
List<Productos> usuariosStatus1 = productosBL.buscarStatus((short) 1); |
|||
if (!usuariosStatus1.isEmpty()) { |
|||
System.out.println("Buscar Todos: "); |
|||
for (Productos usuario : usuariosStatus1) { |
|||
|
|||
System.out.println("Encontre el Producto con status 1: " + usuario.getNombre()); |
|||
} |
|||
System.out.println("---------------------------------------------------------"); |
|||
} else { |
|||
System.out.println("No se encontraron usuarios con status 1."); |
|||
|
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
|
|||
public String activar(){ |
|||
try{ |
|||
Productos p = productosBL.buscarIdLi(new Productos(1)); |
|||
if(p.getStatus()==1){ |
|||
System.out.println("YA ESTA ACTIVADO"); |
|||
}else{ |
|||
p.setStatus((short)1); |
|||
Mensaje m = productosBL.activarProductos(p); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE ACTIVO CORRECTAMENTE"); |
|||
System.out.println(productosBL.activarProductos(p)); |
|||
}else{ |
|||
System.out.println("NO FUE POSIBLE ACTIVAR"); |
|||
} |
|||
|
|||
} |
|||
} catch (NullPointerException e) { |
|||
// Maneja la excepción o notifica el error
|
|||
System.out.println("No se encontro el ID"); |
|||
} |
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
|
|||
public String desactivar(){ |
|||
try{ |
|||
Productos p = productosBL.buscarIdLi(new Productos(1)); |
|||
if(p.getStatus()==0){ |
|||
System.out.println("YA ESTA DESACTIVADO"); |
|||
}else{ |
|||
p.setStatus((short)0); |
|||
Mensaje m = productosBL.desactivarProductos(p); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE DESACTIVO CORRECTAMENTE"); |
|||
System.out.println(productosBL.desactivarProductos(p)); |
|||
}else{ |
|||
System.out.println("NO FUE POSIBLE DESACTIVAR"); |
|||
} |
|||
} |
|||
} catch (NullPointerException e) { |
|||
// Maneja la excepción o notifica el error
|
|||
System.out.println("No se encontro el ID"); |
|||
} |
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
public String editar() { |
|||
try{ |
|||
|
|||
Productos a = productosBL.buscarIdLi(new Productos(1)); |
|||
a.setNombre("Test"); |
|||
a.setDescripcion("Test"); |
|||
a.setPrecio("1,200$"); |
|||
|
|||
a.setMaterial("Textil"); |
|||
a.setExistencia(12); |
|||
a.setProveedoresid(proovedoresBL.buscarIdLi(new Proveedores(1))); |
|||
a.setUbicacionid(ubicacionBL.buscarIdLi(new Ubicacion(2))); |
|||
a.setTallaid(tallaBL.buscarIdLi(new Talla(1))); |
|||
a.setMarcaid(marcaBL.buscarIdLi(new Marca(1))); |
|||
a.setCategoriaid(categoriaBL.buscarIdLi(new Categoria(1))); |
|||
a.setGeneroid(generoBL.buscarIdLi(new Genero(1))); |
|||
|
|||
|
|||
Mensaje m = productosBL.editar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Se edito el producto"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
}catch (NullPointerException e) { |
|||
// Maneja la excepción o notifica el error
|
|||
System.out.println("No se encontro el ID"); |
|||
} |
|||
|
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,285 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.CategoriaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.ProveedoresBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Proveedores; |
|||
|
|||
@Named(value = "demoBeanProveedores") |
|||
@SessionScoped |
|||
public class DemoBeanProveedores implements Serializable { |
|||
|
|||
|
|||
|
|||
@EJB |
|||
private ProveedoresBLLocal proveedorBL; |
|||
@EJB |
|||
private CategoriaBLLocal categoriaBL; |
|||
|
|||
private Proveedores proveedor = new Proveedores(); |
|||
|
|||
private String Titulo; |
|||
private boolean nuevo; |
|||
|
|||
//LISTAS
|
|||
ArrayList<String> Pais = new ArrayList(); |
|||
ArrayList<String> Estados = new ArrayList(); |
|||
ArrayList<String> Ciudad = new ArrayList(); |
|||
|
|||
//VARIABLES
|
|||
private String p; |
|||
private String e; |
|||
private String c; |
|||
|
|||
/** |
|||
* Creates a new instance of DemoBeanProveedores |
|||
*/ |
|||
public DemoBeanProveedores() { |
|||
} |
|||
|
|||
|
|||
public List<Proveedores> getStatusProveedor(){ |
|||
return proveedorBL.buscarStatus((short)1); |
|||
} |
|||
|
|||
|
|||
public String agregarProveedor(){ |
|||
proveedor.setStatus((short)1); |
|||
proveedor.setPais(p); |
|||
proveedor.setEstado(e); |
|||
proveedor.setCiudad(c); |
|||
proveedorBL.agregar(proveedor); |
|||
proveedor = new Proveedores(); |
|||
|
|||
return "vistaProveedores.xhtml"; |
|||
} |
|||
|
|||
|
|||
public void prepararEditar(Proveedores p){ |
|||
nuevo = false; |
|||
Titulo="Editando Proveedor"; |
|||
this.proveedor = p; |
|||
} |
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo = true; |
|||
Titulo="Agregando Proveedor"; |
|||
proveedor = new Proveedores(); |
|||
} |
|||
|
|||
public void editarProveedor(){ |
|||
nuevo = false; |
|||
proveedorBL.editarProveedor(proveedor); |
|||
} |
|||
|
|||
public void eliminarProveedor(){ |
|||
proveedorBL.eliminarProveedor(proveedor); |
|||
} |
|||
|
|||
public void prepararEliminar(Proveedores p){ |
|||
this.proveedor = p; |
|||
} |
|||
|
|||
//METODO PARA LISTAS
|
|||
public List<String> SeleccionarPais(){ |
|||
Pais.clear(); |
|||
Pais.add("Mexico"); |
|||
Pais.add("Estados Unidos"); |
|||
Pais.add("Venezuela"); |
|||
Pais.add("Colombia"); |
|||
return Pais; |
|||
} |
|||
|
|||
|
|||
public List<String> SeleccionarEstado(){ |
|||
Estados.clear(); |
|||
if(getP() != null && getP().equals("Mexico")){ |
|||
Estados.add("Jalisco"); |
|||
Estados.add("Nuevo Leon"); |
|||
Estados.add("Yucatan"); |
|||
Estados.add("baja California"); |
|||
return Estados; |
|||
}else if(getP() != null && getP().equals("Estados Unidos")){ |
|||
Estados.add("California"); |
|||
Estados.add("Nueva York"); |
|||
Estados.add("Ohio"); |
|||
Estados.add("Washington"); |
|||
return Estados; |
|||
}else if(getP() != null && getP().equals("Venezuela")){ |
|||
Estados.add("Miranda"); |
|||
Estados.add("Lara"); |
|||
Estados.add("Trujillo"); |
|||
Estados.add("Mérida"); |
|||
return Estados; |
|||
}else if(getP() != null && getP().equals("Colombia")){ |
|||
Estados.add("Bolívar"); |
|||
Estados.add("Santander"); |
|||
Estados.add("Atlántico"); |
|||
Estados.add("Antioquia"); |
|||
return Estados; |
|||
}else{ |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
public List<String> SeleccionarCiudad(){ |
|||
Ciudad.clear(); |
|||
|
|||
//VALIDACIONES MEXICO
|
|||
if(getE() != null && getE().equals("Jalisco")){ |
|||
Ciudad.add("Guadalajara"); |
|||
Ciudad.add("Zapopan"); |
|||
Ciudad.add("Tlaquepaque"); |
|||
Ciudad.add("Puerto Vallarta"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Nuevo Leon")){ |
|||
Ciudad.add("Monterrey"); |
|||
Ciudad.add("Guadalupe"); |
|||
Ciudad.add("Apodaca"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Yucatan")){ |
|||
Ciudad.add("Merida"); |
|||
Ciudad.add("Valladolid"); |
|||
Ciudad.add("Progreso"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("baja California")){ |
|||
Ciudad.add("Bolívar"); |
|||
Ciudad.add("Santander"); |
|||
Ciudad.add("Atlántico"); |
|||
Ciudad.add("Antioquia"); |
|||
return Ciudad; |
|||
} |
|||
|
|||
//VALIDACIONES DE ESTADOS UNIDOS.
|
|||
else if(getE() != null && getE().equals("California")){ |
|||
Ciudad.add("Los Ángeles"); |
|||
Ciudad.add("San Francisco"); |
|||
Ciudad.add("San Diego"); |
|||
Ciudad.add("San José"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Nueva York")){ |
|||
Ciudad.add("Manhattan"); |
|||
Ciudad.add("Brooklyn"); |
|||
Ciudad.add("Queens"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Ohio")){ |
|||
Ciudad.add("Columbus"); |
|||
Ciudad.add("Cleveland"); |
|||
Ciudad.add("Dayton"); |
|||
Ciudad.add("Toledo"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Washington")){ |
|||
Ciudad.add("Seattle"); |
|||
Ciudad.add("Spokane"); |
|||
Ciudad.add("Tacoma"); |
|||
Ciudad.add("Vancouver"); |
|||
return Ciudad; |
|||
} |
|||
|
|||
//VALIDACIONES DE VENEZUELA.
|
|||
else if(getE() != null && getE().equals("Miranda")){ |
|||
Ciudad.add("Los Teques"); |
|||
Ciudad.add("Guarenas"); |
|||
Ciudad.add("Cúa"); |
|||
Ciudad.add("Santa Teresa del Tuy"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Lara")){ |
|||
Ciudad.add("Barquisimeto"); |
|||
Ciudad.add("Carora"); |
|||
Ciudad.add("El Tocuyo"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Trujillo")){ |
|||
Ciudad.add("Valera"); |
|||
Ciudad.add("Boconó"); |
|||
Ciudad.add("Escuque"); |
|||
Ciudad.add("Valle de la Pascua"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Mérida")){ |
|||
Ciudad.add("El Vigía"); |
|||
Ciudad.add("Tovar"); |
|||
Ciudad.add("Mucuchíes"); |
|||
Ciudad.add("Ejido"); |
|||
return Ciudad; |
|||
} |
|||
|
|||
//VALIDACIONES DE COLOMBIA.
|
|||
else if(getE() != null && getE().equals("Bolivar")){ |
|||
Ciudad.add("Cartagena de Indias"); |
|||
Ciudad.add("Sincelejo"); |
|||
Ciudad.add("Magangué"); |
|||
Ciudad.add("Turbaco"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Santander")){ |
|||
Ciudad.add("Bucaramanga"); |
|||
Ciudad.add("Floridablanca"); |
|||
Ciudad.add("Girón"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Atlántico")){ |
|||
Ciudad.add("Barranquilla"); |
|||
Ciudad.add("Soledad"); |
|||
Ciudad.add("Malambo"); |
|||
Ciudad.add("Sabanalarga"); |
|||
return Ciudad; |
|||
}else if(getE() != null && getE().equals("Antioquia")){ |
|||
Ciudad.add("Medellín"); |
|||
Ciudad.add("Bello"); |
|||
Ciudad.add("Envigado"); |
|||
Ciudad.add("Rionegro"); |
|||
return Ciudad; |
|||
}else{ |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
//METODOS GET Y SET
|
|||
public String getTitulo() { |
|||
return Titulo; |
|||
} |
|||
|
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
public Proveedores getProveedor() { |
|||
return proveedor; |
|||
} |
|||
|
|||
public void setProveedor(Proveedores proveedor) { |
|||
this.proveedor = proveedor; |
|||
} |
|||
|
|||
public String getP() { |
|||
return p; |
|||
} |
|||
|
|||
public void setP(String p) { |
|||
this.p = p; |
|||
} |
|||
|
|||
public String getE() { |
|||
return e; |
|||
} |
|||
|
|||
public void setE(String e) { |
|||
this.e = e; |
|||
} |
|||
|
|||
public String getC() { |
|||
return c; |
|||
} |
|||
|
|||
public void setC(String c) { |
|||
this.c = c; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,213 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Rol; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.msg.Mensaje; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.RolBLLocal; |
|||
|
|||
/** |
|||
* |
|||
* @author Ivan Alejandro PC |
|||
*/ |
|||
@Named(value = "demoBeanRol") |
|||
@SessionScoped |
|||
public class DemoBeanRol implements Serializable { |
|||
|
|||
ArrayList<String> Lista = new ArrayList(); |
|||
|
|||
@EJB |
|||
private RolBLLocal rolBL; |
|||
|
|||
private Rol rol = new Rol(); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
|
|||
|
|||
|
|||
|
|||
/** |
|||
* Creates a new instance of DemoBean |
|||
*/ |
|||
public DemoBeanRol() { |
|||
} |
|||
|
|||
//Aqui empieza lo de la clase pasada
|
|||
//Metodo para eliminar
|
|||
|
|||
public void eliminarRoles(){ |
|||
rolBL.eliminar(rol); |
|||
} |
|||
|
|||
public void prepararEliminar(Rol rol){ |
|||
this.rol=rol; |
|||
} |
|||
|
|||
//Metodo de editar
|
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
public void editarRoles(){ |
|||
rolBL.editar(rol); |
|||
} |
|||
|
|||
|
|||
public void prepararEditar(Rol rol){ |
|||
nuevo = false; |
|||
titulo="Editando Roles"; |
|||
this.rol=rol; |
|||
} |
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo =true; |
|||
titulo="Agregando Roles"; |
|||
rol = new Rol(); |
|||
} |
|||
|
|||
public List<String> Seleccionar(){ |
|||
Lista.clear(); |
|||
Lista.add("Administrador del sistema"); |
|||
Lista.add("Gestor de inventario"); |
|||
Lista.add("Supervisor de almacén"); |
|||
Lista.add("Auditor de inventario"); |
|||
return Lista; |
|||
} |
|||
|
|||
|
|||
//------------------
|
|||
|
|||
|
|||
public String agregarRol(){ |
|||
|
|||
rolBL.agregar(rol); |
|||
|
|||
rol = new Rol(); |
|||
|
|||
return "rolLista.xhtml"; |
|||
} |
|||
|
|||
public Rol getRol() { |
|||
return rol; |
|||
} |
|||
|
|||
public void setRol(Rol rol) { |
|||
this.rol = rol; |
|||
} |
|||
|
|||
public List<Rol> getListRolll(){ |
|||
return rolBL.buscarTodos(); |
|||
} |
|||
|
|||
|
|||
public String metodo(){ |
|||
Rol a = new Rol(); |
|||
//Para que te marque como id duplicaod tienes que asignarlo
|
|||
//a.setId(1);
|
|||
a.setRolUsuario("Administrador"); |
|||
|
|||
|
|||
Mensaje m = rolBL.agregar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String buscar(){ |
|||
Rol a = new Rol(); |
|||
a.setId(31); |
|||
Mensaje m = rolBL.buscarId(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el Rol: " + a.getId()); |
|||
System.out.println(rolBL.buscarId(a)); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
//System.out.println("Encontre el Autor: ");
|
|||
//System.out.println(autorBL.buscarId(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
public String buscarPorNombre(){ |
|||
Rol a = new Rol(); |
|||
a.setRolUsuario("Ivan Alejandro"); |
|||
Mensaje m = rolBL.buscarRol(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el Rol: " + a.getRolUsuario()); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String buscarALLRol() { |
|||
//short status = 1;
|
|||
List<Rol> usuariosStatus1 = rolBL.buscarTodos(); |
|||
if (!usuariosStatus1.isEmpty()) { |
|||
System.out.println("Busqueda All: "); |
|||
for (Rol rol : usuariosStatus1) { |
|||
|
|||
System.out.println("Encontre los roles de usuario: "+ "ID: " + rol.getId() +" Rol: " + rol.getRolUsuario() ); |
|||
} |
|||
|
|||
} else { |
|||
System.out.println("No se encontraron roles de usuarios"); |
|||
} |
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
|
|||
public String eliminar(){ |
|||
Rol a = rolBL.buscarIdLi(new Rol(33)); |
|||
System.out.println("Autor eliminado: "); |
|||
Mensaje m = rolBL.eliminar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
//System.out.println(autorBL.eliminar(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String editar() { |
|||
try{ |
|||
Rol a = rolBL.buscarIdLi(new Rol(35)); |
|||
a.setRolUsuario("Trabajador"); |
|||
|
|||
Mensaje m = rolBL.editar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
}catch(Exception e){ |
|||
System.out.println("Ha ocurrido un error: " + Mensaje.ELEMENTO_NO_ENCONTRADO); |
|||
} |
|||
//autorBL.editar(a);
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,152 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.faces.view.ViewScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.TallaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Talla; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.msg.Mensaje; |
|||
|
|||
/** |
|||
* |
|||
* @author gael4 |
|||
*/ |
|||
@Named(value = "demoBeanTalla") |
|||
@SessionScoped |
|||
public class DemoBeanTalla implements Serializable { |
|||
|
|||
@EJB |
|||
private TallaBLLocal tallaBL; |
|||
|
|||
private Talla talla = new Talla(); |
|||
|
|||
private boolean nuevo; |
|||
|
|||
private String titulo; |
|||
|
|||
/** |
|||
* Creates a new instance of DemoBeanTalla |
|||
*/ |
|||
public DemoBeanTalla() { |
|||
} |
|||
|
|||
public String agregar(){ |
|||
|
|||
tallaBL.agregar(talla); |
|||
talla = new Talla(); |
|||
return "tallaLista.xhtml"; |
|||
/* |
|||
Talla a = new Talla(); |
|||
//Para que te marque como id duplicaod tienes que asignarlo
|
|||
//a.setId(1);
|
|||
a.setTalla("28"); |
|||
|
|||
|
|||
Mensaje m = tallaBL.agregar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
return "index.xhtml"; |
|||
*/ |
|||
} |
|||
|
|||
public void editarTalla(){ |
|||
tallaBL.editarTalla(talla); |
|||
} |
|||
|
|||
public void eliminarTalla(){ |
|||
tallaBL.eliminarTalla(talla); |
|||
} |
|||
|
|||
public String buscar(){ |
|||
Talla a = new Talla(); |
|||
a.setId(10); |
|||
Mensaje m = tallaBL.buscarId(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el Autor: "); |
|||
System.out.println(tallaBL.buscarId(a)); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
//System.out.println("Encontre el Autor: ");
|
|||
//System.out.println(autorBL.buscarId(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String eliminar(){ |
|||
Talla a = tallaBL.buscarIdLi(new Talla(30)); |
|||
System.out.println("Autor eliminado: "); |
|||
Mensaje m = tallaBL.eliminarTalla(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
//System.out.println(autorBL.eliminar(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String editar() { |
|||
try{ |
|||
Talla a = tallaBL.buscarIdLi(new Talla(40)); |
|||
a.setTalla("26"); |
|||
|
|||
Mensaje m = tallaBL.editarTalla(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
}catch(Exception e){ |
|||
System.out.println("Ha ocurrido un error: " + Mensaje.ELEMENTO_NO_ENCONTRADO); |
|||
} |
|||
//autorBL.editar(a);
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public List<Talla> getTalla(){ |
|||
return tallaBL.buscarTodos(); |
|||
} |
|||
|
|||
public Talla getTallas() { |
|||
return talla; |
|||
} |
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public void prepararEditar(Talla talla){ |
|||
nuevo=false; |
|||
titulo="Editando talla"; |
|||
this.talla = talla; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo=true; |
|||
titulo="Agregando Talla"; |
|||
talla = new Talla(); |
|||
} |
|||
|
|||
public void prepararEliminar(Talla talla){ |
|||
this.talla = talla; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,232 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Ubicacion; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.msg.Mensaje; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.UbicacionBLLocal; |
|||
|
|||
/** |
|||
* |
|||
* @author Ivan Alejandro PC |
|||
*/ |
|||
@Named(value = "demoBeanUbicacion") |
|||
@SessionScoped |
|||
public class DemoBeanUbicacion implements Serializable { |
|||
|
|||
@EJB |
|||
private UbicacionBLLocal ubicacionBL; |
|||
|
|||
private Ubicacion ubicacion = new Ubicacion(); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
|
|||
|
|||
|
|||
/** |
|||
* Creates a new instance of DemoBean |
|||
*/ |
|||
public DemoBeanUbicacion() { |
|||
} |
|||
//Aqui empieza lo de la clase pasada
|
|||
//Metodo para eliminar
|
|||
|
|||
public void eliminarUbicacion(){ |
|||
ubicacionBL.eliminar(ubicacion); |
|||
} |
|||
|
|||
public void prepararEliminar(Ubicacion ubicacion){ |
|||
this.ubicacion=ubicacion; |
|||
} |
|||
|
|||
//Metodo de editar
|
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
public void editarUbicaciones(){ |
|||
ubicacionBL.editar(ubicacion); |
|||
} |
|||
|
|||
|
|||
public void prepararEditar(Ubicacion ubicacion){ |
|||
nuevo = false; |
|||
titulo="Editando Almacenes"; |
|||
this.ubicacion=ubicacion; |
|||
} |
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo =true; |
|||
titulo="Agregando Almacenes"; |
|||
ubicacion = new Ubicacion(); |
|||
} |
|||
|
|||
|
|||
//------------------
|
|||
|
|||
public String agregarUbicacion(){ |
|||
|
|||
ubicacionBL.agregar(ubicacion); |
|||
|
|||
ubicacion = new Ubicacion(); |
|||
|
|||
return "ubicacionLista.xhtml"; |
|||
} |
|||
|
|||
public Ubicacion getUbicacion() { |
|||
return ubicacion; |
|||
} |
|||
|
|||
public void setUbicacion(Ubicacion ubicacion) { |
|||
this.ubicacion = ubicacion; |
|||
} |
|||
|
|||
public List<Ubicacion> getListUbicacion(){ |
|||
return ubicacionBL.buscarTodos(); |
|||
} |
|||
|
|||
public String metodo(){ |
|||
Ubicacion a = new Ubicacion(); |
|||
//Para que te marque como id duplicaod tienes que asignarlo
|
|||
//a.setId(1);
|
|||
a.setNombreAlmacen("Chapala, Modulo DAS"); |
|||
a.setEstante("Computo 2"); |
|||
a.setFila(2); |
|||
|
|||
|
|||
|
|||
|
|||
Mensaje m = ubicacionBL.agregar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE AGREGRO"+ a.getNombreAlmacen()); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String buscar(){ |
|||
Ubicacion a = new Ubicacion(); |
|||
a.setId(3); |
|||
Mensaje m = ubicacionBL.buscarId(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el ID_Ubicacion: " +a.getId()); |
|||
|
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
//System.out.println("Encontre el Autor: ");
|
|||
//System.out.println(autorBL.buscarId(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String buscarNombre(){ |
|||
Ubicacion a = new Ubicacion(); |
|||
a.setNombreAlmacen("Chapala, Modulo B"); |
|||
Mensaje m = ubicacionBL.buscarNombre(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el Almacen: " + a.getNombreAlmacen()); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
public String buscarALLUbica() { |
|||
//short status = 1;
|
|||
List<Ubicacion> usuariosStatus1 = ubicacionBL.buscarTodos(); |
|||
if (!usuariosStatus1.isEmpty()) { |
|||
System.out.println("Busqueda All: "); |
|||
for (Ubicacion ubicacion : usuariosStatus1) { |
|||
|
|||
System.out.println("Encontre las Ubicaciones: "+ "ID: " + ubicacion.getId() +" Ubicacion: " + ubicacion.getNombreAlmacen() + " Amacen: " |
|||
+ ubicacion.getEstante() + " Fila: " + ubicacion.getFila()); |
|||
} |
|||
|
|||
} else { |
|||
System.out.println("No se encontraron roles de usuarios"); |
|||
} |
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
|
|||
public String buscarEstante(){ |
|||
Ubicacion a = new Ubicacion(); |
|||
a.setEstante("Computo 3"); |
|||
Mensaje m = ubicacionBL.buscarEstante(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el Estante: " + a.getEstante()); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String buscarFila(){ |
|||
Ubicacion a = new Ubicacion(); |
|||
a.setFila(5); |
|||
Mensaje m = ubicacionBL.buscarFila(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre la Fila: " + a.getFila()); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String eliminar(){ |
|||
Ubicacion a = ubicacionBL.buscarIdLi(new Ubicacion(2)); |
|||
|
|||
Mensaje m = ubicacionBL.eliminar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Ubicacion eliminada "); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
//System.out.println(autorBL.eliminar(a));
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String editar() { |
|||
try{ |
|||
Ubicacion a = ubicacionBL.buscarIdLi(new Ubicacion(3)); |
|||
a.setNombreAlmacen("Zapopan, Modulo TestA"); |
|||
a.setEstante("Computo 1"); |
|||
a.setFila(5); |
|||
|
|||
Mensaje m = ubicacionBL.editar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE EDITO"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
}catch(Exception e){ |
|||
System.out.println("Ha ocurrido un error: " + Mensaje.ELEMENTO_NO_ENCONTRADO); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,317 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.RolBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.UsuariosBL; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Usuarios; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.msg.Mensaje; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.bl.UsuariosBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo.dao.UsuariosDAO; |
|||
import mx.edu.tsj.chapala.sistemas.inventario.modelo1.Rol; |
|||
import static org.primefaces.component.keyboard.KeyboardBase.PropertyKeys.password; |
|||
|
|||
/** |
|||
* |
|||
* @author Ivan Alejandro PC |
|||
*/ |
|||
@Named(value = "demoBeanUsuarios") |
|||
@SessionScoped |
|||
public class DemoBeanUsuarios implements Serializable { |
|||
|
|||
ArrayList<String> Lista = new ArrayList(); |
|||
|
|||
@EJB |
|||
private UsuariosBLLocal usuariosBL; |
|||
@EJB |
|||
private RolBLLocal rolBL; |
|||
|
|||
private Usuarios usuario = new Usuarios(); |
|||
|
|||
private String user = new Usuarios().getUsuario(); |
|||
private String pass = new Usuarios().getPassword(); |
|||
|
|||
private String titulo; |
|||
|
|||
private boolean nuevo; |
|||
|
|||
|
|||
public DemoBeanUsuarios() { |
|||
|
|||
} |
|||
//Metodo para eliminar
|
|||
|
|||
public void eliminarUsuario(){ |
|||
usuariosBL.desactivarUsuarios(usuario); |
|||
} |
|||
|
|||
public void prepararEliminar(Usuarios usuarios){ |
|||
this.usuario=usuarios; |
|||
} |
|||
|
|||
//Metodo de editar
|
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
public void editarUsuarios(){ |
|||
usuariosBL.editar(usuario); |
|||
} |
|||
|
|||
|
|||
public void prepararEditar(Usuarios usuarios){ |
|||
nuevo = false; |
|||
titulo="Editando Usuarios"; |
|||
this.usuario=usuarios; |
|||
} |
|||
|
|||
public void prepararNuevo(){ |
|||
nuevo =true; |
|||
titulo="Agregando Usuarios"; |
|||
usuario = new Usuarios(); |
|||
} |
|||
|
|||
public List<String> Seleccionar(){ |
|||
Lista.clear(); |
|||
Lista.add("Hombre"); |
|||
Lista.add("Mujer"); |
|||
|
|||
return Lista; |
|||
} |
|||
|
|||
public String metodo(){ |
|||
//try{
|
|||
Usuarios a = new Usuarios(); |
|||
|
|||
|
|||
|
|||
a.setUsuario("Pepe AAAA"); |
|||
a.setPassword("12345"); |
|||
a.setFechaRegistro(new Date ()); |
|||
//short status = 1;
|
|||
//a.setStatus(status);
|
|||
a.setRolid(rolBL.buscarIdLi(new Rol(6))); |
|||
|
|||
|
|||
Mensaje m = usuariosBL.agregar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Se gregro el usuario: " + a.getUsuario()); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
/* }catch(Exception e){ |
|||
System.out.println("Ha ocurrido un error: " + Mensaje.CAMPOS_INCOMPLETOS); |
|||
}*/ |
|||
return "index.xhtml"; |
|||
} |
|||
//BUSCAR POR ID este si funciona
|
|||
public String buscarID(){ |
|||
Usuarios a = new Usuarios(); |
|||
a.setId(6); |
|||
Mensaje m = usuariosBL.buscarId(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el ID_Usuario: " + a.getId()); |
|||
//System.out.println("Encontre el Usuario: " + usuariosBL.buscarId(a));
|
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public List<Usuarios> getStatusUser(){ |
|||
short status = 1; |
|||
return usuariosBL.buscarStatus(status); |
|||
} |
|||
|
|||
|
|||
|
|||
// para buscar por nombre
|
|||
public String buscarNombre(){ |
|||
Usuarios a = new Usuarios(); |
|||
a.setUsuario("Pepe lopez"); |
|||
Mensaje m = usuariosBL.buscarNombre(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Encontre el Usuario: " + a.getUsuario()); |
|||
}else{ |
|||
System.out.println("NO SE ENCONTRO"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
//V3 status ganador
|
|||
public String buscarSTATUS() { |
|||
//short status = 1;
|
|||
List<Usuarios> usuariosStatus1 = usuariosBL.buscarStatus((short) 1); |
|||
if (!usuariosStatus1.isEmpty()) { |
|||
System.out.println("Busqueda por Status: "); |
|||
for (Usuarios usuario1 : usuariosStatus1) { |
|||
|
|||
System.out.println("Encontre el Usuario con status 1: " + usuario1.getUsuario()); |
|||
} |
|||
|
|||
} else { |
|||
System.out.println("No se encontraron usuarios con status 1."); |
|||
} |
|||
|
|||
List<Usuarios> usuariosStatus0 = usuariosBL.buscarStatus((short) 0); |
|||
if (!usuariosStatus0.isEmpty()) { |
|||
for (Usuarios usuario1 : usuariosStatus0) { |
|||
System.out.println("Encontre el Usuario con status 0: " + usuario1.getUsuario()); |
|||
} |
|||
System.out.println("---------------------------------------------------------"); |
|||
} else { |
|||
System.out.println("No se encontraron usuarios con status 0."); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String buscarTODOS() { |
|||
//short status = 1;
|
|||
List<Usuarios> usuariosStatus1 = usuariosBL.buscarStatus((short) 1); |
|||
if (!usuariosStatus1.isEmpty()) { |
|||
System.out.println("Buscar Todos: "); |
|||
for (Usuarios usuario1 : usuariosStatus1) { |
|||
|
|||
System.out.println("Encontre el Usuario con status 1: " + usuario1.getUsuario()); |
|||
} |
|||
System.out.println("---------------------------------------------------------"); |
|||
} else { |
|||
System.out.println("No se encontraron usuarios con status 1."); |
|||
|
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public String agregarUsuario(){ |
|||
//esto le quite para hacer el test con lo de la llave F
|
|||
//usuario.setStatus((short)1);
|
|||
//usuario.setRolid(rolBL.buscarIdLi(new Rol(44)));
|
|||
System.out.println(usuario.getRolid()); |
|||
|
|||
usuariosBL.agregar(usuario); |
|||
|
|||
usuario = new Usuarios(); |
|||
|
|||
return "marcaLista3.xhtml"; |
|||
} |
|||
|
|||
|
|||
public String activar(){ |
|||
try{ |
|||
Usuarios p = usuariosBL.buscarIdLi(new Usuarios(4)); |
|||
|
|||
// Realizar operaciones con el objeto
|
|||
if(p.getStatus()==1){ |
|||
System.out.println("YA ESTA ACTIVADO"); |
|||
}else{ |
|||
p.setStatus((short)1); |
|||
Mensaje m = usuariosBL.activarUsuarios(p); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE ACTIVO CORRECTAMENTE"); |
|||
System.out.println(usuariosBL.activarUsuarios(p)); |
|||
}else{ |
|||
System.out.println("NO FUE POSIBLE ACTIVAR"); |
|||
} |
|||
|
|||
} |
|||
} catch (NullPointerException e) { |
|||
// Maneja la excepción o notifica el error
|
|||
System.out.println("No se encontro el ID"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
|
|||
public String desactivar(){ |
|||
try{ |
|||
Usuarios p = usuariosBL.buscarIdLi(new Usuarios(4)); |
|||
if(p.getStatus()==0){ |
|||
System.out.println("YA ESTA DESACTIVADO"); |
|||
}else{ |
|||
p.setStatus((short)0); |
|||
Mensaje m = usuariosBL.desactivarUsuarios(p); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("SE DESACTIVO CORRECTAMENTE"); |
|||
System.out.println(usuariosBL.desactivarUsuarios(p)); |
|||
}else{ |
|||
System.out.println("NO FUE POSIBLE DESACTIVAR"); |
|||
} |
|||
} |
|||
}catch (NullPointerException e) { |
|||
// Maneja la excepción o notifica el error
|
|||
System.out.println("No se encontro el ID"); |
|||
} |
|||
return "index.xhtml"; |
|||
} |
|||
|
|||
public Usuarios getUsuario() { |
|||
return usuario; |
|||
} |
|||
|
|||
public void setUsuario(Usuarios usuario) { |
|||
this.usuario = usuario; |
|||
} |
|||
// Esto es nuevo creo es para la llave foranea de rol
|
|||
public void agregarRol(){ |
|||
System.out.println(usuario.getRolid()); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
public String editar() { |
|||
try{ |
|||
Usuarios a = usuariosBL.buscarIdLi(new Usuarios(9)); |
|||
a.setUsuario("dddddddddddd new"); |
|||
a.setPassword("12345"); |
|||
a.setFechaRegistro(new Date ()); |
|||
a.setRolid(rolBL.buscarIdLi(new Rol(4))); |
|||
|
|||
|
|||
Mensaje m = usuariosBL.editar(a); |
|||
System.out.println(m); |
|||
if(m.compareTo(Mensaje.SIN_ERROR)==0){ |
|||
System.out.println("Se edito el usuario"); |
|||
}else{ |
|||
System.out.println("NO SE PUDO"); |
|||
} |
|||
}catch (NullPointerException e) { |
|||
// Maneja la excepción o notifica el error
|
|||
System.out.println("No se encontro el ID"); |
|||
} |
|||
|
|||
return "index.xhtml"; |
|||
} |
|||
//Metodo de logion
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,90 @@ |
|||
/* |
|||
* 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 mx.edu.tsj.chapala.sistemas.inventario.vista; |
|||
|
|||
import java.util.List; |
|||
import javax.faces.component.UIComponent; |
|||
import javax.faces.component.UISelectItem; |
|||
import javax.faces.component.UISelectItems; |
|||
import javax.faces.context.FacesContext; |
|||
import javax.faces.convert.Converter; |
|||
import javax.faces.convert.FacesConverter; |
|||
|
|||
/** |
|||
* The Class SelectOneMenuConverter. |
|||
*/ |
|||
@FacesConverter("selectOneMenuConverter") |
|||
public class SelectOneMenuConverter implements Converter { |
|||
|
|||
@Override |
|||
public Object getAsObject(final FacesContext arg0, final UIComponent arg1, final String objectString) { |
|||
if (objectString == null) { |
|||
return null; |
|||
} |
|||
|
|||
return fromSelect(arg1, objectString); |
|||
} |
|||
|
|||
/** |
|||
* Serialize. |
|||
* |
|||
* @param object |
|||
* the object |
|||
* @return the string |
|||
*/ |
|||
private String serialize(final Object object) { |
|||
if (object == null) { |
|||
return null; |
|||
} |
|||
return object.getClass() + "@" + object.hashCode(); |
|||
} |
|||
|
|||
/** |
|||
* From select. |
|||
* |
|||
* @param currentcomponent |
|||
* the currentcomponent |
|||
* @param objectString |
|||
* the object string |
|||
* @return the object |
|||
*/ |
|||
private Object fromSelect(final UIComponent currentcomponent, final String objectString) { |
|||
|
|||
if (currentcomponent.getClass() == UISelectItem.class) { |
|||
final UISelectItem item = (UISelectItem) currentcomponent; |
|||
final Object value = item.getValue(); |
|||
if (objectString.equals(serialize(value))) { |
|||
return value; |
|||
} |
|||
} |
|||
|
|||
if (currentcomponent.getClass() == UISelectItems.class) { |
|||
final UISelectItems items = (UISelectItems) currentcomponent; |
|||
final List<Object> elements = (List<Object>) items.getValue(); |
|||
for (final Object element : elements) { |
|||
if (objectString.equals(serialize(element))) { |
|||
return element; |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
if (!currentcomponent.getChildren().isEmpty()) { |
|||
for (final UIComponent component : currentcomponent.getChildren()) { |
|||
final Object result = fromSelect(component, objectString); |
|||
if (result != null) { |
|||
return result; |
|||
} |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public String getAsString(final FacesContext arg0, final UIComponent arg1, final Object object) { |
|||
return serialize(object); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,91 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
|
|||
<f:view> |
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminando Genero"/></h1> |
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanGenero.generos.id}" style="margin: 10px" title="Id" disabled="true"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Nombre:"/> |
|||
<p:inputText value="#{demoBeanGenero.generos.genero}" style="margin-right: 45px; margin-left: 10px; margin-top: 10px; margin-bottom: 20px" title="Nombre" disabled="true" /> |
|||
</div> |
|||
<p:commandButton action="vistaGenero.xhtml" styleClass="rounded-button ui-button-success" style="margin-left: 30px" actionListener="#{demoBeanGenero.eliminarGenero()}" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="vistaGenero.xhtml" styleClass="rounded-button ui-button-danger" style="margin-left: 10px" value="Cancelar" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,30 @@ |
|||
<?xml version='1.0' encoding='UTF-8'?> |
|||
<!-- |
|||
|
|||
Licensed to the Apache Software Foundation (ASF) under one |
|||
or more contributor license agreements. See the NOTICE file |
|||
distributed with this work for additional information |
|||
regarding copyright ownership. The ASF licenses this file |
|||
to you under the Apache License, Version 2.0 (the |
|||
"License"); you may not use this file except in compliance |
|||
with the License. You may obtain a copy of the License at |
|||
|
|||
http://www.apache.org/licenses/LICENSE-2.0 |
|||
|
|||
Unless required by applicable law or agreed to in writing, |
|||
software distributed under the License is distributed on an |
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
KIND, either express or implied. See the License for the |
|||
specific language governing permissions and limitations |
|||
under the License. |
|||
|
|||
--> |
|||
<faces-config version="2.2" |
|||
xmlns="http://xmlns.jcp.org/xml/ns/javaee" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> |
|||
|
|||
<lifecycle> |
|||
<phase-listener>mx.edu.tsj.chapala.sistemas.inventario.seguridad.AutorizacionListener</phase-listener> |
|||
</lifecycle> |
|||
</faces-config> |
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!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"> |
|||
<!-- |
|||
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 |
|||
--> |
|||
<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> |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"> |
|||
<context-param> |
|||
<param-name>javax.faces.PROJECT_STAGE</param-name> |
|||
<param-value>Development</param-value> |
|||
</context-param> |
|||
<servlet> |
|||
<servlet-name>Faces Servlet</servlet-name> |
|||
<servlet-class>javax.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/productosLista.xhtml</welcome-file> |
|||
</welcome-file-list> |
|||
<context-param> |
|||
<param-name>avax.faces.CONFIG_FILES</param-name> |
|||
<param-value>/WEB-INF/faces-config.xml</param-value> |
|||
</context-param> |
|||
</web-app> |
@ -0,0 +1,89 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanCategoria.titulo}"/></h1> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<div> |
|||
<p:outputLabel value="Categoria" for="categoria" /> |
|||
<p:inputText id="categoria" value="#{demoBeanCategoria.categorias.categoria}" style="margin: 20px" title="Categoria" required="true" validatorMessage="ingresa un valor valido" requiredMessage="Se requiere el campo categoria."> |
|||
<f:validateRegex pattern = "^[A-Za-z]{1,15}$" for="categoria"/> |
|||
</p:inputText> |
|||
</div> |
|||
|
|||
<p:commandButton action="#{demoBeanCategoria.agregar()}" value="Guardar" update="growl" style="margin-left: 90px" styleClass="rounded-button ui-button-success" rendered="#{demoBeanCategoria.nuevo}" ajax="false"/> |
|||
<p:commandButton action="categoriaLista.xhtml" actionListener="#{demoBeanCategoria.editarCategoria()}" style="margin-left: 110px" styleClass="rounded-button ui-button-success" value="Editar" update="growl" rendered="#{!demoBeanCategoria.nuevo}" ajax="false"/> |
|||
<p:commandButton action="categoriaLista.xhtml" value="Cancelar" style="margin-left: 10px" styleClass="rounded-button ui-button-danger" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
</ui:define> |
|||
</ui:composition> |
|||
</body> |
|||
</html> |
@ -0,0 +1,91 @@ |
|||
<?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:p="http://primefaces.org/ui" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminar Categoria"/></h1> |
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanCategoria.categorias.id}" style="margin: 10px" title="Id" disabled="true" /> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Categoria:"/> |
|||
<p:inputText value="#{demoBeanCategoria.categorias.categoria}" style="margin-right: 53px; margin-left: 10px; margin-top: 10px; margin-bottom: 20px" title="Categoria" disabled="true" /> |
|||
</div> |
|||
|
|||
<p:commandButton action="categoriaLista.xhtml" styleClass="rounded-button ui-button-success" style="margin-left: 30px" actionListener="#{demoBeanCategoria.eliminarCategoria()}" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="categoriaLista.xhtml" styleClass="rounded-button ui-button-danger" style="margin-left: 10px" value="Cancelar" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,112 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui" |
|||
xmlns:h="http://xmlns.jcp.org/jsf/html"> |
|||
|
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
right |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Categorias</span> |
|||
<br></br> |
|||
<p:commandButton action="categoriaCrear.xhtml" actionListener="#{demoBeanCategoria.prepararNuevo()}" value='Agregar' icon="pi pi-plus" styleClass="ui-button-success" style="margin: 10px" ajax="true" /> |
|||
|
|||
<p:dataTable value="#{demoBeanCategoria.categoria}" var="item" style="text-align: center; margin-top: 20px"> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Id" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.id}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Categoria" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.categoria}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones" style="text-align: center;"/> |
|||
</f:facet> |
|||
<p:commandButton action="categoriaCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanCategoria.prepararEditar(item)}" ajax="false"/> |
|||
<p:commandButton action="categoriaEliminar.xhtml" icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" actionListener="#{demoBeanCategoria.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
|
|||
</h:form> |
|||
|
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,98 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanColor.titulo}"/></h1> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<div> |
|||
<p:outputLabel value="Color:" for="color" /> |
|||
<p:inputText id="color" value="#{demoBeanColor.rol.color}" style="margin: 20px" title="Color" |
|||
required="true" requiredMessage="Se requiere campo Color." |
|||
validatorMessage="Solo se permiten letras en el campo Color."> |
|||
<f:validateRegex pattern="[a-zA-ZñÑáéíóúÁÉÍÓÚüÜ\s]+" /> |
|||
</p:inputText> |
|||
</div> |
|||
|
|||
|
|||
<p:commandButton action="#{demoBeanColor.agregarRol()}" style="margin-left: 50px" styleClass="rounded-button ui-button-success" value="Guardar" update="growl" rendered="#{demoBeanColor.nuevo}" ajax="false" /> |
|||
<p:commandButton action="colorLista.xhtml" style="margin-left: 70px" styleClass="rounded-button ui-button-success" actionListener="#{demoBeanColor.editarRoles()}" value="Editar" update="growl" rendered="#{!demoBeanColor.nuevo}" ajax="false"/> |
|||
<p:commandButton action="colorLista.xhtml" style="margin-left: 10px" styleClass="rounded-button ui-button-danger" value="Cancelar" immediate="true" ajax="false"/> |
|||
|
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,93 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminando Color"/></h1> |
|||
|
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanColor.rol.id}" style="margin: 10px" title="Id" disabled="true"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Color:"/> |
|||
<p:inputText value="#{demoBeanColor.rol.color}" style="margin-left: 10px; margin-right: 15px; margin-top: 10px; margin-bottom: 20px" disabled="true" title="Color" /> |
|||
</div> |
|||
<p:commandButton action="colorLista.xhtml" styleClass="rounded-button ui-button-success" style="margin-left: 30px" actionListener="#{demoBeanColor.eliminarRoles()}" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="colorLista.xhtml" styleClass="rounded-button ui-button-danger" style="margin-left: 10px" value="Cancelar" immediate="true" ajax="false"/> |
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,120 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
|
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
|
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
right |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Colores</span> |
|||
<br></br> |
|||
<p:commandButton action="colorCrear.xhtml" actionListener="#{demoBeanColor.prepararNuevo()}" value='Agregar' icon="pi pi-plus" style="margin: 10px" styleClass="ui-button-success" ajax="true"/> |
|||
|
|||
<p:dataTable value="#{demoBeanColor.listRolll}" var="item" style="text-align: center;"> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Id" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.id}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Color" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.color}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones" style="text-align: center;"/> |
|||
</f:facet> |
|||
<p:commandButton action="colorCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanColor.prepararEditar(item)}" ajax="true"/> |
|||
<p:commandButton action="colorEliminar.xhtml" icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" actionListener="#{demoBeanColor.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
|
|||
</p:dataTable> |
|||
|
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
|
|||
|
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,88 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanGenero.titulo}"/></h1> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<div> |
|||
<h:outputText value="Genero *"/> |
|||
<p:selectOneMenu id="generos" value="#{demoBeanGenero.gen}" style="margin: 20px" converter="selectOneMenuConverter" title="genero" required="true" requiredMessage="El campo genero es requerido."> |
|||
<!-- TODO: update below reference to list of available items--> |
|||
<f:selectItems id="genero" value="#{demoBeanGenero.Seleccionar()}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<p:commandButton action="vistaGenero.xhtml" actionListener="#{demoBeanGenero.agregarGenero()}" style="margin-left: -30px" value="Guardar" update="growl" styleClass="rounded-button ui-button-success" rendered="#{demoBeanGenero.nuevo}" ajax="false"/> |
|||
<p:commandButton action="vistaGenero.xhtml" actionListener="#{demoBeanGenero.editarGenero()}" style="margin-left: -20px" value="Editar" update="growl" styleClass="rounded-button ui-button-success" rendered="#{!demoBeanGenero.nuevo}" ajax="false"/> |
|||
<p:commandButton action="vistaGenero.xhtml" styleClass="rounded-button ui-button-danger" style="margin-left: 10px" value="Cancelar" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
</ui:define> |
|||
</ui:composition> |
|||
</body> |
|||
</html> |
@ -0,0 +1,15 @@ |
|||
<!DOCTYPE html> |
|||
<!-- |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/Html.html to edit this template |
|||
--> |
|||
<html> |
|||
<head> |
|||
<title>TODO supply a title</title> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
</head> |
|||
<body> |
|||
<div>TODO write content</div> |
|||
</body> |
|||
</html> |
@ -0,0 +1,85 @@ |
|||
<?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"> |
|||
<h:head> |
|||
<title>Inventario</title> |
|||
</h:head> |
|||
<h:body> |
|||
<h1>OPCIONES:</h1> |
|||
<h:form> |
|||
<h1>Menu de Roles: </h1> |
|||
<h:commandButton action="#{demoBeanRol.metodo()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBeanRol.buscar()}" value="Buscar por ID"/> |
|||
<h:commandButton action="#{demoBeanRol.buscarPorNombre()}" value="Buscar por Rol"/> |
|||
<h:commandButton action="#{demoBeanRol.buscarALLRol()}" value="Ver Roles"/> |
|||
<h:commandButton action="#{demoBeanRol.eliminar()}" value="Eliminar"/> |
|||
<h:commandButton action="#{demoBeanRol.editar()}" value="Editar"/> |
|||
|
|||
<h1>Menu de Usuarios: </h1> |
|||
<h:commandButton action="#{demoBeanUsuarios.metodo()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBeanUsuarios.buscarID()}" value="Buscar por Id"/> |
|||
<h:commandButton action="#{demoBeanUsuarios.buscarNombre()}" value="Buscar por Nombre"/> |
|||
<h:commandButton action="#{demoBeanUsuarios.buscarSTATUS()}" value="Buscar por Status"/> |
|||
<h:commandButton action="#{demoBeanUsuarios.buscarTODOS()}" value="Buscar Todos"/> |
|||
<h:commandButton action="#{demoBeanUsuarios.activar()}" value="Activar Usuario"/> |
|||
<h:commandButton action="#{demoBeanUsuarios.desactivar()}" value="Desctivar Usuario"/> |
|||
<h:commandButton action="#{demoBeanUsuarios.editar()}" value="Editar"/> |
|||
|
|||
<h1>Menu de Ubicaciones: </h1> |
|||
<h:commandButton action="#{demoBeanUbicacion.metodo()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBeanUbicacion.buscar()}" value="Buscar por ID"/> |
|||
<h:commandButton action="#{demoBeanUbicacion.buscarNombre()}" value="Buscar por Nombre"/> |
|||
<h:commandButton action="#{demoBeanUbicacion.buscarEstante()}" value="Buscar por Estante"/> |
|||
<h:commandButton action="#{demoBeanUbicacion.buscarFila()}" value="Buscar por Fila"/> |
|||
<h:commandButton action="#{demoBeanUbicacion.buscarALLUbica()}" value="Ver Ubicaciones"/> |
|||
<h:commandButton action="#{demoBeanUbicacion.eliminar()}" value="Eliminar"/> |
|||
<h:commandButton action="#{demoBeanUbicacion.editar()}" value="Editar"/> |
|||
|
|||
<h1>Menu de Productos </h1> |
|||
<h:commandButton action="#{demoBeanProductos.metodo()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBeanProductos.buscarID()}" value="Buscar por Id"/> |
|||
<h:commandButton action="#{demoBeanProductos.buscarNombre()}" value="Buscar por Nombre"/> |
|||
<h:commandButton action="#{demoBeanProductos.buscarSTATUS()}" value="Buscar por Status"/> |
|||
<h:commandButton action="#{demoBeanProductos.buscarTODOS()}" value="Buscar Todos"/> |
|||
<h:commandButton action="#{demoBeanProductos.activar()}" value="Activar Producto"/> |
|||
<h:commandButton action="#{demoBeanProductos.desactivar()}" value="Desctivar Producto"/> |
|||
<h:commandButton action="#{demoBeanProductos.editar()}" value="Editar"/> |
|||
|
|||
<h1>Menu de Genero: </h1> |
|||
<h:commandButton action="#{demoBeanGenero.agregar()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBeanGenero.buscar()}" value="Buscar"/> |
|||
<h:commandButton action="#{demoBeanGenero.editar()}" value="Editar"/> |
|||
<h:commandButton action="#{demoBeanGenero.eliminar()}" value="Eliminar"/> |
|||
|
|||
<h1>Menu de Proveedores: </h1> |
|||
<h:commandButton action="#{demoBeanProveedores.agregar()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBeanProveedores.buscar()}" value="Buscar"/> |
|||
<h:commandButton action="#{demoBeanProveedores.editar()}" value="Editar"/> |
|||
<h:commandButton action="#{demoBeanProveedores.desactivar()}" value="Desactivar"/> |
|||
<h:commandButton action="#{demoBeanProveedores.activar()}" value="Activar"/> |
|||
<h:commandButton action="#{demoBeanProveedores.buscarNombre()}" value="Buscar por nombre"/> |
|||
<h:commandButton action="#{demoBeanProveedores.buscarSTATUS()}" value="Buscar por status"/> |
|||
<h:commandButton action="#{demoBeanProveedores.buscarTODOS()}" value="Buscar todos"/> |
|||
|
|||
<h1>Menu de Categoria: </h1> |
|||
<h:commandButton action="#{demoBeanCategoria.agregar()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBeanCategoria.buscar()}" value="Buscar"/> |
|||
<h:commandButton action="#{demoBeanCategoria.eliminar()}" value="Eliminar"/> |
|||
<h:commandButton action="#{demoBeanCategoria.editar()}" value="Editar"/> |
|||
|
|||
<h1>Menu de Marca: </h1> |
|||
<h:commandButton action="#{demoBeanMarca.agregar()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBeanMarca.buscar()}" value="Buscar"/> |
|||
<h:commandButton action="#{demoBeanMarca.eliminar()}" value="Eliminar"/> |
|||
<h:commandButton action="#{demoBeanMarca.editar()}" value="Editar"/> |
|||
|
|||
<h1>Menu de Talla: </h1> |
|||
<h:commandButton action="#{demoBeanTalla.agregar()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBeanTalla.buscar()}" value="Buscar"/> |
|||
<h:commandButton action="#{demoBeanTalla.eliminar()}" value="Eliminar"/> |
|||
<h:commandButton action="#{demoBeanTalla.editar()}" value="Editar"/> |
|||
|
|||
</h:form> |
|||
</h:body> |
|||
</html> |
@ -0,0 +1,37 @@ |
|||
<!DOCTYPE html> |
|||
<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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
<h:head> |
|||
<title>Inicio de sesión</title> |
|||
<h:outputStylesheet library="css" name="styles.css" /> |
|||
|
|||
|
|||
|
|||
</h:head> |
|||
<h:body> |
|||
<h:form id="loginForm"> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<h2>Iniciar sesión</h2> |
|||
<h:panelGrid columns="2" id="loginPanel"> |
|||
<p:outputLabel for="username" value="Usuario:" /> |
|||
<p:inputText id="username" value="#{demoBeanLogin.username}" title="Usuario" required="true" validatorMessage="El número 0 es inválido" > |
|||
<f:validateLength minimum="1" maximum="100" /> |
|||
</p:inputText> |
|||
|
|||
|
|||
|
|||
<p:outputLabel for="password" value="Contraseña:" /> |
|||
<p:password id="password" value="#{demoBeanLogin.password}" title="Contraseña" required="true" validatorMessage="El número 0 es inválido"> |
|||
<f:validateLength minimum="1" maximum="100" /> |
|||
</p:password> |
|||
|
|||
<h:commandButton value="Iniciar sesión" action="#{demoBeanLogin.buscarPorLogin}" /> |
|||
|
|||
<p:message for="loginForm" id="errorMessage" /> |
|||
</h:panelGrid> |
|||
</h:form> |
|||
</h:body> |
|||
</html> |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/XHtml.xhtml to edit this template |
|||
--> |
|||
<!DOCTYPE html> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title>TODO supply a title</title> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
|||
</head> |
|||
<body> |
|||
<div>TODO write content</div> |
|||
</body> |
|||
</html> |
@ -0,0 +1,91 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanMarca.titulo}"/></h1> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<div> |
|||
<p:outputLabel value="Marca" for="marca" /> |
|||
<p:inputText id="marca" value="#{demoBeanMarca.marcas.marca}" style="margin: 20px" title="Marca" required="true" validatorMessage="ingresa un valor valido" requiredMessage="Se requiere el campo de marca."> |
|||
<f:validateRegex pattern = "^[A-Za-z0-9]{1,15}$" for="categoria"/> |
|||
</p:inputText> |
|||
</div> |
|||
<p:commandButton action="#{demoBeanMarca.agregar()}" style="margin-left: 70px" styleClass="rounded-button ui-button-success" value="Guardar" update="growl" rendered="#{demoBeanMarca.nuevo}" ajax="false"/> |
|||
<p:commandButton action="marcaLista.xhtml" style="margin-left: 80px" styleClass="rounded-button ui-button-success" actionListener="#{demoBeanMarca.editarMarca()}" value="Editar" update="growl" rendered="#{!demoBeanMarca.nuevo}" ajax="false"/> |
|||
<p:commandButton action="marcaLista.xhtml" style="margin-left: 10px" styleClass="rounded-button ui-button-danger" value="Cancelar" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,90 @@ |
|||
<?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:p="http://primefaces.org/ui" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminando Marca"/></h1> |
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanMarca.marcas.id}" style="margin: 10px" title="Id" disabled="true"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Marca:"/> |
|||
<p:inputText value="#{demoBeanMarca.marcas.marca}" style="margin-left: 10px; margin-right: 35px; margin-top: 10px; margin-bottom: 20px" title="Marca" disabled="true" /> |
|||
</div> |
|||
<p:commandButton action="marcaLista.xhtml" styleClass="rounded-button ui-button-success" style="margin-left: 30px" actionListener="#{demoBeanMarca.eliminarMarca()}" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="marcaLista.xhtml" styleClass="rounded-button ui-button-danger" style="margin-left: 10px" value="Cancelar" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,110 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui" |
|||
xmlns:h="http://xmlns.jcp.org/jsf/html"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
right |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Marca</span> |
|||
<br></br> |
|||
<p:commandButton action="marcaCrear.xhtml" actionListener="#{demoBeanMarca.prepararNuevo()}" value='Agregar' icon="pi pi-plus" style="margin: 10px" styleClass="ui-button-success" ajax="true" /> |
|||
|
|||
<p:dataTable value="#{demoBeanMarca.marca}" var="item" style="text-align: center;"> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Id" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.id}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Marca" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.marca}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones" style="text-align: center;"/> |
|||
</f:facet> |
|||
<p:commandButton action="marcaCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanMarca.prepararEditar(item)}" ajax="false"/> |
|||
<p:commandButton action="marcaEliminar.xhtml" icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" actionListener="#{demoBeanMarca.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
|
|||
</h:form> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,143 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
|
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
right |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Usuarios</span> |
|||
<br></br> |
|||
<p:commandButton action="usuarioCrear.xhtml" actionListener="#{demoBeanUsuarios.prepararNuevo()}" value='Agregar' icon="pi pi-plus" style="margin: 10px" styleClass="ui-button-success" ajax="true"/> |
|||
|
|||
<p:dataTable value="#{demoBeanUsuarios.statusUser}" var="item" style="text-align: center;"> |
|||
|
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Id" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.id}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Usuario" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.usuario}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Contraseña" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.password}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Genero" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.sexo}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Fecha de Registro" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.fechaRegistro}"> |
|||
<f:convertDateTime pattern="MM/dd/yyyy" /> |
|||
</h:outputText> |
|||
</p:column> |
|||
|
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Rol" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.rolid.rolUsuario}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones" style="text-align: center;"/> |
|||
</f:facet> |
|||
<p:commandButton action="usuarioCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanUsuarios.prepararEditar(item)}" ajax="true"/> |
|||
<p:commandButton action="usuariosEliminar.xhtml" icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" actionListener="#{demoBeanUsuarios.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
|
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
|
|||
|
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,177 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/principal.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
|
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanProductos.titulo}"/></h1> |
|||
|
|||
<p:dataTable value="#{demoBeanColor.listRolll}" var="itemCo"></p:dataTable> |
|||
<p:dataTable value="#{demoBeanCategoria.categoria}" var="itemC"></p:dataTable> |
|||
<p:dataTable value="#{demoBeanGenero.genero}" var="itemG"></p:dataTable> |
|||
<p:dataTable value="#{demoBeanMarca.marca}" var="itemM"></p:dataTable> |
|||
<p:dataTable value="#{demoBeanProveedores.statusProveedor}" var="itemP"></p:dataTable> |
|||
<p:dataTable value="#{demoBeanTalla.talla}" var="itemT"></p:dataTable> |
|||
<p:dataTable value="#{demoBeanUbicacion.listUbicacion}" var="itemU"></p:dataTable> |
|||
|
|||
<p:growl id="growl" showDetail="true" /> |
|||
<p:dataTable value="#{demoBeanProveedores.statusProveedor}" var="itemcv"></p:dataTable> |
|||
<p:dataTable value="#{demoBeanUbicacion.listUbicacion}" var="itemU"></p:dataTable> |
|||
|
|||
<div> |
|||
<p:outputLabel value="Nombre:" for="nombre" /> |
|||
<p:inputText id="nombre" value="#{demoBeanProductos.producto.nombre}" style="margin: 20px" title="Nombre" required="true" requiredMessage="Se requiere campo Nombre."/> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Descripcion:" for="descripcion" /> |
|||
<p:inputText id="descripcion" value="#{demoBeanProductos.producto.descripcion}" style="margin-left: 20px; margin-right: 45px; margin-bottom: 20px" title="Descripcion" required="true" requiredMessage="Se requiere campo Descripcion."/> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Precio:" for="precio" /> |
|||
<p:inputText id="precio" value="#{demoBeanProductos.producto.precio}" style="margin-left: 20px; margin-right: 5px; margin-bottom: 20px" title="Precio" required="true" validatorMessage="Se requiere campo Valido en Precio" requiredMessage="Se requiere campo Precio."> |
|||
<f:validateRegex pattern="^\d+(\.\d+)?$" /> |
|||
</p:inputText> |
|||
</div> |
|||
|
|||
<div> |
|||
<p:outputLabel value="Material:" for="material" /> |
|||
<p:inputText id="material" value="#{demoBeanProductos.producto.material}" style="margin-left: 20px; margin-right: 25px; margin-bottom: 20px" title="Material" required="true" requiredMessage="Se requiere campo Material."/> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Existencia:" for="existencia" /> |
|||
<p:inputText id="existencia" value="#{demoBeanProductos.producto.existencia}" style="margin-left: 20px; margin-top: 20px; margin-bottom:20px " title="Existencia" required="true" validatorMessage="El número 0 es inválido" requiredMessage="Se requiere campo Existencia."> |
|||
<f:validateLongRange minimum="1" /> |
|||
</p:inputText> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Color:" for="colorid" /> |
|||
<p:selectOneMenu id="colorid" value="#{demoBeanProductos.producto.colorid}" converter="selectOneMenuConverter" style="margin-left: 20px; margin-right: 150px; margin-bottom: 20px" title="Colorid" required="true" requiredMessage="Se requiere campo Color."> |
|||
<f:selectItems value="#{demoBeanColor.listRolll}" var="itemCo" itemLabel="#{itemCo.color}" itemValue="#{itemCo}"/> |
|||
|
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Categoria:" for="categoriaid" /> |
|||
<p:selectOneMenu id="categoriaid" value="#{demoBeanProductos.producto.categoriaid}" converter="selectOneMenuConverter" style="margin-left: 20px; margin-right: 150px; margin-bottom: 20px" title="Categoriaid" required="true" requiredMessage="Se requiere campo Categoria."> |
|||
|
|||
<f:selectItems value="#{demoBeanCategoria.categoria}" var="itemC" itemLabel="#{itemC.categoria}" itemValue="#{itemC}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Genero:" for="generoid" /> |
|||
<p:selectOneMenu id="generoid" value="#{demoBeanProductos.producto.generoid}" converter="selectOneMenuConverter" style="margin-left: 20px; margin-right: 120px; margin-bottom: 20px" title="Generoid" required="true" requiredMessage="Se requiere campo Genero."> |
|||
|
|||
<f:selectItems value="#{demoBeanGenero.genero}" var="itemG" itemLabel="#{itemG.genero}" itemValue="#{itemG}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Marca:" for="marcaid" /> |
|||
<p:selectOneMenu id="marcaid" value="#{demoBeanProductos.producto.marcaid}" converter="selectOneMenuConverter" style="margin-left: 20px; margin-right: 120px; margin-bottom: 20px" title="Marcaid" required="true" requiredMessage="Se requiere campo Marca."> |
|||
|
|||
<f:selectItems value="#{demoBeanMarca.marca}" var="itemM" itemLabel="#{itemM.marca}" itemValue="#{itemM}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Proveedores:" for="proveedoresid" /> |
|||
<p:selectOneMenu id="proveedoresid" value="#{demoBeanProductos.producto.proveedoresid}" converter="selectOneMenuConverter" style="margin-left: 20px; margin-right: 180px; margin-bottom: 20px" title="Proveedoresid" required="true" requiredMessage="Se requiere campo Proveedores."> |
|||
|
|||
<f:selectItems value="#{demoBeanProveedores.statusProveedor}" var="itemP" itemLabel="#{itemP.nombre}" itemValue="#{itemP}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Talla:" for="tallaid" /> |
|||
<p:selectOneMenu id="tallaid" value="#{demoBeanProductos.producto.tallaid}" converter="selectOneMenuConverter" style="margin-left: 20px; margin-right: 130px; margin-bottom: 20px" title="Tallaid" required="true" requiredMessage="Se requiere campo Talla."> |
|||
|
|||
<f:selectItems value="#{demoBeanTalla.talla}" var="itemT" itemLabel="#{itemT.talla}" itemValue="#{itemT}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Ubicacion:" for="ubicacionid" /> |
|||
<p:selectOneMenu id="ubicacionid" value="#{demoBeanProductos.producto.ubicacionid}" converter="selectOneMenuConverter" style="margin-left: 20px; margin-right: 80px; margin-bottom: 20px" title="Ubicacionid" required="true" requiredMessage="Se requiere campo Ubicacion."> |
|||
|
|||
<f:selectItems value="#{demoBeanUbicacion.listUbicacion}" var="itemU" itemLabel="#{itemU.nombreAlmacen}" itemValue="#{itemU}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
|
|||
<p:commandButton action="#{demoBeanProductos.agregarProducto()}" style="margin-left: 50px" styleClass="rounded-button ui-button-success" value="Guardar" update="growl" rendered="#{demoBeanProductos.nuevo}" ajax="false"/> |
|||
<p:commandButton action="productosLista.xhtml" actionListener="#{demoBeanProductos.editarProductos()}" style="margin-left: 90px" styleClass="rounded-button ui-button-success" value="Editar" update="growl" rendered="#{!demoBeanProductos.nuevo}" ajax="false"/> |
|||
|
|||
<p:commandButton action="productosLista.xhtml" value="Cancelar" style="margin-left: 10px" styleClass="rounded-button ui-button-danger" immediate="true" ajax="false"/> |
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,142 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminando Productos"/></h1> |
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.id}" style="margin: 20px" disabled="true" title="Id" /> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Nombre:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.nombre}" style="margin-left: 20px; margin-right: 55px; margin-bottom: 20px" disabled="true" title="Nombre"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Descripcion:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.descripcion}" style="margin-left: 20px; margin-right: 75px; margin-bottom: 20px" disabled="true" title="Descripcion"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Precio:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.precio}" style="margin-left: 20px; margin-right: 40px; margin-bottom: 20px" disabled="true" title="Precio"/> |
|||
</div> |
|||
|
|||
<div> |
|||
<h:outputText value="Material:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.material}" style="margin-left: 20px; margin-right: 50px; margin-bottom: 20px" disabled="true" title="Material"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Existencia:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.existencia}" style="margin-left: 20px; margin-right: 60px; margin-bottom: 20px" disabled="true" title="Existencia"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Status:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.status ==1?'Activo':'Inactivo'}" style="margin-left: 20px; margin-right: 40px; margin-bottom: 20px" disabled="true" title="Status"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Color:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.colorid.color}" style="margin-left: 20px; margin-right: 60px; margin-bottom: 20px" disabled="true" title="Colorid"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Categoria:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.categoriaid.categoria}" style="margin-left: 20px; margin-right: 60px; margin-bottom: 20px" disabled="true" title="Categoriaid"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Genero:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.generoid.genero}" style="margin-left: 20px; margin-right: 50px; margin-bottom: 20px" disabled="true" title="Generoid"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Marca:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.marcaid.marca}" style="margin-left: 20px; margin-right: 40px; margin-bottom: 20px" disabled="true" title="Marcaid"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Proveedores:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.proveedoresid.nombre}" style="margin-left: 20px; margin-right: 80px; margin-bottom: 20px" disabled="true" title="Proveedoresid"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Talla:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.tallaid.talla}" style="margin-left: 20px; margin-right: 30px; margin-bottom: 20px" disabled="true" title="Tallaid"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Ubicacion:"/> |
|||
<p:inputText value="#{demoBeanProductos.producto.ubicacionid.nombreAlmacen}" style="margin-left: 20px; margin-right: 60px; margin-bottom: 20px" disabled="true" title="Ubicacionid"/> |
|||
</div> |
|||
|
|||
<p:commandButton action="productosLista.xhtml" actionListener="#{demoBeanProductos.eliminarProductos()}" style="margin-left: 30px" styleClass="rounded-button ui-button-success" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="productosLista.xhtml" value="Cancelar" styleClass="rounded-button ui-button-danger" style="margin-left: 10px" immediate="true" ajax="false"/> |
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,190 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
|
|||
<link rel="stylesheet" type="resources/css" href="cssLayout.css"/> |
|||
|
|||
<body> |
|||
|
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left" > |
|||
|
|||
|
|||
<!-- Tes menu --> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
right |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Productos</span> |
|||
<br></br> |
|||
<p:commandButton action="productosCrear.xhtml" actionListener="#{demoBeanProductos.prepararNuevo()}" value='Agregar' icon="pi pi-plus" style="margin: 10px" styleClass="ui-button-success" ajax="true"/> |
|||
|
|||
|
|||
|
|||
<p:dataTable value="#{demoBeanProductos.statusProductos}" var="item" styleClass="centrar;" resizableColumns="true"> |
|||
|
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Nombre" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.nombre}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Descripcion" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.descripcion}"/> |
|||
</p:column> |
|||
<p:column styleClass="columnas2"> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Precio" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.precio}"/> |
|||
</p:column> |
|||
|
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Material" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.material}"/> |
|||
</p:column> |
|||
<p:column styleClass="columnas"> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Stock" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.existencia}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Color" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.colorid.color}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Categoria" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.categoriaid.categoria}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Genero" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.generoid.genero}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Marca" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.marcaid.marca}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Proveedor" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.proveedoresid.nombre}"/> |
|||
</p:column> |
|||
<p:column styleClass="columnas"> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Talla" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.tallaid.talla}"/> |
|||
</p:column> |
|||
<p:column styleClass="salto"> |
|||
<f:facet name="header" > |
|||
<h:outputText value="Ubicacion" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.ubicacionid.nombreAlmacen}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones" style="text-align: center;"/> |
|||
</f:facet> |
|||
<p:commandButton action="productosCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanProductos.prepararEditar(item)}" ajax="true"/> |
|||
<p:commandButton icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" action="productosEliminar.xhtml" actionListener="#{demoBeanProductos.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
|
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
|
|||
|
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,136 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
|
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanProveedores.titulo}"/></h1> |
|||
<p:dataTable value="#{demoBeanCategoria.categoria}" var="itemC"></p:dataTable> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<div> |
|||
<p:outputLabel value="Nombre:" for="nombre" /> |
|||
<p:inputText id="nombre" value="#{demoBeanProveedores.proveedor.nombre}" style="margin: 20px" title="nombre" required="true" validatorMessage="El nombre debe de ser minimo de tres letras." requiredMessage="Se requiere el campo nombre."> |
|||
<f:validateRegex pattern="^[a-zA-Z]{3,}+$" for="nombre"/> |
|||
</p:inputText> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Correo:" for="correo" /> |
|||
<p:inputText id="correo" value="#{demoBeanProveedores.proveedor.correo}" style="margin-left: 20px; margin-right: 10px; margin-bottom: 20px" title="correo" required="true" validatorMessage="El correo no es valido" requiredMessage="Se requiere el campo correo."> |
|||
<f:validateRegex pattern="^[\w\.-]+@[\w\.-]+\.\w+$" for="correo"/> |
|||
</p:inputText> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Direccion:" for="direccion" /> |
|||
<p:inputText id="direccion" value="#{demoBeanProveedores.proveedor.direccion}" style="margin-left: 20px; margin-right: 25px; margin-bottom: 20px" title="direccion" required="true" validatorMessage="La direeccion no es valida " requiredMessage="Se requiere el campo direccion."> |
|||
<f:validateRegex pattern="^[a-zA-Z0-9\s]+$" for="direccion"/> |
|||
</p:inputText> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Pais *"/> |
|||
<p:selectOneMenu id="paises" value="#{demoBeanProveedores.p}" style="margin: 20px" converter="selectOneMenuConverter" title="pais" required="true"> |
|||
<f:selectItems id="pais" value="#{demoBeanProveedores.SeleccionarPais()}"/> |
|||
<p:ajax listener="#{demoBeanProveedores.SeleccionarEstado()}" update="estados"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Estado *"/> |
|||
<p:selectOneMenu id="estados" value="#{demoBeanProveedores.e}" style="margin: 20px" converter="selectOneMenuConverter" title="estado" required="true" appendTo="@this"> |
|||
<f:selectItems id="estado" value="#{demoBeanProveedores.SeleccionarEstado()}" /> |
|||
<p:ajax listener="#{demoBeanProveedores.SeleccionarCiudad()}" update="ciudades" /> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Ciudad *"/> |
|||
<p:selectOneMenu id="ciudades" value="#{demoBeanProveedores.c}" style="margin: 20px" converter="selectOneMenuConverter" title="ciudad" required="true" appendTo="@this"> |
|||
<f:selectItems id="ciudad" value="#{demoBeanProveedores.SeleccionarCiudad()}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Telefono" for="telefono" /> |
|||
<p:inputText id="telefono" value="#{demoBeanProveedores.proveedor.telefono}" style="margin-left: 20px; margin-right: 15px; margin-bottom: 20px" title="telefono" required="true" validatorMessage="El telefono debe de llevar la extension de tu pais." requiredMessage="Se requiere el campo telefono."> |
|||
<f:validateRegex pattern="^[+]+[0-9]{2}+[0-9]{10}+$" for="telefono"/> |
|||
</p:inputText> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Tipo_Producto:" for="categoriaid" /> |
|||
<p:selectOneMenu id="categoriaid" value="#{demoBeanProveedores.proveedor.categoriaid}" converter="selectOneMenuConverter" style="margin-left: 20px; margin-right: 150px; margin-bottom: 20px" title="Categoriaid" required="true" requiredMessage="Se requiere campo Categoria."> |
|||
<f:selectItems value="#{demoBeanCategoria.categoria}" var="itemC" itemLabel="#{itemC.categoria}" itemValue="#{itemC}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
|
|||
<p:commandButton action="#{demoBeanProveedores.agregarProveedor()}" value="Guardar" style="margin-left: 90px" update="growl" styleClass="rounded-button ui-button-success" rendered="#{demoBeanProveedores.nuevo}" ajax="false"/> |
|||
<p:commandButton action="vistaProveedores.xhtml" style="margin-left: 100px" actionListener="#{demoBeanProveedores.editarProveedor()}" value="Editar" update="growl" styleClass="rounded-button ui-button-success" rendered="#{!demoBeanProveedores.nuevo}" ajax="false"/> |
|||
<p:commandButton action="vistaProveedores.xhtml" style="margin-left: 10px" value="Cancelar" styleClass="rounded-button ui-button-danger" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,114 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
|
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminar Proveedor"/></h1> |
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanProveedores.proveedor.id}" style="margin: 20px" title="Id" disabled="true"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Nombre:"/> |
|||
<p:inputText value="#{demoBeanProveedores.proveedor.nombre}" style="margin-left: 20px; margin-right: 60px; margin-bottom: 20px" disabled="true" title="Nombre"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Correo"/> |
|||
<p:inputText value="#{demoBeanProveedores.proveedor.correo}" style="margin-left: 20px; margin-right: 50px; margin-bottom: 20px" disabled="true" title="Correo"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Direccion:"/> |
|||
<p:inputText value="#{demoBeanProveedores.proveedor.direccion}" style="margin-left: 20px; margin-right: 70px; margin-bottom: 20px" disabled="true" title="Direccion"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Ciudad"/> |
|||
<p:inputText value="#{demoBeanProveedores.proveedor.ciudad}" style="margin-left: 20px; margin-right: 50px; margin-bottom: 20px" disabled="true" title="Ciudad"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Telefono:"/> |
|||
<p:inputText value="#{demoBeanProveedores.proveedor.telefono}" style="margin-left: 20px; margin-right: 65px; margin-bottom: 20px" disabled="true" title="Telefono"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Tipo_Producto:"/> |
|||
<p:inputText value="#{demoBeanProveedores.proveedor.tipoProducto}" style="margin-left: 20px; margin-right: 100px; margin-bottom: 20px" disabled="true" title="Tipo de Producto"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Status"/> |
|||
<p:inputText value="#{demoBeanProveedores.proveedor.status ==1?'Activo':'Inactivo'}" style="margin-left: 20px; margin-right: 50px; margin-bottom: 20px" disabled="true" title="Status"/> |
|||
</div> |
|||
|
|||
<p:commandButton action="vistaProveedores.xhtml" styleClass="rounded-button ui-button-success" actionListener="#{demoBeanProveedores.eliminarProveedor()}" style="margin-left: 20px" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="vistaProveedores.xhtml" styleClass="rounded-button ui-button-danger" value="Cancelar" style="margin-left: 10px" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
</ui:define> |
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,104 @@ |
|||
|
|||
#top { |
|||
position: relative; |
|||
|
|||
background-color: #171a4a; |
|||
color: white; |
|||
padding: 5px; |
|||
margin: 0px 0px 10px 0px; |
|||
} |
|||
|
|||
.bottom-fixed { |
|||
position: fixed; |
|||
bottom: 0; |
|||
left: 50%; |
|||
transform: translateX(-50%); |
|||
width: 90%; /* Ajusta el ancho según sea necesario */ |
|||
max-width: 600px; /* Ancho máximo opcional */ |
|||
background-color: #c2dfef; /* Color de fondo sólido */ |
|||
padding: 5px; |
|||
margin: 10px auto 0; /* Margen superior de 10px y centrado horizontal */ |
|||
} |
|||
|
|||
|
|||
|
|||
#left { |
|||
position: fixed; |
|||
top: 50px; /* Altura de la barra de navegación */ |
|||
left: 0; |
|||
bottom: 0; |
|||
width: 120px; |
|||
background-color: #FDFEFE; |
|||
padding: 5px; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
#right { |
|||
float: right; |
|||
/*background-color: #ece3a5;*/ |
|||
padding: 5px; |
|||
width: 150px; |
|||
} |
|||
|
|||
.center_content { |
|||
position: relative; |
|||
background-color: #dddddd; |
|||
padding: 5px; |
|||
} |
|||
|
|||
.left_content { |
|||
background-color: #dddddd; |
|||
padding: 5px; |
|||
margin-left: 170px; |
|||
} |
|||
|
|||
.right_content { |
|||
background-color: #dddddd; |
|||
padding: 5px; |
|||
margin: 0px 170px 0px 170px; |
|||
} |
|||
|
|||
#top a:link, #top a:visited { |
|||
color: white; |
|||
font-weight : bold; |
|||
text-decoration: none; |
|||
} |
|||
|
|||
#top a:link:hover, #top a:visited:hover { |
|||
color: black; |
|||
font-weight : bold; |
|||
text-decoration : underline; |
|||
} |
|||
|
|||
.container { |
|||
display:flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
height: 100%; |
|||
} |
|||
|
|||
.content { |
|||
background-color: white; |
|||
padding: 20px; |
|||
border-radius: 10px; |
|||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); |
|||
max-width: 800px; /* Ajusta el ancho máximo según sea necesario */ |
|||
width: 100%; |
|||
|
|||
} |
|||
|
|||
.columnas{ |
|||
width: 10px; |
|||
} |
|||
|
|||
.columnas2{ |
|||
width: 17px; |
|||
} |
|||
|
|||
.centrar{ |
|||
text-align: center; |
|||
} |
|||
|
|||
|
@ -0,0 +1,32 @@ |
|||
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: 10px; |
|||
} |
|||
|
|||
h1 { |
|||
font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; |
|||
border-bottom: 1px solid #AFAFAF; |
|||
font-size: 20px; |
|||
font-weight: bold; |
|||
margin: 0px; |
|||
padding: 0px; |
|||
color: #1ABC9C; |
|||
} |
|||
tiered-menu-left { |
|||
text-align: left; |
|||
} |
|||
|
|||
a:link, a:visited { |
|||
color: #045491; |
|||
font-weight : bold; |
|||
text-decoration: none; |
|||
} |
|||
|
|||
a:link:hover, a:visited:hover { |
|||
color: #045491; |
|||
font-weight : bold; |
|||
text-decoration : underline; |
|||
} |
@ -0,0 +1,72 @@ |
|||
body { |
|||
background-color: #f2f2f2; /* Color de fondo gris claro */ |
|||
font-family: Arial, sans-serif; /* Fuente para todo el cuerpo */ |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
h1 { |
|||
text-align: center; |
|||
color: #333333; /* Color del texto de los títulos */ |
|||
} |
|||
|
|||
h2 { |
|||
text-align: center; |
|||
color: #333333; /* Color del texto de los subtítulos */ |
|||
} |
|||
|
|||
#loginForm { |
|||
width: 300px; |
|||
margin: 0 auto; /* Esto centra el formulario horizontalmente */ |
|||
margin-top: 30vh; /* Esto centra verticalmente el formulario */ |
|||
padding: 20px; |
|||
background-color: #ffffff; /* Color de fondo blanco */ |
|||
border-radius: 5px; |
|||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Sombra ligera */ |
|||
text-align: center; |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
#loginPanel { |
|||
margin-bottom: 20px; |
|||
} |
|||
|
|||
label { |
|||
display: block; |
|||
margin-bottom: 5px; |
|||
color: #333333; /* Color del texto de las etiquetas */ |
|||
} |
|||
|
|||
input[type="text"], |
|||
input[type="password"] { |
|||
width: 100%; |
|||
padding: 8px; |
|||
margin-bottom: 10px; |
|||
box-sizing: border-box; /* Para incluir el padding en el ancho total */ |
|||
border: 1px solid #cccccc; /* Borde gris claro */ |
|||
border-radius: 3px; |
|||
} |
|||
|
|||
input[type="submit"] { |
|||
width: 100%; |
|||
padding: 10px; |
|||
background-color: #007bff; /* Color de fondo azul */ |
|||
color: white; /* Color del texto blanco */ |
|||
border: none; |
|||
border-radius: 3px; |
|||
cursor: pointer; |
|||
|
|||
|
|||
} |
|||
|
|||
input[type="submit"]:hover { |
|||
background-color: #0056b3; /* Color de fondo azul oscuro al pasar el mouse */ |
|||
} |
|||
|
|||
.error { |
|||
color: #dc3545; /* Color rojo para mensajes de error */ |
|||
font-style: italic; |
|||
} |
|||
|
@ -0,0 +1,98 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanRol.titulo}"/></h1> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<div> |
|||
<p:outputLabel value="Rol:" for="rol" /> |
|||
|
|||
|
|||
<p:selectOneMenu id="roles" value="#{demoBeanRol.rol.rolUsuario}" style="margin: 20px" converter="selectOneMenuConverter" title="rol" required="true" requiredMessage="Se requiere campo Rol."> |
|||
<!-- TODO: update below reference to list of available items--> |
|||
<f:selectItems id="rol" value="#{demoBeanRol.Seleccionar()}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
|
|||
<p:commandButton action="#{demoBeanRol.agregarRol()}" style="margin-left: 50px" styleClass="rounded-button ui-button-success" value="Guardar" update="growl" rendered="#{demoBeanRol.nuevo}" ajax="false" /> |
|||
<p:commandButton action="rolLista.xhtml" style="margin-left: 70px" styleClass="rounded-button ui-button-success" actionListener="#{demoBeanRol.editarRoles()}" value="Editar" update="growl" rendered="#{!demoBeanRol.nuevo}" ajax="false"/> |
|||
<p:commandButton action="rolLista.xhtml" style="margin-left: 10px" styleClass="rounded-button ui-button-danger" value="Cancelar" immediate="true" ajax="false"/> |
|||
|
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,93 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminando Rol"/></h1> |
|||
|
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanRol.rol.id}" style="margin: 10px" title="Id" disabled="true"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Rol:"/> |
|||
<p:inputText value="#{demoBeanRol.rol.rolUsuario}" style="margin-left: 10px; margin-right: 15px; margin-top: 10px; margin-bottom: 20px" disabled="true" title="RolUsuario" /> |
|||
</div> |
|||
<p:commandButton action="rolLista.xhtml" styleClass="rounded-button ui-button-success" style="margin-left: 30px" actionListener="#{demoBeanRol.eliminarRoles()}" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="rolLista.xhtml" styleClass="rounded-button ui-button-danger" style="margin-left: 10px" value="Cancelar" immediate="true" ajax="false"/> |
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,120 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
|
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
|
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
right |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Roles</span> |
|||
<br></br> |
|||
<p:commandButton action="rolCrear.xhtml" actionListener="#{demoBeanRol.prepararNuevo()}" value='Agregar' icon="pi pi-plus" style="margin: 10px" styleClass="ui-button-success" ajax="true"/> |
|||
|
|||
<p:dataTable value="#{demoBeanRol.listRolll}" var="item" style="text-align: center;"> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Id" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.id}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Rol" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.rolUsuario}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones" style="text-align: center;"/> |
|||
</f:facet> |
|||
<p:commandButton action="rolCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanRol.prepararEditar(item)}" ajax="true"/> |
|||
<p:commandButton action="rolEliminar.xhtml" icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" actionListener="#{demoBeanRol.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
|
|||
</p:dataTable> |
|||
|
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
|
|||
|
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,94 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanTalla.titulo}"/></h1> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<div> |
|||
|
|||
<p:outputLabel value="Talla" for="talla" /> |
|||
<p:inputText id="talla" value="#{demoBeanTalla.tallas.talla}" style="margin: 20px" title="Talla" required="true" validatorMessage="ingresa una talla valida" requiredMessage="Se requiere el campo talla."> |
|||
<f:validateRegex pattern = "^(1[4-9]|2[0-9]|3[0-5])(\.5)?$" for="talla"/> |
|||
</p:inputText> |
|||
|
|||
</div> |
|||
<p:commandButton action="#{demoBeanTalla.agregar()}" style="margin-left: 50px" styleClass="rounded-button ui-button-success" value="Guardar" update="growl" rendered="#{demoBeanTalla.nuevo}" ajax="false"/> |
|||
<p:commandButton action="tallaLista.xhtml" actionListener="#{demoBeanTalla.editarTalla()}" style="margin-left: 70px" styleClass="rounded-button ui-button-success" value="Editar" update="growl" rendered="#{!demoBeanTalla.nuevo}" ajax="false"/> |
|||
<p:commandButton action="tallaLista.xhtml" style="margin-left: 10px" styleClass="rounded-button ui-button-danger" value="Cancelar" immediate="true" ajax="false"/> |
|||
|
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,89 @@ |
|||
<?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:p="http://primefaces.org/ui" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminar talla"/></h1> |
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanTalla.tallas.id}" style="margin: 10px" title="Id" disabled="true"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Talla:"/> |
|||
<p:inputText value="#{demoBeanTalla.tallas.talla}" style="margin-left: 10px; margin-right: 25px; margin-top: 10px; margin-bottom: 20px" title="Talla" disabled="true" /> |
|||
</div> |
|||
<p:commandButton action="tallaLista.xhtml" styleClass="rounded-button ui-button-success" style="margin-left: 30px" actionListener="#{demoBeanTalla.eliminarTalla()}" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="tallaLista.xhtml" styleClass="rounded-button ui-button-danger" style="margin-left: 10px" value="Cancelar" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui" |
|||
xmlns:h="http://xmlns.jcp.org/jsf/html"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
right |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Talla</span> |
|||
<br></br> |
|||
<p:commandButton action="tallaCrear.xhtml" actionListener="#{demoBeanTalla.prepararNuevo()}" value='Agregar' icon="pi pi-plus" style="margin: 10px" styleClass="ui-button-success" ajax="true"/> |
|||
|
|||
|
|||
<p:dataTable value="#{demoBeanTalla.talla}" var="item" style="text-align: center;"> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Id" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.id}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Talla" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.talla}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones" style="text-align: center;"/> |
|||
</f:facet> |
|||
<p:commandButton action="tallaCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanTalla.prepararEditar(item)}" ajax="false"/> |
|||
<p:commandButton action="tallaEliminar.xhtml" icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" actionListener="#{demoBeanTalla.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
|
|||
</h:form> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
|
|||
|
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,50 @@ |
|||
<?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="./css/default.css"/> |
|||
<h:outputStylesheet name="./css/cssLayout.css"/> |
|||
<title>Facelets Template</title> |
|||
|
|||
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script> |
|||
|
|||
<link href="https://cdn.datatables.net/v/dt/dt-2.0.3/datatables.min.css" rel="stylesheet"/> |
|||
|
|||
<script src="https://cdn.datatables.net/v/dt/dt-2.0.3/datatables.min.js"></script> |
|||
|
|||
|
|||
|
|||
</h:head> |
|||
|
|||
<h:body> |
|||
|
|||
<div id="top"> |
|||
<ui:insert name="top">Top</ui:insert> |
|||
<center> |
|||
<span style="font-weight: bold; font-size: 22px; color: #FFFFFF">Sistema de Inventario</span> |
|||
</center> |
|||
</div> |
|||
<div> |
|||
<div id="left"> |
|||
<ui:insert name="left">Left</ui:insert> |
|||
</div> |
|||
<div> |
|||
<div id="right"> |
|||
<ui:insert name="right">Right</ui:insert> |
|||
</div> |
|||
<div id="content" class="right_content"> |
|||
<ui:insert name="content">Content</ui:insert> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div id="bottom"> |
|||
|
|||
</div> |
|||
|
|||
</h:body> |
|||
|
|||
</html> |
@ -0,0 +1,49 @@ |
|||
<?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="./css/default.css"/> |
|||
<h:outputStylesheet name="./css/cssLayout.css"/> |
|||
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script> |
|||
|
|||
<link href="https://cdn.datatables.net/v/dt/dt-2.0.3/datatables.min.css" rel="stylesheet"/> |
|||
|
|||
<script src="https://cdn.datatables.net/v/dt/dt-2.0.3/datatables.min.js"></script> |
|||
|
|||
<title>Facelets Template</title> |
|||
|
|||
|
|||
|
|||
</h:head> |
|||
|
|||
<h:body> |
|||
|
|||
<div id="top"> |
|||
<center> |
|||
<span style="font-weight: bold; font-size: 22px; color: #FFFFFF">Sistema de Inventario</span> |
|||
</center> |
|||
</div> |
|||
<div> |
|||
<div id="left"> |
|||
|
|||
<center> |
|||
<span style="font-weight: bold; font-size: 15px">Opciones:</span> |
|||
<ui:insert name="left"></ui:insert> |
|||
</center> |
|||
|
|||
</div> |
|||
<div id="content" class="left_content"> |
|||
<ui:insert name="content">Content</ui:insert> |
|||
</div> |
|||
</div> |
|||
<div id="bottom"> |
|||
|
|||
</div> |
|||
|
|||
</h:body> |
|||
|
|||
</html> |
@ -0,0 +1,104 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanUbicacion.titulo}"/></h1> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
|
|||
<div> |
|||
<p:outputLabel value="Nombre del Almacen:" for="almacen" /> |
|||
<p:inputText id="almacen" value="#{demoBeanUbicacion.ubicacion.nombreAlmacen}" style="margin: 20px; margin-right: 130px" title="Almacen" required="true" requiredMessage="Se requiere campo Nombre del Almacen."/> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Estante:" for="estante" /> |
|||
<p:inputText id="estante" value="#{demoBeanUbicacion.ubicacion.estante}" style="margin-left: 20px; margin-right: 30px" title="Estante" required="true" requiredMessage="Se requiere campo Estante."/> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Fila:" for="fila" /> |
|||
<p:inputText id="fila" value="#{demoBeanUbicacion.ubicacion.fila}" style="margin-left: 20px; margin-top: 20px; margin-bottom:20px " title="Fila" required="true" validatorMessage="El número 0 es inválido" requiredMessage="Se requiere campo Fila."> |
|||
<f:validateLongRange minimum="1" maximum="9" /> |
|||
</p:inputText> |
|||
</div> |
|||
|
|||
<p:commandButton action="#{demoBeanUbicacion.agregarUbicacion()}" style="margin-left: 60px" styleClass="rounded-button ui-button-success" value="Guardar" update="growl" rendered="#{demoBeanUbicacion.nuevo}" ajax="false"/> |
|||
<p:commandButton action="ubicacionLista.xhtml" actionListener="#{demoBeanUbicacion.editarUbicaciones()}" style="margin-left: 80px" value="Editar" styleClass="rounded-button ui-button-success" update="growl" rendered="#{!demoBeanUbicacion.nuevo}" ajax="false"/> |
|||
<p:commandButton action="ubicacionLista.xhtml" value="Cancelar" style="margin-left: 10px" styleClass="rounded-button ui-button-danger" immediate="true" ajax="false"/> |
|||
|
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,99 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminando Almacenes"/></h1> |
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanUbicacion.ubicacion.id}" style="margin: 10px" title="Id" disabled="true"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Nombre del Almacen:"/> |
|||
<p:inputText value="#{demoBeanUbicacion.ubicacion.nombreAlmacen}" style="margin-left: 10px; margin-right: 125px; margin-top: 10px; margin-bottom: 20px" disabled="true" title="NombreAlmacen"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Estante:"/> |
|||
<p:inputText value="#{demoBeanUbicacion.ubicacion.estante}" style="margin-left: 10px; margin-right: 50px; margin-top: 10px; margin-bottom: 20px" disabled="true" title="Estante"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Fila:"/> |
|||
<p:inputText value="#{demoBeanUbicacion.ubicacion.fila}" style="margin-left: 10px; margin-right: 20px; margin-top: 10px; margin-bottom: 20px" disabled="true" title="Fila"/> |
|||
</div> |
|||
<p:commandButton action="ubicacionLista.xhtml" actionListener="#{demoBeanUbicacion.eliminarUbicacion()}" style="margin-left: 30px" styleClass="rounded-button ui-button-success" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="ubicacionLista.xhtml" value="Cancelar" style="margin-left: 10px" styleClass="rounded-button ui-button-danger" immediate="true" ajax="false"/> |
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,130 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<link rel="stylesheet" type="resources/css" href="cssLayout.css"/> |
|||
|
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Almacenes</span> |
|||
<br></br> |
|||
<p:commandButton action="ubicacionCrear.xhtml" actionListener="#{demoBeanUbicacion.prepararNuevo()}" value='Agregar' icon="pi pi-plus" style="margin: 10px" styleClass="ui-button-success" ajax="true"/> |
|||
|
|||
<p:dataTable value="#{demoBeanUbicacion.listUbicacion}" var="item" style="text-align: center;"> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Id" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.id}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Nombre del Almacen" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.nombreAlmacen}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Estante" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.estante}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Fila" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.fila}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones" style="text-align: center;"/> |
|||
</f:facet> |
|||
<p:commandButton action="ubicacionCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanUbicacion.prepararEditar(item)}" ajax="false"/> |
|||
<p:commandButton action="ubicacionEliminar.xhtml" icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" actionListener="#{demoBeanUbicacion.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
|
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
|
|||
|
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,122 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="#{demoBeanUsuarios.titulo}"/></h1> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<div> |
|||
<p:outputLabel value="Usuario:" for="usuario" /> |
|||
<p:inputText id="usuario" value="#{demoBeanUsuarios.usuario.usuario}" style="margin: 20px" title="Usuario" required="true" requiredMessage="Se requiere campo Usuario."/> |
|||
</div> |
|||
|
|||
|
|||
|
|||
<div> |
|||
<p:outputLabel value="Contraseña:" for="password" /> |
|||
<p:inputText id="password" value="#{demoBeanUsuarios.usuario.password}" style="margin-left: 20px; margin-right: 10px; margin-bottom: 20px" title="password" required="true" validatorMessage="La Contraseña no es valido" requiredMessage="Se requiere el campo Contraseña."> |
|||
<f:validateRegex pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$" for="password"/> |
|||
</p:inputText> |
|||
</div> |
|||
|
|||
<div> |
|||
<h:outputText value="Genero *"/> |
|||
<p:selectOneMenu id="generos" value="#{demoBeanUsuarios.usuario.sexo}" style="margin-left: 20px; margin-right: 10px; margin-bottom: 20px" converter="selectOneMenuConverter" title="genero" required="true" requiredMessage="Se requiere campo Genero."> |
|||
|
|||
<f:selectItems id="genero" value="#{demoBeanUsuarios.Seleccionar()}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Fecha de Registro:" for="fechaRegistro" /> |
|||
<p:inputText id="fechaRegistro" value="#{demoBeanUsuarios.usuario.fechaRegistro}" style="margin-left: 20px; margin-right: 90px; margin-top: 20px; margin-bottom:20px " title="FechaRegistro" required="true" requiredMessage="Se requiere campo Fecha de Registro."> |
|||
<f:convertDateTime pattern="MM/dd/yyyy" /> |
|||
</p:inputText> |
|||
</div> |
|||
<div> |
|||
<p:outputLabel value="Rol:" for="rolid" /> |
|||
<p:selectOneMenu id="rolid" value="#{demoBeanUsuarios.usuario.rolid}" style="margin-left: 20px; margin-right: 45px; margin-bottom: 20px" converter="selectOneMenuConverter" required="true" requiredMessage="Se requiere campo Rol."> |
|||
<!-- TODO: update below reference to list of available items--> |
|||
<f:selectItems value="#{demoBeanRol.listRolll}" var="item" itemLabel="#{item.rolUsuario}" itemValue="#{item}"/> |
|||
</p:selectOneMenu> |
|||
</div> |
|||
|
|||
<p:commandButton action="#{demoBeanUsuarios.agregarUsuario()}" style="margin-left: 90px" value="Guardar" update="growl" styleClass="rounded-button ui-button-success" rendered="#{demoBeanUsuarios.nuevo}" ajax="false" /> |
|||
<p:commandButton action="marcaLista3.xhtml" actionListener="#{demoBeanUsuarios.editarUsuarios()}" style="margin-left: 90px" styleClass="rounded-button ui-button-success" value="Editar" update="growl" rendered="#{!demoBeanUsuarios.nuevo}" ajax="false"/> |
|||
<p:commandButton action="marcaLista3.xhtml" style="margin-left: 10px" styleClass="rounded-button ui-button-danger" value="Cancelar" immediate="true" ajax="false"/> |
|||
|
|||
|
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,113 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
<center> |
|||
</center> |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<center> |
|||
<h:form style="background-color: white; margin: -10px;"> |
|||
<h1><h:outputText style="color: black;" value="Eliminando Usuario"/></h1> |
|||
<div> |
|||
<h:outputText value="Id:"/> |
|||
<p:inputText value="#{demoBeanUsuarios.usuario.id}" style="margin: 20px" title="Id" disabled="true"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Usuario:"/> |
|||
<p:inputText value="#{demoBeanUsuarios.usuario.usuario}" style="margin-left: 20px; margin-right: 50px; margin-bottom: 20px" title="Usuario" disabled="true"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Password:"/> |
|||
<p:inputText value="#{demoBeanUsuarios.usuario.password}" style="margin-left: 20px; margin-right: 60px; margin-bottom: 20px" disabled="true" title="Contraseña"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Password:"/> |
|||
<p:inputText value="#{demoBeanUsuarios.usuario.sexo}" style="margin-left: 20px; margin-right: 60px; margin-bottom: 20px" disabled="true" title="Genero"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="FechaRegistro:"/> |
|||
<p:inputText value="#{demoBeanUsuarios.usuario.fechaRegistro}" style="margin-left: 20px; margin-right: 90px; margin-bottom: 20px" disabled="true" title="Fecha de Registro"> |
|||
<f:convertDateTime pattern="MM/dd/yyyy" /> |
|||
</p:inputText> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Status:"/> |
|||
<p:inputText value="#{demoBeanUsuarios.usuario.status ==1?'Activo':'Inactivo'}" style="margin-left: 20px; margin-right: 45px; margin-bottom: 20px" disabled="true" title="Status"/> |
|||
</div> |
|||
<div> |
|||
<h:outputText value="Rol:"/> |
|||
<p:inputText value="#{demoBeanUsuarios.usuario.rolid.rolUsuario}" style="margin-left: 20px; margin-right: 25px; margin-bottom: 20px" disabled="true" title="Rolid"/> |
|||
</div> |
|||
|
|||
<p:commandButton action="marcaLista3.xhtml" actionListener="#{demoBeanUsuarios.eliminarUsuario()}" style="margin-left: 30px" styleClass="rounded-button ui-button-success" value="Eliminar" ajax="false"/> |
|||
<p:commandButton action="marcaLista3.xhtml" value="Cancelar" styleClass="rounded-button ui-button-danger" style="margin-left: 10px" immediate="true" ajax="false"/> |
|||
</h:form> |
|||
</center> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,105 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
|
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
</ui:define> |
|||
<ui:define name="content"> |
|||
<f:view> |
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Genero</span> |
|||
<br></br> |
|||
<p:commandButton action="generoCrear.xhtml" actionListener="#{demoBeanGenero.prepararNuevo()}" value='Agregar' icon="pi pi-plus" style="margin: 10px" styleClass="ui-button-success" ajax="true"/> |
|||
|
|||
<p:dataTable value="#{demoBeanGenero.genero}" var="item" style="text-align: center;"> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Id" style="text-align: left;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.id}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Genero" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.genero}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones"/> |
|||
</f:facet> |
|||
<p:commandButton action="generoCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanGenero.prepararEditar(item)}" ajax="true"/> |
|||
<p:commandButton action="GeneroEliminar.xhtml" icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" actionListener="#{demoBeanGenero.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
|
|||
</h:form> |
|||
</f:view> |
|||
</ui:define> |
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
|
|||
|
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,154 @@ |
|||
<?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:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<link rel="stylesheet" type="resources/css" href="cssLayout.css"/> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/productosP.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
<div class="card" style="text-align: left;"> |
|||
<h:form> |
|||
<p:growl id="messages" showDetail="true"/> |
|||
<p:tieredMenu style="width:170px" > |
|||
|
|||
<p:submenu label="Usuarios" > |
|||
|
|||
<p:menuitem value="Usuario" outcome="marcaLista3.xhtml" ajax="false"/> |
|||
<p:menuitem value="Rol" outcome="rolLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Proveedores" > |
|||
|
|||
<p:menuitem value="Proveedor" outcome="vistaProveedores.xhtml" ajax="false"/> |
|||
<p:menuitem value="Almacen" outcome="ubicacionLista.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
|
|||
<p:submenu label="Productos" > |
|||
|
|||
<p:menuitem value="Producto" outcome="productosLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Categoria" outcome="categoriaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Talla" outcome="tallaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Color" outcome="colorLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Marca" outcome="marcaLista.xhtml" ajax="false"/> |
|||
<p:menuitem value="Genero" outcome="vistaGenero.xhtml" ajax="false"/> |
|||
|
|||
</p:submenu> |
|||
<p:submenu label="Sesión" > |
|||
<p:divider/> |
|||
<p:menuitem value="Cerrar sesión" icon="pi pi-fw pi-power-off" action="#{demoBeanLogin.logout()}"/> |
|||
</p:submenu> |
|||
|
|||
</p:tieredMenu> |
|||
|
|||
|
|||
</h:form> |
|||
</div> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="right"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
<h:form style="background-color: white; margin: 1px;"> |
|||
|
|||
<span style="font-weight: bold; font-size: 22px">Lista de Proveedores</span> |
|||
<br></br> |
|||
<p:commandButton action="proveedorCrear.xhtml" actionListener="#{demoBeanProveedores.prepararNuevo()}" value='Agregar' icon="pi pi-plus" style="margin: 10px" styleClass="ui-button-success" ajax="true"/> |
|||
|
|||
<p:dataTable value="#{demoBeanProveedores.statusProveedor}" var="item" style="text-align: center;" resizableColumns="true"> |
|||
<p:column styleClass="columnas"> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Id" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.id}"/> |
|||
</p:column> |
|||
|
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Nombre" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.nombre}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Correo" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.correo}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Direccion" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.direccion}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Pais"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.pais}" style="text-align: center;"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Estado"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.estado}" style="text-align: center;"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Ciudad"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.ciudad}" style="text-align: center;"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Telefono" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.telefono}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="TipoProducto" style="text-align: center;"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.categoriaid.categoria}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones" style="text-align: center;"/> |
|||
</f:facet> |
|||
<p:commandButton action="proveedorCrear.xhtml" icon="pi pi-pencil" style="margin: 10px" styleClass="rounded-button ui-button-info ui-button-flat" actionListener="#{demoBeanProveedores.prepararEditar(item)}" ajax="true"/> |
|||
<p:commandButton action="proveedorEliminar.xhtml" icon="pi pi-trash" styleClass="rounded-button ui-button-danger ui-button-flat" actionListener="#{demoBeanProveedores.prepararEliminar(item)}" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
<br></br> |
|||
</h:form> |
|||
</f:view> |
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
</body> |
|||
</html> |
|||
|
Loading…
Reference in new issue