<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [Gvsig_usuarios] NavTable Forms</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">Buenas tardes Andrés,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">Efectivamente, modificando la versión de las librerías ha funcionado.</FONT></SPAN><SPAN LANG="ca"> <FONT FACE="Consolas">Eso sí, el ejemplo que tenía operativo con la antigua (con la limitación que motivó mi consulta) ha dejado de funcionar y he tenido que realizar el siguiente cambio</FONT></SPAN><SPAN LANG="ca"><FONT FACE="Consolas"> (en rojo)</FONT></SPAN><SPAN LANG="ca"><FONT FACE="Consolas">:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&gt;&gt;&gt; Clase es.udc.cartolab.gvsig.navtableforms.AbstractForm</FONT></SPAN></P>
<BR>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">protected Vector&lt;Integer&gt; getIndexesOfChangedValues() {</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Vector&lt;Integer&gt; changedValues = new Vector&lt;Integer&gt;();</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try {</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SelectableDataSource rs = layer.getRecordset();</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Map&lt;String, String&gt; widgetValues = formModel.getWidgetValues();</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Value value;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String key;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String valueInRecordSet;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String valueInModel;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int index = 0; index &lt; rs.getFieldCount(); index++) {</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value = rs.getFieldValue(currentPosition, index);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; valueInRecordSet = value</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .getStringValue(ValueWriter.internalValueWriter);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key = rs.getFieldName(index);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; valueInModel = widgetValues.get(key.toLowerCase());</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><B><FONT COLOR="#FF0000" FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (valueInModel==null) valueInModel = widgetValues.get(key.toUpperCase());</FONT></B></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; valueInRecordSet = valueInRecordSet.replaceAll(&quot;''&quot;, &quot;&quot;).trim();</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (valueInModel!=null) {</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; valueInModel = valueInModel.trim();</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!valueInRecordSet.equals(valueInModel)) {</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; changedValues.add(new Integer(index));</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } catch (ReadDriverException e) {</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.error(e.getMessage(), e);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return changedValues;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&nbsp;&nbsp;&nbsp; }</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">He tenido que añadir esa condición porque los campos de nuestro fichero SHAPE y de otras tablas geográficas que tenemos cargadas en Oracle Spatial están definidos en may</FONT></SPAN><SPAN LANG="ca"><FONT FACE="Consolas">úsculas. ¿Contempla vuestra librería la opción de que los campos aparezcan definidos de esta forma o es obligatorio que estén en minúsculas?</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">Muchas gracias por tu ayuda.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">Juan Carlos</FONT></SPAN><SPAN LANG="ca"></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"></SPAN><SPAN LANG="ca"><FONT FACE="Consolas">-----Missatge original-----<BR>
De: gvsig_usuarios-bounces@listserv.gva.es [<A HREF="mailto:gvsig_usuarios-bounces@listserv.gva.es">mailto:gvsig_usuarios-bounces@listserv.gva.es</A>] En nom de Andrés Maneiro<BR>
Enviat: miércoles, 02 de noviembre de 2011 16:45<BR>
Per a: Lista de Usuarios de gvSIG<BR>
Tema: Re: [Gvsig_usuarios] NavTable Forms</FONT></SPAN><SPAN LANG="ca"></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">On 02/11/11 16:15, Gonzalez, Juan Carlos wrote:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&gt; Hola Andrés,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&gt;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&gt; Muchas gracias por tu pronta respuesta. Acabo de seguir tu recomendación y ya me he dado de alta en la lista que indicabas. No obstante, respondo a tu correo a través de la lista de gvSIG, puesto que ya inicié la consulta a través de esta lista.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&gt;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">Estupendo :)</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">&gt; En referencia a la pregunta que me formulas, el botón de guardar no aparece activo (está deshabilitado) y sólo consigo que se active si selecciono un registro e indico la opción de copiar registro seleccionado. En cambio, lo que necesito es poder manipular los atributos de elementos existentes y guardar los cambios.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">El botón de guardar está desactivado al inicio y sólo se activa en caso de que se edite alguno de los valores del formulario (es decir, cuando el valor que se ve en el formulario sea distinto al de la capa).</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">En alguna versión antigua teníamos un bug con este comportamiento y puede que te esté ocurriendo lo mismo. Échale un ojo a este reporte a ver si es el caso:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"></SPAN><A HREF="http://forge.osor.eu/tracker/index.php?func=detail&amp;aid=15225&amp;group_id=122&amp;atid=462"><SPAN LANG="ca"><FONT FACE="Consolas">http://forge.osor.eu/tracker/index.php?func=detail&amp;aid=15225&amp;group_id=122&amp;atid=462</FONT></SPAN><SPAN LANG="ca"></SPAN></A><SPAN LANG="ca"></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">Lo que te recomendaría es que descargues del repositorio la última versión de la librería y pruebes con ésa. En caso de que no pudieses actualizar la librería, bastaría con que aplicases el parche que se adjunta al reporte anterior.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">Andrés</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">_______________________________________________</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">gvSIG_usuarios mailing list</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"></SPAN><A HREF="mailto:gvSIG_usuarios@listserv.gva.es"><SPAN LANG="ca"><FONT FACE="Consolas">gvSIG_usuarios@listserv.gva.es</FONT></SPAN><SPAN LANG="ca"></SPAN></A><SPAN LANG="ca"></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"><FONT FACE="Consolas">Para ver histórico de mensajes, editar sus preferencias de usuario o darse de baja en esta lista, acuda a la siguiente dirección:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="ca"></SPAN><A HREF="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios"><SPAN LANG="ca"><FONT FACE="Consolas">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios</FONT></SPAN><SPAN LANG="ca"></SPAN></A><SPAN LANG="ca"></SPAN></P>

</BODY>
</HTML>