Struts - Aula 03

16
www.bluestar.inf.br BLUESTAR TECHNOLOGY JSP Avançado

Transcript of Struts - Aula 03

Page 1: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Page 2: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiago [email protected]

http://notasderua.blogspot.com

Page 3: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles É um framework construído para simplificar o desenvolvimento de interface usuário para aplicação web.

Permite ao desenvolvedor definir fragmentos que serão montados no momento da execução/construção de telas.

Estes fragmentos, reduzem a duplicação de elementos comuns e permitem desenvolver uma série de modelos reutilizáveis.

Page 4: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Construindo o Template

Page 5: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Contruindo o Template

Page 6: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Construindo o Template

Apelido da página

Page 7: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Construindo o Template

•Arquivo de definição para o template (tiles-def.xml)

Page 8: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Construindo o Template

• Cabeçalho do template

Page 9: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Construindo o Template

• Menu do template

Page 10: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Construindo o Template

• Página inicial do template

Page 11: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Construindo o Template

• Rodapé do template

Page 12: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Reutilizando os templates

Template padrão

Página que herda as própriedades do template padrão e sobrescreve o corpo do template

Page 13: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles Reutilizando o template padrão

Template padrão

Page 14: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles

Configurando o struts-config.xml

Arquivo de definição dos templates

Page 15: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles

O que muda no struts-config.xml

Utilizar o que foi definido no tiles e não o caminho completo do arquivo

struts-config.xml

tiles-defs.xml

Page 16: Struts - Aula 03

www.bluestar.inf.brBLU E ST AR T E CHNOLO G Y

JSP Avançado

Tiles

O que muda no struts-config.xmlstruts-config.xml

tiles-defs.xml