tarcisio.filo 7 de jul. de 2008
markinho 8 de jul. de 2008
Ainda não consegui resolver o meu problema … os dados não atualizam … ficam nulos … ou quando eu clico no meu dataTable fica akeles dados que veio para sempre jah tentei de tudo … axo q vou desistir!!!
markinho 8 de jul. de 2008
Por favor me ajudem … tô precisando muito!!!
srá q teria algum problema estou usando o jsf 1.1?
abraços!!
Obrigado!
markinho 8 de jul. de 2008
Ai está meu jsp!!!
<% @taglib uri = "http://java.sun.com/jsf/html" prefix = "h" %>
<% @taglib uri = "http://java.sun.com/jsf/core" prefix = "f" %>
<% @taglib uri = "https://ajax4jsf.dev.java.net/ajax" prefix = "a4j" %>
<% @taglib uri = "http://richfaces.ajax4jsf.org/rich" prefix = "rich" %>
<% @taglib uri = "http://myfaces.apache.org/tomahawk" prefix = "t" %>
<html>
<head>
<title> Teste</title>
<style type= "text/css" >
.botao {
border-style: none;
border-right-style: solid;
border-right-width: 1;
border-right-color: #3870AF;
border-bottom-style: solid;
border-bottom-width: 1;
border-bottom-color: #3870AF;
cursor: hand;
color: #FFFFFF;
background-color: #336699;
font-weight: bold;
font-size: 11px;
font-family: arial;
padding: 2px;
width: 100px;
_filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#3870AF,endColorStr=#59BBFF);
}
.botaoTopo {
width: 3%;
}
.tituloTopo {
font-weight: bold;
font-style: italic;
font-size: 16px;
font-family: arial;
text-align: right;
}
.semMargem {
margin-top:0px;
margin-left:0px;
margin-bottom:0px;
margin-right:0px;
padding-top:0px;
padding-left:0px;
padding-bottom:0px;
padding-right:0px;
border:0px;
}
.alinhamentoBottom {
vertical-align:bottom;
width:50%;
}
.cabecalhoGrid {
height:40px;
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#346ba7,EndColorStr=#51a8e2);
text-align:center;
font-family:arial;
font-size:11px;
font-weight:bold;
}
.linhaGrid {
height:35px;
text-align:center;
font-family:arial;
font-size:11px;
width:10%;
}
.table{
font-family: arial;
font-size: 11px;
width: 100%;
table-layout: fixed;
}
.styleOutput{
font-family:arial;
font-size:11px;
font-style: italic;
}
.styleInput{
font-family:arial;
font-size:11px;
width:100%;
}
.alinhamentoRight{
text-align: right;
}
</style>
<script type= "text/javascript" src= "/teste/cadTeste.js" ></script>
</head>
<body background= "fundo.jpg" topmargin= "0" >
<f:view>
<a4j:form id= "cadTeste" >
<rich:panel id= "gridMapa" bodyClass= "semMargem" headerClass= "semMargem" style= "background-color:transparent;border:0px;" >
<h:panelGrid columns= "1" border= "0" cellpadding= "0" cellspacing= "0" columnClasses= "alinhamentoBottom" style= "width:100%;" >
<h:column>
<rich:dataTable columns= "4" columnsWidth= "70, 10, 10, 10" var= "objeto" value= "#{testeBean.listaMapaEstrategico}" rowKeyVar= "row" cellpadding= "0" cellspacing= "0" styleClass= "table" >
<f:facet name= "header" >
<rich:columnGroup>
<rich:column style= "text-align:left;" styleClass= "cabecalhoGrid" >
<h:outputText value= "Cadastro Teste" />
</rich:column>
<rich:column styleClass= "cabecalhoGrid" >
<h:outputText value= "Fechar" />
</rich:column>
<rich:column styleClass= "cabecalhoGrid" >
<h:outputText value= "Desativar" />
</rich:column>
<rich:column styleClass= "cabecalhoGrid" >
<h:outputText value= "Excluir" />
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column style= "text-align:left;" styleClass= "linhaGrid" >
<a4j:commandLink reRender= "dadosMapa" style= "cursor:hand;text-decoration:none;color:black;" oncomplete= "abreIframe('cadastroMapa')" >
<h:outputText value= "#{objeto.titulo}" onmouseover= "javascript:this.style.textDecoration='underline';"
onmouseout= "javascript:this.style.textDecoration='none';" />
<t:updateActionListener property= "#{testeBean.testeObjeto}" value= "#{objeto}" />
</a4j:commandLink>
</rich:column>
<rich:column styleClass= "linhaGrid" >
<t:selectBooleanCheckbox value= "#{objeto.fechado}" onclick= "abreConfimacao(this.checked, #{objeto.codigo}, '#{objeto.titulo}', 'fechar', this)" />
</rich:column>
<rich:column styleClass= "linhaGrid" >
<t:selectBooleanCheckbox value= "#{objeto.desativado}" onclick= "abreConfimacao(this.checked, #{objeto.codigo}, '#{objeto.titulo}', 'desativar', this)" />
</rich:column>
<rich:column styleClass= "linhaGrid" >
<h:graphicImage value= "/resources/imagens/fileclose.png" style= "cursor:hand;border:0px;" onclick= "abreConfimacao(true, #{objeto.codigo}, '#{objeto.titulo}', 'excluir', 0)" />
</rich:column>
</rich:dataTable>
</h:column>
</h:panelGrid>
<h:panelGrid rendered= "#{empty testeBean.listaMapaEstrategico}" columns= "1" border= "0" cellpadding= "0" cellspacing= "0"
style= "width:100%;vertical-align:middle;height:35px;background-color:#FFFFFF;border:1 1 1 1 solid;border-color:#AAAAAA;" >
<h:column>
<h:outputLabel value= "<< Não há dados para serem exibidos >>"
style= "width:100%;color:#777777;font-family:arial;font-size:11px;text-align:center;" />
</h:column>
</h:panelGrid>
</rich:panel>
<!--Iframe de Cadastro-->
<rich:modalPanel id= "cadastroMapa" autosized= "true" width= "450" height= "250" >
<f:facet name= "header" >
<h:panelGroup>
<h:outputLabel value= "Nome" style= "font-family:arial;font-size:11px;color:#FFFFFF;font-weight:bold;" />
</h:panelGroup>
</f:facet>
<f:facet name= "controls" >
<h:panelGroup>
<h:graphicImage value= "/resources/imagens/fechar.gif" title= "Fechar" style= "cursor:hand;border:0px;" onclick= "fechaIframe('cadastroMapa')" />
</h:panelGroup>
</f:facet>
<h:panelGrid id= "dadosMapa" columns= "1" styleClass= "table" >
<h:column>
<h:outputLabel value= "" styleClass= "styleOutput" />
</h:column>
<h:column>
<h:inputText value= "#{testeBean.testeObjeto.titulo}" styleClass= "styleInput" />
</h:column>
<h:column>
<h:outputLabel value= "Objetivo" styleClass= "styleOutput" />
</h:column>
<h:column>
<h:inputTextarea value= "#{testeBean.testeObjeto.objetivo}" onkeypress= "maxLengthTextArea(this)" onchange= "maxLengthTextArea(this)" style= "height:50px" styleClass= "styleInput" />
</h:column>
<h:column>
<h:outputLabel value= "Período de vigência" styleClass= "styleOutput" />
</h:column>
<h:column>
<h:panelGrid columns= "4" styleClass= "table" columnClasses= "alinhamentoRight, , alinhamentoRight, " >
<h:column>
<h:outputLabel value= "Data de início" styleClass= "styleOutput" style= "text-align:right;" />
</h:column>
<h:column>
<rich:calendar value= "#{testeBean.testeObjeto.dataInicio}" inputStyle= "font-size:10px;height:18px;width:70px;"
datePattern= "dd/MM/yyyy" locale= "pt_BR" showWeeksBar= "false" firstWeekDay= "0" showApplyButton= "false"
boundaryDatesMode= "select" popup= "true" enableManualInput= "true" cellWidth= "13px" cellHeight= "10px"
style= "font-size:8px;" />
</h:column>
<h:column>
<h:outputLabel value= "Data de término" styleClass= "styleOutput" style= "text-align:right;" />
</h:column>
<h:column>
<rich:calendar value= "#{testeBean.testeObjeto.dataTermino}" showWeeksBar= "false" inputStyle= "font-size:10px;height:18px;width:70px;"
boundaryDatesMode= "select" firstWeekDay= "0" datePattern= "dd/MM/yyyy" locale= "pt_BR"
showApplyButton= "false" enableManualInput= "true" popup= "true" cellWidth= "13px" cellHeight= "10px"
style= "font-size:8px;" />
</h:column>
</h:panelGrid>
</h:column>
</h:panelGrid>
<h:panelGrid columns= "2" border= "0" columnClasses= "alinhamentoRight, " styleClass= "table" >
<h:column>
<a4j:commandButton id= "salvar" value= "Salvar" styleClass= "botao" actionListener= "#{testeBean.salvarMapa}" bypassUpdates= "true" style= "display:none" />
<a4j:commandButton value= "Salvar" styleClass= "botao" onclick= "salvar('cadastroMapa')" />
</h:column>
<h:column>
<a4j:commandButton value= "Cancelar" styleClass= "botao" onclick= "fechaIframe('cadastroMapa')" />
</h:column>
</h:panelGrid>
</rich:modalPanel>
<!--Fim do Iframe de Cadastro-->
<a4j:keepAlive beanName= "testeBean" />
</a4j:form>
</f:view>
</body>
</html>
Me ajudem por favor… ficarei muito GRATO!!!
markinho 8 de jul. de 2008
Ae djDufu consegui kara … eh issuh ae mesmo … valeu …
só que no meu caso eu coloquei dois forms a4j (a4j:form )
muito obrigado … fico t devendo essa!!!
abraços kara … boa sorte na sua embreitada!!!