Check-in [ec3074ddc2]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:registro cliente web listo, falta validaciones,
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ec3074ddc2ffc47734d8592186af2739918a4893
User & Date: malcon 2015-01-11 15:48:01
Context
2015-01-11
16:06
lista clientes en admin, falta check-in: 59e07c7566 user: malcon tags: trunk
15:48
registro cliente web listo, falta validaciones, check-in: ec3074ddc2 user: malcon tags: trunk
11:46
persintencia reserva check-in: c77a94e144 user: malcon tags: trunk
Changes

Changes to WebContent/WEB-INF/error/noDisponible.jsp.

4
5
6
7
8
9
10

11
12
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
</head>
<body>
	<p><s:text name="error.no.disponible"/></p>

</body>
</html>







>


4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
</head>
<body>
	<p><s:text name="error.no.disponible"/></p>
	<s:debug></s:debug>
</body>
</html>

Changes to WebContent/WEB-INF/tiles.xml.

80
81
82
83
84
85
86




87
88
89
	<definition name="d_registroCliente" extends="d_plantilla">
		<put-attribute name="contenido" value="/WEB-INF/website/cliente/registro.jsp"/>
	</definition>
	
	<definition name="d_edicionCliente" extends="d_plantilla">
		<put-attribute name="contenido" value="/WEB-INF/website/cliente/edicion.jsp"/>
	</definition>




		

</tiles-definitions>







>
>
>
>



80
81
82
83
84
85
86
87
88
89
90
91
92
93
	<definition name="d_registroCliente" extends="d_plantilla">
		<put-attribute name="contenido" value="/WEB-INF/website/cliente/registro.jsp"/>
	</definition>
	
	<definition name="d_edicionCliente" extends="d_plantilla">
		<put-attribute name="contenido" value="/WEB-INF/website/cliente/edicion.jsp"/>
	</definition>
	
	<definition name="d_resultado_web" extends="d_plantilla">
		<put-attribute name="contenido" value="/WEB-INF/website/resultado.jsp"/>	
	</definition>
		

</tiles-definitions>

Changes to WebContent/WEB-INF/website/cliente/registro.jsp.

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
..
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
            <div class="item-cont">
                <input class="large" type="text" name="cliente.ruc" placeholder="RUC"><span class="icon-place"></span>
            </div>
        </div>
        <div class="element-phone">
            <label class="title"></label>
            <div class="item-cont">
                <input class="large" type="tel" pattern="[+]?[\.\s\-\(\)\*\#0-9]{3,}" maxlength="24" name="cliente.telefono" placeholder="Celular" value=""><span class="icon-place"></span>
            </div>
        </div>
        <div class="element-input">
            <label class="title"></label>
            <div class="item-cont">
                <input class="large" type="text" name="cliente.direccion" placeholder="Dirección"><span class="icon-place"></span>
            </div>
................................................................................
            <div class="item-cont">
                <input class="large" type="email" name="cliente.email" value="" placeholder="Email"><span class="icon-place"></span>
            </div>
        </div>
        <div class="element-password">
            <label class="title"></label>
            <div class="item-cont">
                <input class="large" type="password" name="password" value="" placeholder="Contraseña"><span class="icon-place"></span>
            </div>
        </div>
        
        <div class="submit">
            <input type="submit" value="Registrarme">
        </div>
  </s:form>








|







 







|








38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
..
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
            <div class="item-cont">
                <input class="large" type="text" name="cliente.ruc" placeholder="RUC"><span class="icon-place"></span>
            </div>
        </div>
        <div class="element-phone">
            <label class="title"></label>
            <div class="item-cont">
                <input class="large" type="tel" pattern="[+]?[\.\s\-\(\)\*\#0-9]{3,}" maxlength="24" name="cliente.telefonos" placeholder="Celular" value=""><span class="icon-place"></span>
            </div>
        </div>
        <div class="element-input">
            <label class="title"></label>
            <div class="item-cont">
                <input class="large" type="text" name="cliente.direccion" placeholder="Dirección"><span class="icon-place"></span>
            </div>
................................................................................
            <div class="item-cont">
                <input class="large" type="email" name="cliente.email" value="" placeholder="Email"><span class="icon-place"></span>
            </div>
        </div>
        <div class="element-password">
            <label class="title"></label>
            <div class="item-cont">
                <input class="large" type="password" name="cliente.clave" value="" placeholder="Contraseña"><span class="icon-place"></span>
            </div>
        </div>
        
        <div class="submit">
            <input type="submit" value="Registrarme">
        </div>
  </s:form>

Added WebContent/WEB-INF/website/resultado.jsp.

























>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
<%@ taglib prefix="s" uri="/struts-tags" %>

	<link href="<s:url value='/css/formoid-solid-blue.css'/>"  media="all" rel="stylesheet" type="text/css"/>
    
    <link href="<s:url value='/js/formoid-solid-blue.js'/>" rel="javascript"/>



