SlideShare una empresa de Scribd logo
1 de 10
Descargar para leer sin conexión
Tema 2
Trabajando con
 Navegadores



        Willy Hurtado Vela
• Adquirir conciencia del problema de botón atrás y
  adelante en aplicación AJAX y saber solucionarlo

• Conocer el uso de la Clase History y la Interfaz
  ValueChangeHandler

• Tener la habilidad de escribir código para
  reconocimiento de navegadores

• Usar la técnica de Vinculación Diferida (Deferred
  Binding) para desacoplar código.



 Objetivos
1. El problema del botón Atrás
        1.1. Configurando su Pagina HTML
        1.2. La clase History
        1.3. La Interfaz ValueChangeHandler
2. Detectando Navegadores
        2.1. La manera clásica
        2.2. Usando Deferred Binding




Contenido
Codificación en JAVA

                   Javascript




Necesidades especificas del navegador o aplicación web




Trabajando con Navegadores
Botones de atrás y adelante en Chrome




      1. El problema del botón Atrás
<!-- OPTIONAL: include this if you want history
support -->
<iframe id="__gwt_historyFrame"
style="width:0;height:0;border:0"></iframe>


Unable to initialize the history subsystem; did you
include the history frame in your host page? Try
<iframe src="javascript:''"
id='__gwt_historyFrame'
style='position:absolute; width:0; height:0;
border:0'></iframe>



1.1. Configurando su pagina HTML
    1. El problema del boton Back
Clase: com.google.gwt.user.client.History

          History.addValueChangeHandler()


      #page0                            #page2

                       #page1




               History.newItem(token)

1.2. La clase History
    1. El problema del boton Back
Interfaz:
com.google.gwt.event.logical.shared.ValueChangeHandler
     @Override
     public void onValueChange(ValueChangeEvent<String> event)
     {
         // Ir al estado token = event.getValue()
     }




         #page0           #page1           #page2


1.3. La Interfaz ValueChangeHandler
    1. El problema del boton Back
public static native String getUserAgent() /*-{
    return navigator.userAgent.toLowerCase();
 }-*/;




 if (getUserAgent().contains("gecko")) ...




2.1. La manera clásica
    2. Detectando navegadores
<!-- Vinculacion Diferida para recocer IE 6 y 8-->
      <replace-with class="com.mycompany.project.client.HolaMundoNavegadorIE">
            <when-type-is
class="com.mycompany.project.client.HolaMundoNavegadorEstandar"/>
            <any>
                  <when-property-is name="user.agent" value="ie6"/>
                  <when-property-is name="user.agent" value="ie8"/>
            </any>
      </replace-with>



2.2. Usando Deferred Binding
      2. Detectando navegadores

Más contenido relacionado

Destacado

Bureaupresentatie2010
Bureaupresentatie2010Bureaupresentatie2010
Bureaupresentatie2010ghoo
 
ZASHADU MADE IN NIGERIA - MEDIA KIT
ZASHADU MADE IN NIGERIA - MEDIA KIT ZASHADU MADE IN NIGERIA - MEDIA KIT
ZASHADU MADE IN NIGERIA - MEDIA KIT Wild Flowers
 
Bridge Hampton - Casa para Investimento ou Lazer em Miami-FL
Bridge Hampton - Casa para Investimento ou Lazer em Miami-FLBridge Hampton - Casa para Investimento ou Lazer em Miami-FL
Bridge Hampton - Casa para Investimento ou Lazer em Miami-FLThiago Turbian
 
Media evaluation final
Media evaluation finalMedia evaluation final
Media evaluation finaljackshukie
 
Presentation durham2013
Presentation durham2013Presentation durham2013
Presentation durham2013EesySoft
 
Vecny obsah zakona o statnej sprave a skolskej samosprave
Vecny obsah zakona o statnej sprave a skolskej samospraveVecny obsah zakona o statnej sprave a skolskej samosprave
Vecny obsah zakona o statnej sprave a skolskej samospraveKomora Učiteľov
 
Bb w ppt_what happens in blackboard p rayment
Bb w ppt_what happens in blackboard p raymentBb w ppt_what happens in blackboard p rayment
Bb w ppt_what happens in blackboard p raymentEesySoft
 
Nlbbug eesysoftv1.1
Nlbbug eesysoftv1.1Nlbbug eesysoftv1.1
Nlbbug eesysoftv1.1EesySoft
 
My Brickel - Apartamento em Miami-FL
My Brickel - Apartamento em Miami-FLMy Brickel - Apartamento em Miami-FL
My Brickel - Apartamento em Miami-FLThiago Turbian
 
