Schoker 12 de nov. de 2010
Schoker 17 de nov. de 2010
alguem sabe o que eu tenho q fazer?
raf4ever 17 de nov. de 2010
Sim.
Coloque aqui os erros que estão aparecendo.
Schoker 17 de nov. de 2010
o problema é que não aparece nenhum erro…ele abre a página só que ele não carrega os componentes do jQuery…
quando ele encontra o primeiro componente ele já nao carrega o resto da pagina…
raf4ever 17 de nov. de 2010
O JSF tá configurado direitinho?
Schoker 17 de nov. de 2010
simm…vou passar o web.xml e o faces-config.xml abaixo:
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version= "3.0" xmlns= "http://java.sun.com/xml/ns/javaee" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" >
<context-param>
<param-name> javax.faces.PROJECT_STAGE</param-name>
<param-value> Development</param-value>
</context-param>
<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> /faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file> faces/view/indexAdm.xhtml</welcome-file>
</welcome-file-list>
</web-app>
faces-config.xml
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<managed-bean>
<managed-bean-name> usuario</managed-bean-name>
<managed-bean-class> UsuarioDB</managed-bean-class>
<managed-bean-scope> session</managed-bean-scope>
</managed-bean>
</faces-config>
raf4ever 17 de nov. de 2010
Certo.
Agora bota uma página que usa o jquery.
Schoker 17 de nov. de 2010
< ? 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 : h = "http://java.sun.com/jsf/html"
xmlns : f = "http://java.sun.com/jsf/core" >
< h : head >
< title > Condom & iacute ; nio Local - In & iacute ; cio </ title >
<!-- JQUERY -->
< script src = "./javascript/jquery-1.4.2.js" type = "text/javascript" ></ script >
< script src = "./javascript/jquery-ui-1.8.5.custom.js" type = "text/javascript" ></ script >
<!-- JAVASCRIPT -->
< script src = "./javascript/principal.js" type = "text/javascript" ></ script >
< script src = "./ui/jquery.ui.tooltip.js" type = "text/javascript" ></ script >
< script src = "./ui/jquery.ui.overlay.js" type = "text/javascript" ></ script >
<!-- STYLESHEET -->
< link href = "./stylesheets/principal.css" rel = "stylesheet" type = "text/css" />
< link href = "./stylesheets/divs.css" rel = "stylesheet" type = "text/css" />
<!-- THEME -->
< link href = "./themes/tema_condominio/jquery.ui.all.css" type = "text/css" rel = "stylesheet" />
< script type = "text/javascript" >
$ ( document ) . ready ( function (){
// INICIANDO COMPONENTES DO JQUERY
$ ( '#tabs' ) . tabs ();
$ ( '#logoff' ) . button ({ icons : { primary : 'ui-icon-power' } });
$ ( '[title]' ) . tooltip ({ effect : 'slide' , offset : [ 60 , - 20 ] });
// CARREGANDO PÁGINA INICIAL NA DIV
$ ( '#conteudo' ) . load ( 'view/menu1.html' );
});
</ script >
</ h : head >
< h : body >
< f : view >
< h : form >
< center >
< div id = "borda_top" >
</ div >
<!-- CONTEÚDO DO SITE -->
< div id = "corpo" >
<!-- CABEÇALHO DE BOAS VINDAS -->
< div id = "bem_vindo" >
< table width = "930" align = "center" >
< tr >
< td width = "310" >
< h : outputText value = "Bem vindo" />
< b >< h : outputText value = "Heitor Hack Canabal" /></ b >
</ td >
< td align = "center" width = "310" >
</ td >
< td align = "right" width = "310" >
< a id = "logoff" style = "font-size: 9px;" title = "Sair do sistema" onclick = "showDialog('Esta operação não está funcionando.', 'Alerta', 'alert')" > Logoff </ a >
</ td >
</ tr >
</ table >
</ div >
<!-- IMAGEM DO CONDOMÍNIO -->
< div id = "logo_condominio" >
</ div >
<!-- ABAS DO SISTEMA -->
< div id = "tabs" >
< ul style = "height: 29.9px; padding-left: 6px;" >
< li >
< a href = "conteudo" onclick = "abrirPagina('view/menu1.html', 'conteudo');" title = "Área da administradora" >
< span style = "cursor:pointer;" > Administradora </ span >
</ a >
</ li >
< li >
< a href = "conteudo" onclick = "abrirPagina('view/menu2.html', 'conteudo')" title = "Área do condomínio" >
< span style = "cursor:pointer;" > Condom & iacute ; nio </ span >
</ a >
</ li >
< li >
< a href = "conteudo" onclick = "abrirPagina('view/menu3.html', 'conteudo')" title = "Área do morador" >
< span style = "cursor:pointer;" > Morador </ span >
</ a >
</ li >
</ ul >
< div id = "conteudo" >
</ div >
</ div >
<!-- RODAPÉ -->
< div id = "rodape" >
< a href = "http://uniup.com.br" target = "a_blank" >< span style = "color: #CCAA33; font-weight: bold;" > UniUp Group </ span ></ a >
</ div >
</ div >
< div id = "borda_bottom" >
</ div >
</ center >
</ h : form >
</ f : view >
</ h : body >
</ html >
Schoker 17 de nov. de 2010
raf4ever 17 de nov. de 2010
Bom,essa é a forma q eu importo os arquivos do Jquery:
& lt ; c : set var = "ctx" value = "#{facesContext.externalContext.request.contextPath}" /& gt ;
& lt ; script type = "text/javascript" src = "#{ctx}/js/jquery.maskedinput-1.2.1.js" & gt ; & lt ; / script & gt ;
Vc consegue verificar se teus .js estão sendo carregados?
Schoker 18 de nov. de 2010
o jeito q eu “invoco” o jQuery esta errado?
Schoker 19 de nov. de 2010
pessoall…eu descobri uma coisaa…o erro acontece pelo seguinte…
eu tenho um arquivo indexAdm.xhtml…ele tem as tags:
dessa forma tudo funciona, mesmo com o arquivo faces-config.xml no projeto…
porem…eu tenho que colocar a tag body assim <h:body> mas quando eu mudo a tag ele desconfigura toda a paginaa…
alguem sabe o que pode ser?
Desde já agradeço!