<form class="formoid-solid-blue" style="background-color: #ffffff; font-size: 14px; font-family: 'Roboto',Arial,Helvetica,sans-serif; color: #00007f; max-width: 480px; min-width: 150px" method="post">
	
    <s:actionmessage/>
    </form>

Changes to src/persistencia/mybatis/config/config.properties.

1
2
3
4
5
6
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/agenciadb
username=root
password=123



|




1
2
3
4
5
6
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost/agenciadb
username=root
password=123


Changes to src/persistencia/mybatis/mapper/ClienteMapper.xml.

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 			FROM cliente c, usuario u
 			WHERE c.usuario_id = u.id
 			AND c.id = #{codigo}
 	</select>
 	
 	<insert id="insertar" parameterType="cliente">
 		INSERT INTO cliente(nombres, ap_paterno, ap_materno, dni, ruc, email, telefono, direccion, usuario_id)
 		values (#{nombres},#{ap_paterno},#{ap_materno},#{dni},#{ruc},#{email},#{telefono},#{direccion},#{usuario.codigo})
 	</insert>
 	
 	<update id="actualizar" parameterType="cliente">
 		UPDATE cliente
 		SET nombres=#{nombres},
 			ap_paterno=#{ap_paterno},
 			ap_materno=#{ap_materno},







|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 			FROM cliente c, usuario u
 			WHERE c.usuario_id = u.id
 			AND c.id = #{codigo}
 	</select>
 	
 	<insert id="insertar" parameterType="cliente">
 		INSERT INTO cliente(nombres, ap_paterno, ap_materno, dni, ruc, email, telefono, direccion, usuario_id)
 		values (#{nombres},#{ap_paterno},#{ap_materno},#{dni},#{ruc},#{email},#{telefonos},#{direccion},#{usuario.codigo})
 	</insert>
 	
 	<update id="actualizar" parameterType="cliente">
 		UPDATE cliente
 		SET nombres=#{nombres},
 			ap_paterno=#{ap_paterno},
 			ap_materno=#{ap_materno},

Changes to src/persistencia/mybatis/mapper/UsuarioMapper.xml.

25
26
27
28
29
30
31
32
33
34
35
36
37
        <result column="clave" property="clave"/>
        <result column="web" property="web"/>
        <result column="admin" property="admin"/>
    </resultMap>
 	
 	
 	<select id="obtener" resultMap="rmUsuarioByUsuario" parameterType="string">
 		SELECT usuario, nombre, clave, web, admin
 			FROM usuario 
 			WHERE usuario = #{email}
 	</select>
 
 </mapper>







|





25
26
27
28
29
30
31
32
33
34
35
36
37
        <result column="clave" property="clave"/>
        <result column="web" property="web"/>
        <result column="admin" property="admin"/>
    </resultMap>
 	
 	
 	<select id="obtener" resultMap="rmUsuarioByUsuario" parameterType="string">
 		SELECT id, usuario, nombre, clave, web, admin
 			FROM usuario 
 			WHERE usuario = #{email}
 	</select>
 
 </mapper>

Changes to src/struts-cliente.xml.

16
17
18
19
20
21
22
23
24
25
26
27
28
29
		</action>
		
		<action name="registroCliente" class="action.ClienteAction">
			<result type="tiles">d_registroCliente</result>
		</action>
		
		<action name="edicionCliente" class="action.ClienteAction" method="editar">
			<result type="tiles">d_login_web</result>
			<result name="input" type="tiles">d_edicionCliente</result>
		</action>
		

	</package>
</struts>







|






16
17
18
19
20
21
22
23
24
25
26
27
28
29
		</action>
		
		<action name="registroCliente" class="action.ClienteAction">
			<result type="tiles">d_registroCliente</result>
		</action>
		
		<action name="edicionCliente" class="action.ClienteAction" method="editar">
			<result type="tiles">d_resultado_web</result>
			<result name="input" type="tiles">d_edicionCliente</result>
		</action>
		

	</package>
</struts>

Changes to src/struts.xml.

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
				<!-- <interceptor-ref name="SesionAdmin"/> -->

			</interceptor-stack>
			
	
		</interceptors>
		
		<default-interceptor-ref name="pitStack" />
		
		<global-results>		
			<result name="null">/WEB-INF/error/nulo.jsp</result>
			<result name="noDisponible">/WEB-INF/error/noDisponible.jsp</result>
			<result name="login">/WEB-INF/admin/login.jsp</result>
		</global-results>
		







|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
				<!-- <interceptor-ref name="SesionAdmin"/> -->

			</interceptor-stack>
			
	
		</interceptors>
		
		
		
		<global-results>		
			<result name="null">/WEB-INF/error/nulo.jsp</result>
			<result name="noDisponible">/WEB-INF/error/noDisponible.jsp</result>
			<result name="login">/WEB-INF/admin/login.jsp</result>
		</global-results>