Media evaluation final
Media evaluation finalMedia evaluation final
Media evaluation finaljackshukie
 
Conventions of music magazines
Conventions of music magazinesConventions of music magazines
Conventions of music magazinesjackshukie
 
Why our help documentation might as well be in Dutch!
Why our help documentation might as well be in Dutch! Why our help documentation might as well be in Dutch!
Why our help documentation might as well be in Dutch! EesySoft
 
Maastricht University
Maastricht UniversityMaastricht University
Maastricht UniversityEesySoft
 
Presentation teaching&learning conference 2012
Presentation teaching&learning conference 2012Presentation teaching&learning conference 2012
Presentation teaching&learning conference 2012EesySoft
 
Energy Conservation And transformation
Energy Conservation And transformationEnergy Conservation And transformation
Energy Conservation And transformationUtsav Ameta
 

Destacado (18)

Bureaupresentatie2010
Bureaupresentatie2010Bureaupresentatie2010
Bureaupresentatie2010
 
ZASHADU MADE IN NIGERIA - MEDIA KIT
ZASHADU MADE IN NIGERIA - MEDIA KIT ZASHADU MADE IN NIGERIA - MEDIA KIT
ZASHADU MADE IN NIGERIA - MEDIA KIT
 
Bridge Hampton - Casa para Investimento ou Lazer em Miami-FL
Bridge Hampton - Casa para Investimento ou Lazer em Miami-FLBridge Hampton - Casa para Investimento ou Lazer em Miami-FL
Bridge Hampton - Casa para Investimento ou Lazer em Miami-FL
 
Media evaluation final
Media evaluation finalMedia evaluation final
Media evaluation final
 
Presentation durham2013
Presentation durham2013Presentation durham2013
Presentation durham2013
 
Vecny obsah zakona o statnej sprave a skolskej samosprave
Vecny obsah zakona o statnej sprave a skolskej samospraveVecny obsah zakona o statnej sprave a skolskej samosprave
Vecny obsah zakona o statnej sprave a skolskej samosprave
 
Bb w ppt_what happens in blackboard p rayment
Bb w ppt_what happens in blackboard p raymentBb w ppt_what happens in blackboard p rayment
Bb w ppt_what happens in blackboard p rayment
 
Cwc
CwcCwc
Cwc
 
Nlbbug eesysoftv1.1
Nlbbug eesysoftv1.1Nlbbug eesysoftv1.1
Nlbbug eesysoftv1.1
 
My Brickel - Apartamento em Miami-FL
My Brickel - Apartamento em Miami-FLMy Brickel - Apartamento em Miami-FL
My Brickel - Apartamento em Miami-FL
 
Mundo louco
Mundo loucoMundo louco
Mundo louco
 
Media evaluation final
Media evaluation finalMedia evaluation final
Media evaluation final
 
Conventions of music magazines
Conventions of music magazinesConventions of music magazines
Conventions of music magazines
 
Why our help documentation might as well be in Dutch!
Why our help documentation might as well be in Dutch! Why our help documentation might as well be in Dutch!
Why our help documentation might as well be in Dutch!
 
Maastricht University
Maastricht UniversityMaastricht University
Maastricht University
 
Ppt concurso de ingles 3º-2015
Ppt   concurso de ingles 3º-2015Ppt   concurso de ingles 3º-2015
Ppt concurso de ingles 3º-2015
 
Presentation teaching&learning conference 2012
Presentation teaching&learning conference 2012Presentation teaching&learning conference 2012
Presentation teaching&learning conference 2012
 
Energy Conservation And transformation
Energy Conservation And transformationEnergy Conservation And transformation
Energy Conservation And transformation
 

Similar a TrabajandoNavegadores (20)

JqueryMobile
JqueryMobile JqueryMobile
JqueryMobile
 
Gwt II - trabajando con gwt
Gwt II - trabajando con gwtGwt II - trabajando con gwt
Gwt II - trabajando con gwt
 
Web services GeneXus Tilo
Web services GeneXus TiloWeb services GeneXus Tilo
Web services GeneXus Tilo
 
Javascript Clásico
Javascript ClásicoJavascript Clásico
Javascript Clásico
 
Comenzando con GWT
Comenzando con GWTComenzando con GWT
Comenzando con GWT
 
8-Unidad 2: Diseños de Vista-2.3 Introducción Web Services
8-Unidad 2: Diseños de Vista-2.3 Introducción Web Services8-Unidad 2: Diseños de Vista-2.3 Introducción Web Services
8-Unidad 2: Diseños de Vista-2.3 Introducción Web Services
 
