<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rails y más cosas &#187; Nuevas Tecnologías</title>
	<atom:link href="http://www.railsymas.com/category/nuevas-tecnologias/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.railsymas.com</link>
	<description>Nuevas Tecnologías</description>
	<lastBuildDate>Sat, 28 Jan 2012 10:23:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dojo framework javascript</title>
		<link>http://www.railsymas.com/2012/01/15/dojo-framework-javascript/</link>
		<comments>http://www.railsymas.com/2012/01/15/dojo-framework-javascript/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 11:52:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=2623</guid>
		<description><![CDATA[Desde la página web oficial del proyecto nos podemos descargar sus librerias para empezar hacer ejemplos Enlace: http://dojotoolkit.org/ Actualmente spring js da soporte para dojo y spring roo como framework rad viene con los scaffold automatizados para dojo, por lo que esta herramienta se convierte en un elemento importante a conocer dentro del desarrollo de [...]]]></description>
			<content:encoded><![CDATA[<p>Desde la página web oficial del proyecto nos podemos descargar sus librerias para empezar hacer ejemplos</p>
<p>Enlace: <a href="http://dojotoolkit.org/">http://dojotoolkit.org/</a></p>
<p><span id="more-2623"></span></p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojo2.png" alt="" title="dojo2" width="700" height="200" class="alignnone size-full wp-image-2626" /></p>
<p>Actualmente spring js da soporte para dojo y spring roo  como framework rad viene con los scaffold automatizados para dojo, por lo que esta herramienta se convierte en un elemento importante a conocer dentro del desarrollo de las aplicaciones web con el framework spring</p>
<p>Una vez descargado el proyecto vía zip o tar desempaquetamos en nuestra computadora</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojo1.png" alt="" title="dojo1" width="611" height="145" class="alignnone size-full wp-image-2629" /></p>
<p> Dijit (dojo widgets) un framework para construir interface html mediante widgets así como una librería de controladores preconstruidos, dijit depende de dojo</p>
<p> Dojo es el nucleo que incluye librerías que son útiles en muchos programs y constituyen un árbol de desarrollo denominado nucleo de dojo</p>
<p>dojox proyectos abiertos que no son 100 estables con las últimas características que puede que algunos navegadores no tengan un buen soporte.</p>
<p>Formulario con dos pestañas, primera imagen corresponde a los campos de datos personales</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojo3s.png" alt="" title="dojo3s" width="561" height="383" class="alignnone size-full wp-image-2633" /></p>
<p>La segunda pestaña corresponde a los datos de direcciones</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojos4.png" alt="" title="dojos4" width="551" height="371" class="alignnone size-full wp-image-2634" /></p>
<p>Código del formulario ejemplodojo.html que se encuentra al mismo nivel de los directorios dojo dijit y dojox</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dojo/resources/dojo.css&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit/themes/tundra/tundra.css&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dojo/dojo.js&quot;</span> djConfig<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;parseOnLoad :true&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
.formularioContenedor {
&nbsp;
width:600px;
height:350px;
margin-top:30px;
margin-left:50px;
color:#3443B5;
}
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span>  <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
dojo.require(&quot;dojo.parser&quot;);
dojo.require(&quot;dijit.layout.ContentPane&quot; );
dojo.require(&quot;dijit.layout.TabContainer&quot; );
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">button</span>&gt;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tundra&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;formularioContenedor&quot;</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.layout.TabContainer&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;contenedor&quot;</span> &gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.layout.ContentPane&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Datos Personales&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nombre&quot;</span>&gt;</span>Introduce el nombre:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nombre&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nombre&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apellidos&quot;</span>&gt;</span>Introduce los apellidos:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apellidos&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apellidos&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;edad&quot;</span>&gt;</span>edad:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;edad&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;edad&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;telefono&quot;</span>&gt;</span>Tel<span style="color: #ddbb00;">&amp;eacute;</span>fono de  casa:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;home_phone&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;home_phone&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.layout.ContentPane&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Direcciones&quot;</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;codigopostal&quot;</span>&gt;</span>Direcci<span style="color: #ddbb00;">&amp;oacute;</span>n de correo postal:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;codigopostal&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;codigopostal&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;direccion&quot;</span>&gt;</span>Direcci<span style="color: #ddbb00;">&amp;oacute;</span>n:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;direccion&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;direccion&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;50&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>Se modifica el código del anterior formulario para dar lugar a la validación de los campos .  creamos un contenedor panel con dos pestañas en cada una de las cuales tenemos un formulario con una serie de dastos para completar  se procede a la validación de cada uno de los elementos del formulario y se muestra un mensaje de alerta en el caso de no estar completados los campos del formulario. Si no pusieramos el script para contralar el envio no saldrían indicados todo los errores a la vez al pulsar enviar sino<br />
inmediatamente al escribir sobre un campo y no ajustarse en el formato</p>
<p>Ventana emergente de aviso<br />
<img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojom1.png" alt="" title="dojom1" width="417" height="152" class="alignnone size-full wp-image-2640" /></p>
<p>imagen validación campos<br />
<img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojom2.png" alt="" title="dojom2" width="515" height="251" class="alignnone size-full wp-image-2642" /></p>
<p>mensaje al nombre<br />
<img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojom21.png" alt="" title="dojom2" width="515" height="251" class="alignnone size-full wp-image-2643" /></p>
<p>mensaje de edad para reclamar campo requerido</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojom4.png" alt="" title="dojom4" width="413" height="46" class="alignnone size-full wp-image-2645" /></p>
<p>dentro de la pestaña de direcciones al enviar los datos mal </p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojom5.png" alt="" title="dojom5" width="499" height="224" class="alignnone size-full wp-image-2647" /></p>
<p>indicando fallo en el código de correos mal introducido</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2012/01/dojom6.png" alt="" title="dojom6" width="432" height="181" class="alignnone size-full wp-image-2650" /></p>
<p>Modificando el código anterior para añadir formularios validados a las pestañas</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dojo/resources/dojo.css&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit/themes/tundra/tundra.css&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dojo/dojo.js&quot;</span> djConfig<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;isDebug:false, parseOnLoad :true&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
.formularioContenedor {
&nbsp;
width:600px;
height:350px;
margin-top:30px;
margin-left:50px;
color:#3443B5;
}
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span>  <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
&nbsp;
&nbsp;
&nbsp;
dojo.require(&quot;dojo.parser&quot;);
dojo.require(&quot;dijit.layout.ContentPane&quot; );
dojo.require(&quot;dijit.layout.TabContainer&quot; );
dojo.require(&quot;dijit.form.ValidationTextBox&quot; );
dojo.require('dijit.form.Button');
dojo.require('dijit.form.Form');
dojo.require(&quot;dojox.validate.web&quot;);
dojo.require(&quot;dojox.validate&quot;);
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">button</span>&gt;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tundra&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;formularioContenedor&quot;</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.layout.TabContainer&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;contenedor&quot;</span> &gt;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.layout.ContentPane&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Datos Personales&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.Form&quot;</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;datospersonales&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;get&quot;</span>&gt;</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dojo/method&quot;</span> event<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;onSubmit&quot;</span>&gt;</span>
 if (this.validate()) {
   return confirm('Datos bien introducidos pulsa aceptar');
 } else {
     alert('Existen datos mal introducidos revisa el formulario');
    return false;
 }
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nombre&quot;</span>&gt;</span>Introduce el nombre:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nombre&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nombre&quot;</span> required<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.ValidationTextBox&quot;</span> missingMessage<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;No has introducido tu nombre&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apellidos&quot;</span>&gt;</span>Introduce los apellidos:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apellidos&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apellidos&quot;</span>   required<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.ValidationTextBox&quot;</span>   missingMessage<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;No has introducido tus apellidos&quot;</span> plaseHolder<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apellidos&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;edad&quot;</span>&gt;</span>edad:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;edad&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;edad&quot;</span> required<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;2&quot;</span>  data-dojo-<span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.ValidationTextBox&quot;</span></span>
<span style="color: #009900;">    data-dojo-props<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;validator:dojox.validate.isInRange,   constraints:{ min:1, max:100 },   invalidMessage:'no es un n&amp;uacute;mero correcto'&quot;</span> missingMessage<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;No has introducido tu edad&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;telefono&quot;</span>&gt;</span>Tel<span style="color: #ddbb00;">&amp;eacute;</span>fono de  casa:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;telefono&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;telefono&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;30&quot;</span> required<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> data-dojo-<span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.ValidationTextBox&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">label</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;enviar&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;enviar&quot;</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.Button&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.layout.ContentPane&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Direcciones&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.Form&quot;</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;direcciones&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;get&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dojo/method&quot;</span> event<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;onSubmit&quot;</span>&gt;</span>
 if (this.validate()) {
   return confirm('Datos bien introducidos pulsa aceptar');
 } else {
     alert('Existen datos mal introducidos revisa el formulario');
    return false;
 }
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;codigopostal&quot;</span>&gt;</span>Direcci<span style="color: #ddbb00;">&amp;oacute;</span>n de correo postal:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;codigopostal&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;codigopostal&quot;</span> required<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;4&quot;</span> data-dojo-<span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.ValidationTextBox&quot;</span> data-dojo-props<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;validator:dojox.validate.isNumberFormat, constraints:{ format:'(##)-###'} , invalidMessage:'no es un c&amp;oacute;digo correcto '&quot;</span></span>
<span style="color: #009900;"> missingMessage<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;No has introducido tu c&amp;oacute;digo postal&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;direccion&quot;</span>&gt;</span>Direcci<span style="color: #ddbb00;">&amp;oacute;</span>n de correo:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;direccion&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;direccion&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;50&quot;</span> required<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> data-dojo-<span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.ValidationTextBox&quot;</span> missingMessage<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;No has introducido tu direcci&amp;oacute;n de correo&quot;</span> data-dojo-props<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;validator:dojox.validate.isEmailAddress, invalidMessage:'no es una direcci&amp;oacute;n de correo v&amp;aacute;lida '&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">label</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;enviar&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;enviardireccion&quot;</span> dojoType<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dijit.form.Button&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2012/01/15/dojo-framework-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instalando veloeclipse</title>
		<link>http://www.railsymas.com/2011/12/17/instalando-veloeclipse/</link>
		<comments>http://www.railsymas.com/2011/12/17/instalando-veloeclipse/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 09:51:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=2543</guid>
		<description><![CDATA[Veloeclipse es un plugin para eclipse que nos ofrece un editor de código para diversas tecnologías. Veloeclipse es un editor para html, xml , jsp y velocity Para instalarlo abrimos nuestro espacio de trabajo de eclipse y vamos al menú pulsamos sobre help y seleccionamos la opción install new software una vez pulsada nos aparece [...]]]></description>
			<content:encoded><![CDATA[<p>Veloeclipse es un plugin para eclipse que nos ofrece un editor de código para diversas tecnologías.</p>
<p>Veloeclipse es un editor para html, xml , jsp y velocity</p>
<p><span id="more-2543"></span></p>
<p>Para instalarlo abrimos nuestro espacio de trabajo de eclipse y vamos al menú pulsamos sobre<br />
help y seleccionamos la opción install new software una vez pulsada nos aparece una ventena como la siguiente</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2011/12/velo1a.png" alt="" title="velo1a" width="702" height="423" class="alignnone size-full wp-image-2544" /></p>
<p>Pulsamos sobre add para añadir un nuevo repositorio a nuestro eclipse, en la ventana tenemos que darle un nombre en este caso elegimos velocity pero es opcional. La url es la indicada http://veloeclipse.googlecode.com/svn/trunk/update/</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2011/12/velo31.png" alt="" title="velo3" width="724" height="409" class="alignnone size-full wp-image-2551" /></p>
<p>Una vez elegido la versión del plugin y descargado nos aparece un mensaje indicando que es conveniente resetear eclipse para que los cambios tengan efecto</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2011/12/velo4.png" alt="" title="velo4" width="611" height="142" class="alignnone size-full wp-image-2552" /></p>
<p>Reconocimiento del código de archivos .vm</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2011/12/velo3.png" alt="" title="velo3" width="232" height="98" class="alignnone size-full wp-image-2549" /></p>
<p>En el siguiente enlace tenemos una introducción al lenguaje de las plantillas velocity</p>
<p><a href="http://www.railsymas.com/2010/07/01/plantillas-velocity/">plantillas velocity</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2011/12/17/instalando-veloeclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instalando maven en ubuntu</title>
		<link>http://www.railsymas.com/2011/11/28/instalando-maven-en-ubuntu/</link>
		<comments>http://www.railsymas.com/2011/11/28/instalando-maven-en-ubuntu/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 15:57:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=2521</guid>
		<description><![CDATA[Nos descargamos el proyecto desde el sitio oficial una vez descargado lo desempaquetamos en un directorio de nuestra computadora y obtenemos un directorio con el nombre maven Dentro del directorio tenemos la estructura de ficheros de la imagen anterior *Nota importante es necesario tener el jdk instalado no el jre ya que en algunos proyectos [...]]]></description>
			<content:encoded><![CDATA[<p>Nos descargamos el proyecto desde el sitio oficial</p>
<p><span id="more-2521"></span></p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2011/11/maven1.jpg" alt="" title="maven1" width="650" height="600" class="alignnone size-full wp-image-2526" /></p>
<p>una vez descargado lo desempaquetamos en un directorio de nuestra computadora y obtenemos un directorio con el nombre maven</p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2011/11/carpetamaven.png" alt="" title="carpetamaven" width="86" height="66" class="alignnone size-full wp-image-2524" /></p>
<p><img src="http://www.railsymas.com/wp-content/uploads/2011/11/maven2.png" alt="" title="maven2" width="630" height="193" class="alignnone size-full wp-image-2530" /></p>
<p>Dentro del directorio tenemos la estructura de ficheros de la imagen anterior</p>
<p>*Nota importante es necesario tener el jdk instalado no el jre ya que en algunos proyectos nos dará error al utilizar maven</p>
<p>Abrimos un terminal por consola y escribimos lo siguiente sudo gedit /etc/profile<br />
para guardar los cambios en el fichero de perfiles</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk
M2_HOME=/home/directorio/maven
PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
export JAVA_HOME
export M2_HOME</pre></td></tr></table></div>

<p>Y para propagar los cambios escribimos por el terminal</p>
<p>una vez descargado en paquete de maven en algún lugar de nuestra computadora podemos comprobar la instalación mediante el comando mvn -v para ver la versión instalada.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">desktop:~$ mvn -v
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /home/directorio de instalación/maven
Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: es_ES, platform encoding: UTF-8
OS name: &quot;linux&quot;, version: &quot;2.6.32-35-generic&quot;, arch: &quot;i386&quot;, family: &quot;unix&quot;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2011/11/28/instalando-maven-en-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Etiqueta body_class de wordpress</title>
		<link>http://www.railsymas.com/2011/02/18/etiqueta-bodyclass-de-wordpress/</link>
		<comments>http://www.railsymas.com/2011/02/18/etiqueta-bodyclass-de-wordpress/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 09:04:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=1995</guid>
		<description><![CDATA[Cuando se está desarrollando un tema para wordpress necesitamos una serie de archivos establecidos por el cms para el correcto funcionamiento. Los archivos básicos mínimos son el fichero index.php y la hoja de estilos style.css, dentro del fichero index.php tenemos un esquema de como será nuestra plantilla haciendo llamadas a otros ficheros que constituyen la [...]]]></description>
			<content:encoded><![CDATA[<p>
 Cuando se está desarrollando un tema para wordpress necesitamos una serie de archivos establecidos por el cms para el correcto funcionamiento.<br />
 <span id="more-1995"></span><br />
 Los archivos básicos mínimos son el fichero index.php y la hoja de estilos style.css, dentro del fichero index.php tenemos un esquema de como será nuestra plantilla haciendo llamadas a otros ficheros que constituyen la plantilla. Es el caso de la plantilla fichero header.php que es llamado desde el fichero index.php mediante la siguiente sentencia</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p> Dentro del fichero header.php tenemos la declaración del Doctype, los metas y los links a css etc, llegamos aquí a la etiqueta body a la función que da nombre al post.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  &lt;body <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> body_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;</pre></div></div>

<p> bodyclass le permite crear a wordpress clases dinámicas en función de la vista que estamos renderizando, es decir en función del contenido que se muestra se genera, si estamos en la página de inicio nos genera la clase home. </p>
<p> Lista de clases generadas por bodyclass<br />
•rtl<br />
•home<br />
•blog<br />
•archive<br />
•date<br />
•search<br />
•paged<br />
•attachment<br />
•error404<br />
•single postid-(id)<br />
•attachmentid-(id)<br />
•attachment-(mime-type)<br />
•author<br />
•author-(user_nicename)<br />
•category<br />
•category-(slug)<br />
•tag<br />
•tag-(slug)<br />
•page-parent<br />
•page-child parent-pageid-(id)<br />
•page-template page-template-(template file name)<br />
•search-results<br />
•search-no-results<br />
•logged-in<br />
•paged-(page number)<br />
•single-paged-(page number)<br />
•page-paged-(page number)<br />
•category-paged-(page number)<br />
•tag-paged-(page number)<br />
•date-paged-(page number)<br />
•author-paged-(page number)<br />
•search-paged-(page number)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2011/02/18/etiqueta-bodyclass-de-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Mint distribución ligera</title>
		<link>http://www.railsymas.com/2010/11/20/linux-mint-distribucion-ligera/</link>
		<comments>http://www.railsymas.com/2010/11/20/linux-mint-distribucion-ligera/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 14:43:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=1937</guid>
		<description><![CDATA[En el sitio web oficial nos dan a elegir entre diferentes versiones según los gustos, necesidades o posibilidades de los usuarios La más ligera es la que cuenta con un escritorio xfce Requisitos del sistema * x86 processor (for both 32 &#038; 64-bit versions) * x86_64 compatible processor (for the 64-bit version) * 256 MB [...]]]></description>
			<content:encoded><![CDATA[<p> <span id="more-1937"></span></p>
<p> En el sitio web oficial nos dan a elegir entre diferentes versiones según los gustos, necesidades o posibilidades de los usuarios</p>
<p> La más ligera es la que cuenta con un escritorio xfce</p>
<p> Requisitos del sistema</p>
<p>    * x86 processor (for both 32 &#038; 64-bit versions)<br />
    * x86_64 compatible processor (for the 64-bit version)<br />
    * 256 MB of system memory (RAM)<br />
    * 4 GB of disk space for installation<br />
    * Graphics card capable of 800×600 resolution<br />
    * CD-ROM drive or USB port</p>
<p>  Dentro del proyecto existen otras versiones más potentes para usuarios que tengan equipos más potentes y quieran sacar partido a su máquina.  </p>
<p>  Xubuntu también es una versión de ubuntu que tiene requisitos del sistema más ligeros, pero para ordenadores antiguos tanto de sobremesa, como portátiles, las últimas versiones piden mucho a hardware antiguos.</p>
<p>  Sitio oficial de linux mint  <a href="http://www.linuxmint.com/">www.linuxmint.com</a></p>
<p>  Vista general del escritorio, procesador de textos abiword , lector de pdf epdf</p>
<p>   
<a href='http://www.railsymas.com/2010/11/20/linux-mint-distribucion-ligera/escri/' title='escri'><img width="150" height="150" src="http://www.railsymas.com/wp-content/uploads/2010/11/escri-150x150.png" class="attachment-thumbnail" alt="escri" title="escri" /></a>
<a href='http://www.railsymas.com/2010/11/20/linux-mint-distribucion-ligera/abiword/' title='abiword'><img width="150" height="150" src="http://www.railsymas.com/wp-content/uploads/2010/11/abiword-150x150.png" class="attachment-thumbnail" alt="abiword" title="abiword" /></a>
<a href='http://www.railsymas.com/2010/11/20/linux-mint-distribucion-ligera/epdf/' title='epdf'><img width="150" height="150" src="http://www.railsymas.com/wp-content/uploads/2010/11/epdf-150x150.png" class="attachment-thumbnail" alt="epdf" title="epdf" /></a>
Linux mint es una distribución basada en ubuntu, es compatible con repositorios de ubuntu</p>
<p>   Cuenta además con bitorrent, visualizador de películas vlc , chat pidgin, firefox 3.6 y un soporte bastante aceptable de traducciones al castellano del entorno </p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2010/11/20/linux-mint-distribucion-ligera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Varias clases en un mismo div</title>
		<link>http://www.railsymas.com/2010/08/22/varias-clases-en-un-mismo-div/</link>
		<comments>http://www.railsymas.com/2010/08/22/varias-clases-en-un-mismo-div/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 20:15:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>
		<category><![CDATA[Pequeñas recetas]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=1920</guid>
		<description><![CDATA[Un ejemplo de utilización de varias clases, aplicadas a una misma capa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 &#60;style type=&#34;text/css&#34;&#62; &#160; .cuadrado{ width:200px; height:200px; } &#160; .fondorojo { background-color:red; } &#160; .esquinas [...]]]></description>
			<content:encoded><![CDATA[<p>  Un ejemplo de utilización de varias clases, aplicadas a una misma capa</p>
<p>  <span id="more-1920"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;style type=&quot;text/css&quot;&gt;
&nbsp;
  .cuadrado{
     width:200px;
     height:200px;
  }
&nbsp;
  .fondorojo {
     background-color:red;
   }
&nbsp;
  .esquinas {
&nbsp;
     -moz-border-radius-topright:1em;
     -moz-border-radius-topleft:1em;
     -moz-border-radius-bottomright:1em;
     -moz-border-radius-bottomleft:1em; 
&nbsp;
   }
&nbsp;
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&nbsp;
 &lt;div class=&quot;cuadrado fondorojo esquinas&quot;&gt;
  &amp;nbsp;
 &lt;/div&gt;
&nbsp;
&lt;/body&gt;</pre></td></tr></table></div>

<p>Resultado, con el redondeado de esquinas para firefox</p>
<p><a href="http://www.railsymas.com/wp-content/uploads/2010/08/capamoz.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/08/capamoz.png" alt="" title="capamoz" width="214" height="216" class="alignnone size-full wp-image-1924" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2010/08/22/varias-clases-en-un-mismo-div/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plantillas velocity</title>
		<link>http://www.railsymas.com/2010/07/01/plantillas-velocity/</link>
		<comments>http://www.railsymas.com/2010/07/01/plantillas-velocity/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 21:01:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=1707</guid>
		<description><![CDATA[Estamos acostumbrados al desarrollo de las vistas o tratamiento de los datos desde la aplicaciones web realizadas con j2ee y frameworks del ámbito de java mediante jsp y jstl Velocity es una forma de representación más y una alternativa a las páginas jsp, muy adecuada para facilitar el modelo vista controlador Eclipse cuenta con un [...]]]></description>
			<content:encoded><![CDATA[<p> Estamos acostumbrados al desarrollo de las vistas o tratamiento de los datos desde la aplicaciones web realizadas con j2ee y frameworks del ámbito de java mediante jsp y jstl</p>
<p> <span id="more-1707"></span></p>
<p>Velocity es una forma de representación más y una alternativa a las páginas jsp, muy adecuada para facilitar el modelo vista controlador</p>
<p>Eclipse cuenta con un plugin que nos sirve para el reconocimiento de las palabras clave de velocity llamado veloeclipse</p>
<p>http://veloeclipse.googlecode.com/svn/trunk/update/</p>
<p>Con esto tenemos un plugin en eclipse que nos permite trabajar y reconocer la palabras claves del lenguaje vtl para velocity</p>
<p>Una vez descargado el plugin vamos a descargar velocity tools a la siguiente direccion <a href="http://velocity.apache.org/download.cgi#Tools">http://velocity.apache.org/download.cgi#Tools</a></p>
<p><a href="http://www.railsymas.com/wp-content/uploads/2010/07/veloci.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/07/veloci.png" alt="" title="veloci" width="580" height="219" class="alignnone size-full wp-image-1711" /></a></p>
<p>Si nos descargamos el archivo zip al descomprimirlo  dentro del directorio principal temos dentro del directorio examples un fichero war llamado simple que corresponde a un proyecto web configurado para empezar a trabajar con velocity</p>
<p><a href="http://www.railsymas.com/wp-content/uploads/2010/07/simple.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/07/simple.png" alt="" title="simple" width="124" height="90" class="alignnone size-full wp-image-1717" /></a></p>
<p>utilidad, comentar que se puede aplicar con aplicaciones web j2ee, struts, springframework y cms de java como liferay etc..  </p>
<p>Características básicas del lenguaje de plantillas velocity vtl, una breve introducción teórica a modo de resumen aunque en el sitio oficial tienen bastante información <a href="http://velocity.apache.org/engine/devel/translations/user-guide_es.html#%C2%BFQu%C3%A9esVelocity?"> apache velocity </a></p>
<p>Una vez cargado el proyecto simple war nos permite trabajar cómodamente. y gracias al plugin veloeclipse </p>
<p><a href="http://www.railsymas.com/wp-content/uploads/2010/07/provelocity1.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/07/provelocity1.png" alt="" title="provelocity" width="267" height="306" class="alignnone size-full wp-image-1732" /></a></p>
<p> Ejemplo de código, en el que se pone a prueba algunos elementos del lenguaje de platillas vtl</p>
<p> Para la declaración de una variable utilizamos #set( $variabledeclarada = &#8220;valor&#8221;), con la característica de que el valor puede ser tanto una </p>
<p>Utilizamos el valor # para realizar algo y $ para obtener algo,  como primer ejemplo tenemos la declaración de la variable título con # set para luego ser utilizada dentro de un h2 con $titulo devolviendo el valor al encabezado de página. </p>
<p>Los comentarios en línea se utiliza los caracteres ##. Para los comentarios de múltiples líneas #* *#</p>
<p>Para escapar una variable utilizamos el carácter \  </p>
<p>Un objeto declarado se puede acceder $objeto.setMetodo y devolver el valor con $objeto.nombre</p>
<p>Sentencia #if (comparación ) #else #end</p>
<p>Bucle #foreach #end, recorrido de arrays</p>
<p>Las macro nos permiten crear bloques de código y reciben parámetros, estos bloques pueden trabajar con html y valores de variables, en el ejemplo se construye una tabla con el campo de las celdas de fondo verde </p>
<p>Objeto bean prueba</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Prueba <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> nombre<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> apellidos<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> edad<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getNombre<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> nombre<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setNombre<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> nombre<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">nombre</span> <span style="color: #339933;">=</span> nombre<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getApellidos<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> apellidos<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setApellidos<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> apellidos<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">apellidos</span> <span style="color: #339933;">=</span> apellidos<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> getEdad<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> edad<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setEdad<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> edad<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">edad</span> <span style="color: #339933;">=</span> edad<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	 <span style="color: #008000; font-style: italic; font-weight: bold;">/** To test exception handling in templates. */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> whine<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">IllegalArgumentException</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Código del fichero tools.xml</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tools<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;boolean&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;xhtml&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;boolean&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;isSimple&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;number&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;version&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;2.0&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;foo&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>this is foo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;bar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>this is bar.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbox</span> <span style="color: #000066;">scope</span>=<span style="color: #ff0000;">&quot;request&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tool</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;toytool&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;ToyTool&quot;</span> <span style="color: #000066;">restrictTo</span>=<span style="color: #ff0000;">&quot;index*&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tool</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;prueba&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;Prueba&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/toolbox<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbox</span> <span style="color: #000066;">scope</span>=<span style="color: #ff0000;">&quot;session&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tool</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;map&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;java.util.HashMap&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/toolbox<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tools<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Código de primero.vm</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
51
52
53
54
55
56
57
58
59
60
61
62
63
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>html<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
		#set<span style="color: #009900;">&#40;</span>$titulo <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;primer ejemplo con velocity&quot;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #339933;">&lt;</span>h1 <span style="color: #339933;">&gt;</span> $titulo <span style="color: #339933;">&lt;/</span>h1<span style="color: #339933;">&gt;</span>
		##esto es un comentario
		#<span style="color: #339933;">*</span> esto son múltiples comentarios
		   de varias líneas de código	
&nbsp;
		<span style="color: #339933;">*</span>#
&nbsp;
		vamos a escapar una variable
&nbsp;
		<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>
&nbsp;
		\$titulo
&nbsp;
		$prueba.<span style="color: #006633;">setNombre</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;pedro&quot;</span><span style="color: #009900;">&#41;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>
&nbsp;
		nombre es<span style="color: #339933;">:</span> $prueba.<span style="color: #006633;">nombre</span>
&nbsp;
		comparaci<span style="color: #339933;">&amp;</span>oacute<span style="color: #339933;">;</span>n<span style="color: #339933;">:</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>
&nbsp;
		#if<span style="color: #009900;">&#40;</span>$titulo <span style="color: #339933;">&amp;&amp;</span> $nuevo<span style="color: #009900;">&#41;</span>
			sale bien
		#else
			sale mal
		#end
&nbsp;
&nbsp;
		#set<span style="color: #009900;">&#40;</span> $listaalumnos <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;pedro&quot;</span>,<span style="color: #0000ff;">&quot;juan&quot;</span>,<span style="color: #0000ff;">&quot;ana&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>
&nbsp;
		listado<span style="color: #339933;">:</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>
&nbsp;
		#foreach<span style="color: #009900;">&#40;</span> $alumno in $listaalumnos<span style="color: #009900;">&#41;</span>
		  $alumno <span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>
		#end
&nbsp;
&nbsp;
	    <span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>
&nbsp;
		 tabla
&nbsp;
		 #macro<span style="color: #009900;">&#40;</span> tabla $color $listado<span style="color: #009900;">&#41;</span>
&nbsp;
			#foreach <span style="color: #009900;">&#40;</span>$alumno in $listado<span style="color: #009900;">&#41;</span>
            <span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;&lt;</span>td bgcolor<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;$color&quot;</span><span style="color: #339933;">&gt;</span>$alumno<span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;&lt;/</span>tr<span style="color: #339933;">&gt;</span>
			#end
		 #end
&nbsp;
		 #set<span style="color: #009900;">&#40;</span>$color<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;green&quot;</span><span style="color: #009900;">&#41;</span>
		 <span style="color: #339933;">&lt;</span>table<span style="color: #339933;">&gt;</span>
		   #tabla<span style="color: #009900;">&#40;</span> $color $listaalumnos<span style="color: #009900;">&#41;</span>
		 <span style="color: #339933;">&lt;/</span>table<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>resultado de la ejecución </p>
<p><a href="http://www.railsymas.com/wp-content/uploads/2010/07/primervelocity.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/07/primervelocity.png" alt="" title="primervelocity" width="535" height="332" class="alignnone size-full wp-image-1754" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2010/07/01/plantillas-velocity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hibernate  tools para eclipse</title>
		<link>http://www.railsymas.com/2010/06/16/hibernate-tools-para-eclipse/</link>
		<comments>http://www.railsymas.com/2010/06/16/hibernate-tools-para-eclipse/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 20:17:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>
		<category><![CDATA[struts]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=1621</guid>
		<description><![CDATA[Hibernate es el principal orm (herramienta de mapeo objeto relacional) para las aplicaciones java, no es el único y junto con ibatis Hibernate facilita el mapeo entre una base de datos y el modelo de objetos de una aplicación, su configuración se realiza mediante archivos xml, aunque también se puede trabajar con jpa (anatociones). Hibernate [...]]]></description>
			<content:encoded><![CDATA[<p>  Hibernate es el principal orm (herramienta de mapeo objeto relacional) para las aplicaciones java, no es el único y junto con ibatis </p>
<p><span id="more-1621"></span></p>
<p>Hibernate facilita el mapeo entre una base de datos y el modelo de objetos de una aplicación, su configuración se realiza mediante archivos xml, aunque también se puede trabajar con jpa (anatociones).</p>
<p>Hibernate permite gestionar bases de datos, trabajar con bases de datos relacionales de una forma rápida recuperando objetos de las consultas para poder aplicar la lógica de negocio.</p>
<p>Eclipse dispone de un plugin que nos permite trabajar más comodamente con los archivos implicados en el trabajo con hibernate.</p>
<p>El plugin se denomina Hibernate tools y para la versión de eclipse galileo se recomienda </p>
<p> Dirección web</p>
<p>https://www.jboss.org/tools/download/stable/3_1_GA.html</p>
<p>Para una mejor referencia teórica puramente de hibernate el siguiente enlace ofrece gran ayuda <a href="http://www.davidmarco.es/tutoriales/hibernate-reference/">/www.davidmarco.es/tutoriales/hibernate-reference</a></p>
<p><a href="http://www.railsymas.com/wp-content/uploads/2010/06/hiberplugins.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/06/hiberplugins.png" alt="" title="hiberplugins" width="350" height="127" class="alignnone size-full wp-image-1631" /></a></p>
<p>Descargamos los los archivos correspondientes del archivo descargado en los directorios plugins y features del eclipse </p>
<p> para cargar el plugin en linux  dentro del directorio de eclipse galileo ./eclipse -clean y en windows sólo eclipse -clean<a href="http://www.railsymas.com/wp-content/uploads/2010/06/hiberxml.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/06/hiberxml.png" alt="" title="hiberxml" width="561" height="130" class="alignnone size-full wp-image-1635" /></a></p>
<p>Si vamos a file, new , other y nos aparece la pantalla anterior donde podemos observar como se puede elegir entre los diferentes archivos de configuración de hibernate.</p>
<p>Podemos activar la vista de hibernate, como siempre, window, open perspective , other, hibernate, así se abren unas series de ventanas de consulta y configuración</p>
<p><a href="http://www.railsymas.com/wp-content/uploads/2010/06/perhibernate.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/06/perhibernate.png" alt="" title="perhibernate" width="147" height="42" class="alignnone size-full wp-image-1640" /></a></p>
<p>Una vez en la perspectiva de hibernate, hacemos file , new , hibernate Configuration file<br />
<a href="http://www.railsymas.com/wp-content/uploads/2010/06/confighibern.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/06/confighibern.png" alt="" title="confighibern" width="538" height="463" class="alignnone size-full wp-image-1642" /></a></p>
<p>Se hace referencia en el contenedor al proyecto donde estará el archivo de configuración, el nombre del archivo puede ser cualquiera, pero por defecto es hibernate.cgf.xml,</p>
<p>Se introducen los datos correspondientes al nombre de usuario y clave de la base de datos.<br />
Se indica el tipo de driver  a utilizar y el url a  la base de datos, en este caso para mysql</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE hibernate-configuration PUBLIC</span>
<span style="color: #00bbdd;">		&quot;-//Hibernate/Hibernate Configuration DTD 3.0//EN&quot;</span>
<span style="color: #00bbdd;">		&quot;http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;hibernate-configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;session-factory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hibernate.connection.driver_class&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>com.mysql.jdbc.Driver<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hibernate.connection.username&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>root<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hibernate.connection.password&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>root<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hibernate.connection.url&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span> jdbc:mysql://localhost:3306/libros_jdbc<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hibernate.dialect&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>org.hibernate.dialect.MySQL5Dialect<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hibernate.hbm2ddl.auto&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>update<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;show_sql&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;format_sql&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mapping</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;modelos/Libros.hbm.xml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>       
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mapping</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;modelos/Estudiante.hbm.xml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mapping</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;modelos/Direccion.hbm.xml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/session-factory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/hibernate-configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p> En este archivo de configuración principal se indican donde estan ubicados los ficheros de mapeo hbm.xml a las tablas de la base de datos en este caso al package modelos.</p>
<p>  mapping resource=&#8221;modelos/Libros.hbm.xml&#8221;</p>
<p> vemos la correspondencia con los archivos de mapeo </p>
<p><a href="http://www.railsymas.com/wp-content/uploads/2010/06/modeloshiber.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/06/modeloshiber.png" alt="" title="modeloshiber" width="240" height="180" class="alignnone size-full wp-image-1656" /></a></p>
<p>Consola de configuración de hibernate donde indicamos el proyecto, así como la ubicación del fichero de configuración de hibernate</p>
<p><a href="http://www.railsymas.com/wp-content/uploads/2010/06/consolahiber1.png"><img src="http://www.railsymas.com/wp-content/uploads/2010/06/consolahiber1.png" alt="" title="consolahiber" width="580" height="480" class="alignnone size-full wp-image-1658" /></a></p>
<p>los valores de hibernate.hbm2ddl.auto son create que destruye las tablas de la base de datos y crea unas nuevas cada vez que ejecutamos la aplicación, update que no destruimos las tablas al arracan la aplicación y nos permite la modificación de los datos almacenados, validate valida el esquema y no hace cambios en la base de datos y create-drop el limina el esquema al final de la sesión</p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2010/06/16/hibernate-tools-para-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>maven2 con eclipse  Maven plugins may not work</title>
		<link>http://www.railsymas.com/2010/06/03/maven2-con-eclipse-maven-plugins-may-not-work/</link>
		<comments>http://www.railsymas.com/2010/06/03/maven2-con-eclipse-maven-plugins-may-not-work/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 01:22:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=1595</guid>
		<description><![CDATA[una vez creada la variable maven 2 en las variables de entorno del sistema así como en eclipse puede que al abrir este editor nos salga un mensaje de error Se recomienda si nos sale al arrancar eclipse un mensaje como este: Some Maven plugins may not work when importing projects or updating source folders. [...]]]></description>
			<content:encoded><![CDATA[<p>una vez creada la variable maven 2 en las variables de entorno del sistema así como en eclipse puede que al abrir este editor nos salga un mensaje de error</p>
<p><span id="more-1595"></span></p>
<p>Se recomienda si nos sale al arrancar eclipse un mensaje como este: Some Maven plugins may not work when importing projects or updating source folders.</p>
<p>cambiar el jre por el jre de jdk, y editar el fichero eclipse.ini con las siguiente lineas</p>
<p>-vm<br />
 path jdk\jre\bin\javaw</p>
<p>-vm<br />
C:\Java\jdk1.6.0_18\jre\bin\javaw</p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2010/06/03/maven2-con-eclipse-maven-plugins-may-not-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Desarrollo web drupal 6.x pages blank navigation</title>
		<link>http://www.railsymas.com/2010/05/11/desarrollo-web-drupal-6-x-pages-blank-navigation/</link>
		<comments>http://www.railsymas.com/2010/05/11/desarrollo-web-drupal-6-x-pages-blank-navigation/#comments</comments>
		<pubDate>Tue, 11 May 2010 08:33:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nuevas Tecnologías]]></category>

		<guid isPermaLink="false">http://www.railsymas.com/?p=1518</guid>
		<description><![CDATA[Un problema que me encontre con el trabajo de menús con este cms, fué que al acceder a la página de navegación me aparecía una página en blanco, sin dar ningun error ni impresión de ningún código. El problema era el limite de memoria asignado a php5 en apache2, estaba por defecto a 16M y [...]]]></description>
			<content:encoded><![CDATA[<p> Un problema que me encontre con el trabajo de menús con este cms, fué que al acceder a la página de navegación</p>
<p><span id="more-1518"></span></p>
<p>me aparecía una página en blanco, sin dar ningun error ni impresión de ningún código. </p>
<p>El problema era el limite de memoria asignado a php5 en apache2, estaba por defecto a 16M y para los requisitos de esta sección en el panel de drupal no llegaba. Lo subí a 32 Megas en el fichero php.ini y fui capaz de acceder al panel de navegación del cms   </p>
<p>El error lo daba en la ruta /build/menu-customize/navigation</p>
<p>Sitio oficial con las correspondientes explicaciones, esto ocurre si tenemos instalado el módulo  CCK</p>
<p> explicación oficial http://drupal.org/node/207036</p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsymas.com/2010/05/11/desarrollo-web-drupal-6-x-pages-blank-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

