Check-in [e2553370c7]
Not logged in

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

Overview
Comment:modelo de destino y agregado jsp
Timelines: family | ancestors | busqueda_paquetes
Files: files | file ages | folders
SHA1:e2553370c7443f54d9900305218497a2c9dc51e9
User & Date: caleb 2015-01-11 12:40:36
Context
2015-01-11
12:40
modelo de destino y agregado jsp Leaf check-in: e2553370c7 user: caleb tags: busqueda_paquetes
2015-01-10
22:33
modelo de destino y algo mas check-in: b021423766 user: caleb tags: busqueda_paquetes
Changes

Changes to WebContent/WEB-INF/website/nacional.jsp.

21
22
23
24
25
26
27
28

29
30




31
32
33
34
35
36
37
38

39
40
41
42
43
44
45
                    });
                    $(function () {
                        $("#datepicker2").datepicker();
                    });
                </script>
                <!---/End-date-piker---->
                <div class="p-ww">
                    <form>

                        <span>DONDE</span>
                        <input class="dest" type="text" value="Destino" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Distination';}">




                        <span>DESDE</span>
                        <input class="date hasDatepicker" id="datepicker" type="text" value=" Fecha" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Seleccione Fecha';}">

                        <span>HASTA</span>
                        <input class="date hasDatepicker" id="datepicker2" type="text" value=" Fecha" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Seleccione Fecha';}">

                        <input type="submit" value="Buscar">
                    </form>

                </div>
                <div class="clear"></div>
            </div>
        </div>

        <!-- INICIO DEL  SLIPDER DE NACIONALES-->
    </div>







<
>
|
|
>
>
>
>






|
|
>







21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
                    });
                    $(function () {
                        $("#datepicker2").datepicker();
                    });
                </script>
                <!---/End-date-piker---->
                <div class="p-ww">

            
                        		<!-- FORMULARIO DE BUSQUEDA -->
						<s:form action="buscarDestino" namespace="/destino">
							<s:textfield name="destino.nombre"  key="destino.nombre"/>
	
							
                       
                        <span>DESDE</span>
                        <input class="date hasDatepicker" id="datepicker" type="text" value=" Fecha" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Seleccione Fecha';}">

                        <span>HASTA</span>
                        <input class="date hasDatepicker" id="datepicker2" type="text" value=" Fecha" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Seleccione Fecha';}">

                       <s:submit value="Buscar"/>
						</s:form>
                   
                </div>
                <div class="clear"></div>
            </div>
        </div>

        <!-- INICIO DEL  SLIPDER DE NACIONALES-->
    </div>

Changes to src/negocio/DestinoServiceDAO.java.

11
12
13
14
15
16
17

18
19
20
21
public class DestinoServiceDAO implements DestinoService{

	@Override
	public List<Destino> buscar(Destino destino) throws Exception {
		SqlSession session=MyBatisUtil.getSqlSessionFactory().openSession();
		DestinoMapper destinoMapper=session.getMapper(DestinoMapper.class);
		List<Destino>destinos=destinoMapper.buscar(destino);

		return null;
	}

}







>
|



11
12
13
14
15
16
17
18
19
20
21
22
public class DestinoServiceDAO implements DestinoService{

	@Override
	public List<Destino> buscar(Destino destino) throws Exception {
		SqlSession session=MyBatisUtil.getSqlSessionFactory().openSession();
		DestinoMapper destinoMapper=session.getMapper(DestinoMapper.class);
		List<Destino>destinos=destinoMapper.buscar(destino);
		session.close();
		return destinos;
	}

}

Changes to src/persistencia/mybatis/config/mybatis-config.xml.

10
11
12
13
14
15
16

17
18
19
20
21
22
23
	<settings>
		<setting name="defaultStatementTimeout" value="2"/>
	</settings>
	
	<typeAliases>
		<typeAlias type="model.Cliente" alias="cliente"/>
		<typeAlias type="model.Usuario" alias="usuario"/>

	</typeAliases>
	
    <environments default="clase">
    
        <environment id="clase">
            <transactionManager type="JDBC"/>
            <dataSource type="JNDI">







>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
	<settings>
		<setting name="defaultStatementTimeout" value="2"/>
	</settings>
	
	<typeAliases>
		<typeAlias type="model.Cliente" alias="cliente"/>
		<typeAlias type="model.Usuario" alias="usuario"/>
		<typeAlias type="model.Destino" alias="destino"/>
	</typeAliases>
	
    <environments default="clase">
    
        <environment id="clase">
            <transactionManager type="JDBC"/>
            <dataSource type="JNDI">

Changes to src/struts-destino.xml.

1
2



3
4
5
6
7
8
9
10
11
12
13
<?xml version="1.0" encoding="UTF-8"?>




<struts>
	<package name="struts-destino" extends="demo" namespace="/destino">	
	
		<action name="buscarDestion" class="action.DestinoAction"
			method="buscar">
			<result type="tiles">d_nacional_web</result>
			<result name="input" type="tiles">d_nacional_web</result>
		</action>

	</package>
</struts>
|
<
>
>
>



|







1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
        "http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
	<package name="struts-destino" extends="demo" namespace="/destino">	
	
		<action name="buscarDestino" class="action.DestinoAction"
			method="buscar">
			<result type="tiles">d_nacional_web</result>
			<result name="input" type="tiles">d_nacional_web</result>
		</action>

	</package>
</struts>