es.mcu.yingo.campos.html
Class GeneradorHtmlSelectValueEtiquetas

java.lang.Object
  extended by es.mcu.yingo.campos.html.GeneradorHtmlConListadorAbstracto
      extended by es.mcu.yingo.campos.html.GeneradorHtmlSelect
          extended by es.mcu.yingo.campos.html.GeneradorHtmlSelectValueEtiquetas
All Implemented Interfaces:
GeneradorHtml, org.springframework.context.ApplicationContextAware

public class GeneradorHtmlSelectValueEtiquetas
extends GeneradorHtmlSelect
implements org.springframework.context.ApplicationContextAware

Implementacion en formato html de un campo de tipo "Selct". Esta implementación en concreto pinta un desplegable en dos niveles, es decir, un título y una lista de valores asociada a dicho título, seguidamente otro título y otra lista de valores, y así sucesivamente
Por ejemplo, se mostraría en el desplegable algo como esto:

Título Uno
Valor 1
Valor 2
Valor 3
Título Dos
Valor 4
Título Tres
Valor 5
Valor 6
Valor 7
El listador de este campo, debe devolver una lista de objetos de tipo ListadorEtiquetas y dicho objeto a su vez, se forma con un título y una lista de objetos de tipo CodVal

Author:
carlos.garcia.h

Field Summary
protected  org.springframework.context.ApplicationContext applicationContext
          Contexto
 
Fields inherited from interface es.mcu.yingo.campos.html.GeneradorHtml
BUSCA, MODIFICA, MUESTRA, NUEVO
 
Constructor Summary
GeneradorHtmlSelectValueEtiquetas()
           
 
Method Summary
 org.springframework.context.ApplicationContext getApplicationContext()
          Contexto
 java.lang.String getHTML(int tipo, java.lang.String id, java.lang.Object value, java.lang.String codExpediente, java.util.Locale locale)
          Devuelve el código HTML generado, esto es la representación en formato html de un campo de tipo select con etiquetas, de este tipo:
Título Uno Valor 1 Valor 2 Valor 3 Título Dos Valor 4 Título Tres Valor 5 Valor 6 Valor 7
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
          Contexto
private  java.lang.String traduce(java.lang.String valor, java.util.Locale locale)
          Traducimos el literal
 
Methods inherited from class es.mcu.yingo.campos.html.GeneradorHtmlSelect
getElPrimerElementoVacio, setElPrimerElementoVacio
 
Methods inherited from class es.mcu.yingo.campos.html.GeneradorHtmlConListadorAbstracto
getListador, setListador
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applicationContext

protected org.springframework.context.ApplicationContext applicationContext
Contexto

Constructor Detail

GeneradorHtmlSelectValueEtiquetas

public GeneradorHtmlSelectValueEtiquetas()
Method Detail

getHTML

public java.lang.String getHTML(int tipo,
                                java.lang.String id,
                                java.lang.Object value,
                                java.lang.String codExpediente,
                                java.util.Locale locale)
                         throws java.lang.Exception
Devuelve el código HTML generado, esto es la representación en formato html de un campo de tipo select con etiquetas, de este tipo:
Título Uno
Valor 1
Valor 2
Valor 3
Título Dos
Valor 4
Título Tres
Valor 5
Valor 6
Valor 7

Specified by:
getHTML in interface GeneradorHtml
Overrides:
getHTML in class GeneradorHtmlSelect
Parameters:
tipo -
id -
value -
codExpediente -
locale -
Returns:
Throws:
java.lang.Exception

traduce

private java.lang.String traduce(java.lang.String valor,
                                 java.util.Locale locale)
Traducimos el literal

Parameters:
valor -
Returns:

getApplicationContext

public org.springframework.context.ApplicationContext getApplicationContext()
Contexto

Returns:
the applicationContext

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Contexto

Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Parameters:
applicationContext - the applicationContext to set