The first one.

Rafael Dittberner


Musachy Barroso escreveu:
On which field are they piling up?

musachy

On 6/14/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote:

In one of my forms the validation error messages are piling up every
time the submit button is pressed. This only occurs in Firefox and only
with this form. I have other form working well both in IE and FF.

Anyone can help me?

The form:
<%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
        <link href="<s:url value="/css/styles.css"/>" rel="stylesheet"
type="text/css" />
</head>
<body>

<s:if test="hasActionMessages()">
<s:actionmessage/>
</s:if>

<span class="titulo">Cadastro de órgãos</span>

<s:form name="orgaoForm" action="orgao_save" method="post"
validate="true" namespace="/restrita">
        <s:textfield name="orgao.codObjeto" value="%{orgao.codObjeto}"
cssStyle="display:none" theme="simple" />
        <s:textfield label="Nome" name="orgao.nome" value="%{orgao.nome}"
required="true" size="70" maxlength="70" theme="xhtml" />
        <s:select label="Tipo" name="orgao.tipo.codObjeto" list="tipos"
listKey="codObjeto" listValue="nome" value="%{orgao.tipo.codObjeto}"
required="true" />
        <s:textfield label="Endereco" name="orgao.endereco"
value="%{orgao.endereco}" size="70" maxlength="70" />
        <s:textfield label="Cidade" name="orgao.cidade" value="%{
orgao.cidade}"
size="30" maxlength="50" />
        <s:textfield label="UF" name="orgao.uf" value="%{orgao.uf}"
size="2"
maxlength="2" />
        <s:textfield label="CEP" name="orgao.cep" value="%{orgao.cep}"
required="false" size="10" maxlength="8" />
        <tr>
                <td class="tdLabel"></td>
                <td class="botoes">
                        <s:submit value="Salvar" theme="simple"/>
                        <s:reset value="Limpar" theme="simple"/>
                </td>
        </tr>
</s:form>

</body>
</html>

The validation.xml file:
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>
<validators>
        <field name="orgao.nome">
                <field-validator type="requiredstring">
                        <message>O campo nome é obrigatório.</message>
                </field-validator>
                <field-validator type="stringlength">
                        <param name="maxLength">70</param>
                        <message>O campo nome deve ter no máximo 70
caracteres.</message>
                </field-validator>
        </field>
        <field name="orgao.endereco">
                <field-validator type="stringlength">
                        <param name="maxLength">70</param>
                        <message>O campo endereço deve ter no máximo 70
caracteres.</message>
                </field-validator>
        </field>
        <field name="orgao.cidade">
                <field-validator type="stringlength">
                        <param name="maxLength">50</param>
                        <message>O campo cidade deve ter no máximo 50
caracteres.</message>
                </field-validator>
        </field>
        <field name="orgao.uf">
                <field-validator type="stringlength">
                        <param name="maxLength">2</param>
                    <message>O campo UF deve ter no máximo 2
caracteres.</message>
                </field-validator>
        </field>
        <field name="orgao.cep">
                <field-validator type="stringlength">
                        <param name="maxLength">8</param>
                        <message>O campo CEP deve ter no máximo 8
caracteres.</message>
                </field-validator>
        </field>
</validators>

FF version 2.0.0.4
IE version 6.0.2900
Struts version 2.0.6

--
Rafael Dittberner


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to