Colegas,
Na pagina.xhtml abaixo eu preciso formatar o cep quando o usuario digitar.
Tentei fazer usando jquery como abaixo, porém ele não formata.
Obs: Estou usando o icefaces
Onde estou errando?
Muito obrigado,
Marques<?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:ice="http://www.icesoft.com/icefaces/component">
<head>
<title></title>
<ice:outputStyle href="./xmlhttp/css/xp/xp.css" />
<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/js/jquery.maskedinput-1.2.2.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#cep").mask("99999-999");
});
</script>
</head>
<body>
<f:view>
<f:loadBundle basename="br.com.fit.utils.MessageBundle" var="msg" />
<ui:composition template="../template.xhtml">
<ui:define name="top">
<h:outputText value="#{msg.cadastros_label}" />
<h:outputText value=" > " />
<h:outputText value="#{msg.regional_label}" />
</ui:define>
<ui:define name="left">
<ui:include src="menuPrincipalOptions.xhtml" />
</ui:define>
<ui:define name="right">
<ice:form>
<br />
<table border="0" cellpadding="0" cellspacing="0"
class="back_color1">
<tr>
<td class="td_leftCell">
<h:outputText value="#{msg.cep_label}" />
</td>
<td>
<ice:inputText id="cep" value="#{regionalMB.enderecoVO.cep}" size="30" />
</td>
</tr>
</table>
</ice:form>
</ui:define>
</ui:composition>
</f:view>
</body>
</html>