viniciusfaleiro 22 de fev. de 2010
To procurando a mesma coisa… parece que existem uns gerenciadores de layout… na página de exemplo do richfaces tem lá… se conseguir me fala…
viniciusfaleiro 22 de fev. de 2010
JotaJota 22 de fev. de 2010
Estou testando…
aviso e posto o resultado tbm
viniciusfaleiro 22 de fev. de 2010
raf4ever 23 de fev. de 2010
JotaJota:
Estou com uma duvida…
eu quero usar mais ou menos a tecnica de iframe mas no jsp/jsf
Não queria criar muito código… e queria fazer minha visão, minhas paginas jsp de forma separada do conteudo com o menu
mas nao queria ser redundante e ficar rescrevendo o menu…
alguem tem algum framework ou alguma dica pra fazer que nao se altere o menu e apenas mude o conteudo de acordo com o menu selecionado?
Atenciosamente,
Não seria Facelets o que vc tá querendo?
Tchello 23 de fev. de 2010
Exatamente, use o facelets. É exatamente o que você está precisando.
JotaJota 23 de fev. de 2010
Estou estudando facelets…
caramba que dor de cabeçaa isso! :shock: ahuahuahuha
So uma duvida …
O facelets funciona apenas para xhtml???
vlw
Tchello 23 de fev. de 2010
Sim, apenas xhtml.
Ou seja, diga adeus a seus scriptlets hehehehe (isso é bom).
Bom, leia:
http://www.rponte.com.br/2008/11/12/aplicacoes-serias-em-jsf-usam-facelets/
Tchello 23 de fev. de 2010
Also read:
Trying to combine JSF and JSP is like trying to shoehorn a foot into a glove: it's possible, but it's really just a stopgap measure until something better comes along. In this article, JSF enthusiast Rick Hightower introduces you to what he likes...
JotaJota 23 de fev. de 2010
JotaJota 9 de mar. de 2010
facelets é muito bonito, mas é mto chato tbm… bom… eu estou apanhando um pouco… mas é bem complexo os problemas…
att,
JotaJota 17 de mar. de 2010
Showwww
depois de quase duas semanas estudando facelets… eu posso falar
Facelets é muitoooooooo bom
show de bola
abraçãoo
sauron_fight 25 de jun. de 2010
Estou com um problema quero usar Richfaces e facelets.
coloquei no xhtml : xmlns:rich=“http://richfaces.org/rich ”
dentro do arquivo xhtml chamo o compomente richfaces: <rich:calendar></rich:calendar>
mais dentro dos componente richfaces não tenho acesso aos atributos, so tendo acesso ao atributo id, estou usando
facelets 1.1.14 e richfaces 3.3.0
Como esta :<rich:calendar></rich:calendar>
Como deveria esta <rich:calendar converter="" currentDate="" dayStyleClass=""> </rich:calendar>
Desde ja agradeco a todos.
JotaJota 25 de jun. de 2010
é realmente. com o xhtml vc dificulmente vai conseguir ver os atributos do richfaces e outros componentes também.
vc precisa abrir a api para usar as properties de lá…
mas se ficar muito dificil eu dou uma dica…
cria um jsp no projeto chamado teste, dai voce cria a pagina lá, com as facilidades do IDE que te mostra as propriedades.
depois de finalizado, voce pode copiar para o xhtml.
vai funcionar do mesmo jeito
espero ter ajudado…
sauron_fight 25 de jun. de 2010
Quando eu faco isso a linha fica em vermelho
e aparece o erro “O componente converter nao esta definido na interface do componente”
JotaJota 26 de jun. de 2010
manda os codigos ai…
vamos ver o que tá pegando
sauron_fight 26 de jun. de 2010
web.xml :
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
TemplateMenu.xhtml :
<?xml version=‘1.0’ encoding=‘UTF-8’ ?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional/
/EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ”>
<html xmlns="http://www.w3.org/1999/xhtml "
xmlns:ui="http://java.sun.com/jsf/facelets "
xmlns:h="http://java.sun.com/jsf/html "
xmlns:f="http://java.sun.com/jsf/core "
xmlns:rich="http://richfaces.org/rich "
xmlns:a4j=“http://richfaces.org/a4j ”>
& lt ; head & gt ;
& lt ; meta http - equiv = "Content-Type" content = "text/html; charset=UTF-8" /& gt ;
& lt ; link href = "./../css/default.css" rel = "stylesheet" type = "text/css" /& gt ;
& lt ; link href = "./../css/cssLayout.css" rel = "stylesheet" type = "text/css" /& gt ;
& lt ; title & gt ; SIGRH - Sistema de Gestão Recursos Humanos & lt ; / title & gt ;
& lt ; style & gt ;
. pic {
margin - bottom : - 4 px ;
margin - right : 2 px ;
}
& lt ; / style & gt ;
& lt ; / head & gt ;
& lt ; body & gt ;
& lt ; div id = "top" class = "top" & gt ;
& lt ; ui : insert name = "top" & gt ;
& lt ; f : view & gt ;
& lt ; h : form & gt ;
& lt ; h : graphicImage value = "pics/layout/logoCERHpequenaRodape.png" & gt ; & lt ; / h : graphicImage & gt ;
& lt ; rich : calendar converter = "" currentDate = "" dayStyleClass = "" & gt ; & lt ; / rich : calendar & gt ;
& lt ; rich : toolBar & gt ;
& lt ; rich : dropDownMenu id = "dropDownMenu" & gt ;
& lt ; f : facet name = "label" & gt ;
& lt ; h : panelGroup & gt ;
& lt ; h : graphicImage value = "./images/file.png" styleClass = "pic" /& gt ;
& lt ; h : outputText value = "File" /& gt ;
& lt ; / h : panelGroup & gt ;
& lt ; / f : facet & gt ;
& lt ; rich : menuGroup & gt ;
& lt ; rich : menuItem & gt ;
& lt ; h : commandLink action = "#{PersonFaces.doAddPerson}" value = "Pessoa" /& gt ;
& lt ; / rich : menuItem & gt ;
& lt ; rich : menuItem & gt ;
& lt ; h : commandLink action = "#{ClienteFaces.doAddCliente}" value = "Cliente" /& gt ;
& lt ; / rich : menuItem & gt ;
& lt ; / rich : menuGroup & gt ;
& lt ; / rich : dropDownMenu & gt ;
& lt ; / rich : toolBar & gt ;
& lt ; / h : form & gt ;
& lt ; / f : view & gt ;
& lt ; / ui : insert & gt ;
& lt ; / div & gt ;
& lt ; div id = "content" class = "center_content" & gt ;
& lt ; ui : insert name = "content" & gt ; Content & lt ; / ui : insert & gt ;
& lt ; / div & gt ;
& lt ; / body & gt ;
</html>
Include Template:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ”>
<html xmlns="http://www.w3.org/1999/xhtml "
xmlns:ui="http://java.sun.com/jsf/facelets "
xmlns:h="http://java.sun.com/jsf/html "
xmlns:f="http://java.sun.com/jsf/core "
xmlns:rich="http://richfaces.org/rich "
xmlns:a4j=“http://richfaces.org/a4j ”>
& lt ; body & gt ;
& lt ; ui : composition template = "/templates/TemplateMenu.xhtml" & gt ;
& lt ; ui : define name = "title" & gt ;
& lt ;/ ui : define & gt ;
& lt ;/ ui : composition & gt ;
& lt ;/ body & gt ;
</html>
JotaJota 26 de jun. de 2010
dá uma conferida:
<?xml version="1.0" encoding="ISO-8859-1"?>
Cadastro
<ui:define name= "content" >
<h:form id= "formCadastro" >
<h:panelGrid columns= "2" id= "cadastroForm" >
<h:outputLabel value= "Nome*" />
<h:inputText id= "nome" title= "Nome" value= "#{controleCadastro.cadastro.nome}" maxlength= "60" size= "60" required= "true" />
<h:outputLabel value= "Nascimento*" />
<rich:calendar id= "nascimento" value= "#{controleCadastro.cadastro.nascimento}" required= "true" />
<h:outputLabel value= "E-mail*" />
<h:inputText id= "mail" title= "E-mail" value= "#{controleCadastro.cadastro.mail}" maxlength= "60" size= "60" required= "true" />
<h:outputLabel value= "DDD" />
<h:inputText id= "ddd" title= "DDD" value= "#{controleCadastro.cadastro.DDD}" maxlength= "3" size= "3" required= "true" />
<h:outputLabel value= "Telefone" />
<h:inputText id= "telefone" title= "Telefone" value= "#{controleCadastro.cadastro.telefone}" maxlength= "8" size= "8" required= "true" />
<h:outputLabel value= "" />
</h:panelGrid>
<a4j:region id= "regiaoEnderecoCEP" rendered= "true" >
<h:panelGrid columns= "2" id= "regionEndereco" >
<h:outputLabel value= "CEP*" />
<h:inputText id= "cep" title= "CEP" value= "#{controleCadastro.cadastro.CEP}" maxlength= "9" size= "9" required= "true" >
<a4j:support event= "onblur" reRender= "regionEndereco" action= "#{controleCadastro.comandoPesquisaDadosEndereco}" />
</h:inputText>
<h:outputLabel value= "Endereço" />
<h:inputText id= "endereco" title= "Endereço" value= "#{controleCadastro.cadastro.endereco}" maxlength= "60" size= "60" disabled= "true" />
<h:outputLabel value= "Número*" />
<h:inputText id= "numero" title= "Número" value= "#{controleCadastro.cadastro.numero}" maxlength= "6" size= "6" />
<h:outputLabel value= "Complemento" />
<h:inputText id= "complemento" title= "Complemento" value= "#{controleCadastro.cadastro.complemento}" maxlength= "20" size= "30" />
<h:outputLabel value= "Cidade" />
<h:inputText id= "cidade" title= "Cidade" value= "#{controleCadastro.cadastro.cidade}" maxlength= "30" size= "30" disabled= "true" />
<h:outputLabel value= "Estado" />
<h:inputText id= "estado" title= "Estado" value= "#{controleCadastro.cadastro.uf}" maxlength= "10" size= "10" disabled= "true" />
<h:outputLabel value= "Bairros" />
<h:inputText id= "bairro" title= "Bairro" value= "#{controleCadastro.cadastro.bairro}" maxlength= "20" size= "20" disabled= "true" />
</h:panelGrid>
</a4j:region>
<a4j:commandButton value= "Avançar" action= "#{controleCadastro.comandoCadastroToSenha}" alt= "Avançar" title= "Avançar" id= "btnAvancar" />
<h:outputLabel value= "* Campo é obrigatório!" />
<h:outputLabel value= "#{controleCadastro.webServiceMensagem}" /><br/>
</h:form>
</ui:define>
</ui:composition>
se tiver tudo ok… vou acreditar que esta faltando libs…
sauron_fight 26 de jun. de 2010
Continua dando o mesmo erro. O engracado e que uso o richFaces normalmente
em outras paginas no sistema. Se eu usar o componente ele funciona mais nao tenho
como usar nenhum atributo do componente.
Será que não a alguma outra configuração no web.xml?
JotaJota 26 de jun. de 2010
enviei uma mp pra vc.
se quiser te ajudo on line velho!
JotaJota 26 de jun. de 2010
cara, pois é. configuração no web.xml não é so isso não velho!
pega ae
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xmlns= "http://java.sun.com/xml/ns/javaee" xmlns:web= "http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation= "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id= "WebApp_ID" version= "2.5" >
<display-name> webxmlExemplo</display-name>
<welcome-file-list>
<welcome-file> index.html</welcome-file>
</welcome-file-list>
<context-param>
<param-name> org.richfaces.SKIN</param-name>
<!-- <param-value>emeraldTown</param-value>-->
<!-- <param-value>blueSky</param-value> -->
<!-- <param-value>ruby</param-value> -->
<!-- <param-value>wine</param-value> -->
<!-- <param-value>deepMarine</param-value> -->
<!-- <param-value>japanCherry</param-value> -->
<!-- <param-value>plain</param-value> -->
<param-value> classic</param-value>
</context-param>
<context-param>
<param-name> org.richfaces.CONTROL_SKINNING</param-name>
<param-value> enable</param-value>
</context-param>
<context-param>
<param-name> javax.faces.STATE_SAVING_METHOD</param-name>
<param-value> server</param-value>
</context-param>
<context-param>
<param-name> javax.faces.DEFAULT_SUFFIX</param-name>
<param-value> .xhtml</param-value>
</context-param>
<filter>
<display-name> Ajax4jsf Filter</display-name>
<filter-name> ajax4jsf</filter-name>
<filter-class> org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name> ajax4jsf</filter-name>
<servlet-name> Faces Servlet</servlet-name>
<dispatcher> REQUEST</dispatcher>
<dispatcher> FORWARD</dispatcher>
<dispatcher> INCLUDE</dispatcher>
</filter-mapping>
<servlet>
<servlet-name> Faces Servlet</servlet-name>
<servlet-class> javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name> Faces Servlet</servlet-name>
<url-pattern> *.jsf</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name> teste</servlet-name>
<servlet-class> ServletVendaToPagSeguro</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name> teste</servlet-name>
<url-pattern> /servlet/teste</url-pattern>
</servlet-mapping>
</web-app>
JotaJota 26 de jun. de 2010
são as configurações para o hxml.
depois me fala o resultado blz?
abração
qq coisa abre a MP e add eu lah no msn
sauron_fight 27 de jun. de 2010
Amigo muito obrigado pela atencao!! consegui resolver removendo as libs richfaces-3.3.0 e adicionei 3.3.3 e deu certo.
Tudo de bom a todos.
JotaJota 28 de jun. de 2010