Seminario 2+parte wickets
Seminario 2+parte wicketsSeminario 2+parte wickets
Seminario 2+parte wickets
 
En 20 minutos ... jQuery
En 20 minutos ... jQueryEn 20 minutos ... jQuery
En 20 minutos ... jQuery
 
Unidad 3 AJAX
Unidad 3 AJAX Unidad 3 AJAX
Unidad 3 AJAX
 
Unidad3ajax
Unidad3ajaxUnidad3ajax
Unidad3ajax
 
Interfaces Usuario 3
Interfaces Usuario 3Interfaces Usuario 3
Interfaces Usuario 3
 
Seminario jquery, html5 y wicket
Seminario jquery, html5 y wicketSeminario jquery, html5 y wicket
Seminario jquery, html5 y wicket
 
Gwt III - Avanzado
Gwt III - AvanzadoGwt III - Avanzado
Gwt III - Avanzado
 
GWT
GWTGWT
GWT
 
Web components
Web componentsWeb components
Web components
 
T10_Ejercicios_Solucion.pdf
T10_Ejercicios_Solucion.pdfT10_Ejercicios_Solucion.pdf
T10_Ejercicios_Solucion.pdf
 
JQquery Mobile por Yamil Lambert
JQquery Mobile por Yamil LambertJQquery Mobile por Yamil Lambert
JQquery Mobile por Yamil Lambert
 
Ajax
AjaxAjax
Ajax
 
Google Tag Manager para aplicaciones en android
Google Tag Manager para aplicaciones en androidGoogle Tag Manager para aplicaciones en android
Google Tag Manager para aplicaciones en android
 
UDA-Componentes RUP. Mensajes (v2.1.1 deprecado)
UDA-Componentes RUP. Mensajes (v2.1.1 deprecado)UDA-Componentes RUP. Mensajes (v2.1.1 deprecado)
UDA-Componentes RUP. Mensajes (v2.1.1 deprecado)
 

TrabajandoNavegadores

  • 1. Tema 2 Trabajando con Navegadores Willy Hurtado Vela
  • 2. • Adquirir conciencia del problema de botón atrás y adelante en aplicación AJAX y saber solucionarlo • Conocer el uso de la Clase History y la Interfaz ValueChangeHandler • Tener la habilidad de escribir código para reconocimiento de navegadores • Usar la técnica de Vinculación Diferida (Deferred Binding) para desacoplar código. Objetivos
  • 3. 1. El problema del botón Atrás 1.1. Configurando su Pagina HTML 1.2. La clase History 1.3. La Interfaz ValueChangeHandler 2. Detectando Navegadores 2.1. La manera clásica 2.2. Usando Deferred Binding Contenido
  • 4. Codificación en JAVA Javascript Necesidades especificas del navegador o aplicación web Trabajando con Navegadores
  • 5. Botones de atrás y adelante en Chrome 1. El problema del botón Atrás
  • 6. <!-- OPTIONAL: include this if you want history support --> <iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe> Unable to initialize the history subsystem; did you include the history frame in your host page? Try <iframe src="javascript:''" id='__gwt_historyFrame' style='position:absolute; width:0; height:0; border:0'></iframe> 1.1. Configurando su pagina HTML 1. El problema del boton Back
  • 7. Clase: com.google.gwt.user.client.History History.addValueChangeHandler() #page0 #page2 #page1 History.newItem(token) 1.2. La clase History 1. El problema del boton Back
  • 8. Interfaz: com.google.gwt.event.logical.shared.ValueChangeHandler @Override public void onValueChange(ValueChangeEvent<String> event) { // Ir al estado token = event.getValue() } #page0 #page1 #page2 1.3. La Interfaz ValueChangeHandler 1. El problema del boton Back
  • 9. public static native String getUserAgent() /*-{ return navigator.userAgent.toLowerCase(); }-*/; if (getUserAgent().contains("gecko")) ... 2.1. La manera clásica 2. Detectando navegadores
  • 10. <!-- Vinculacion Diferida para recocer IE 6 y 8--> <replace-with class="com.mycompany.project.client.HolaMundoNavegadorIE"> <when-type-is class="com.mycompany.project.client.HolaMundoNavegadorEstandar"/> <any> <when-property-is name="user.agent" value="ie6"/> <when-property-is name="user.agent" value="ie8"/> </any> </replace-with> 2.2. Usando Deferred Binding 2. Detectando navegadores