JSF + confirmação com javascript

Olá,

Eu estou tentando colocar uma mensagem de confirmação com javascript antes de chamar meu Managed Bean, porém o que parece muito básico não esta funcionando. O método do MB é chamado porém o evento onsubmit não é executado.

Alguém teria alguma dica.

Abaixo segue o código do meu formulário.

Dentro do h:form tem o atributo onsubmit da seguinte forma:
onsubmit="return confirm(‘Confirma ?’)

Coloquei aqui pois o fórum não está apresentando o código completo.

Grato

<f:view>
<html>
<head>
<meta http-equiv=“Content-Type”
content=“text/html; charset=windows-1252”/>
<title>Teste</title>
</head>
<body>

&lt;h:form onsubmit="return confirm('Confirma ?');"&gt;    
    &lt;h:panelGrid columns="2"&gt;
      &lt;h:outputText value="Nome"/&gt;
      &lt;h:inputText value="#{agendaMB.nome}"/&gt;
      &lt;h:outputText value="Telefone"/&gt;
      &lt;h:inputText value="#{agendaMB.fone}"/&gt;
      &lt;h:commandButton value="Inserir" action="#{agendaMB.insere}"/&gt;
      &lt;h:commandButton value="Limpar" type="reset"/&gt;
    &lt;/h:panelGrid&gt;
  &lt;/h:form&gt;&lt;/body&gt;

</html>
</f:view>

tente este código.

<f:view>
<html>
<head>
<meta http-equiv=“Content-Type”
content=“text/html; charset=windows-1252”/>
<title>Teste</title>
</head>
<body>

<h:form>
<h:panelGrid columns=“2”>
<h:outputText value=“Nome”/>
<h:inputText value="#{agendaMB.nome}"/>
<h:outputText value=“Telefone”/>
<h:inputText value="#{agendaMB.fone}"/>
<h:commandButton onclick=“return confirm(‘Confirma ?’);” value=“Inserir” action="#{agendaMB.insere}"/>
<h:commandButton value=“Limpar” type=“reset”/>
</h:panelGrid>
</h:form></body>
</html>
</f:view>

Valeu!
Desta forma funcionou!

[quote=DanielPaiva]tente este código.

<f:view>
<html>
<head>
<meta http-equiv=“Content-Type”
content=“text/html; charset=windows-1252”/>
<title>Teste</title>
</head>
<body>

<h:form>
<h:panelGrid columns=“2”>
<h:outputText value=“Nome”/>
<h:inputText value="#{agendaMB.nome}"/>
<h:outputText value=“Telefone”/>
<h:inputText value="#{agendaMB.fone}"/>
<h:commandButton onclick=“return confirm(‘Confirma ?’);” value=“Inserir” action="#{agendaMB.insere}"/>
<h:commandButton value=“Limpar” type=“reset”/>
</h:panelGrid>
</h:form></body>
</html>
</f:view>
[/quote]