Hi, all.

I want to show error message when validation if fail, but it doesn't work if
i try to show it in my component, if i do the same in the page error message
shows.

Update.tml
<t:container >
        <form t:type="form" t:id="updateForm" class="user-form"
t:context="person.id" t:zone="result">
                <t:errors/>
                ......

Update.java
void onValidateFromUpdateForm() {

        if (!StringUtils.isBlank(person.getCountry()) &&
!countries.contains(person.getCountry().toUpperCase())) {
            updateForm.recordError("'country' is incorrect (format must be
ISO 3166-1)");
        }
}

Object onFailureFromUpdateForm() {
        componentResources.triggerEvent(FAILED_UPDATE, new Object[] { personId 
},
getMyCallback());
        return zonesToUpdate;
}

Home.tml
....
<t:if test="modeUpdate">
        <t:update mode="mode" personID="personID" zone="result" id="update"/>
</t:if>
....

Home.java

Object onFailedUpdateFromEditor(Long personId) {
                return result.getBody() l;
        }



I really don't know why it doen't work. 
updateForm.getHasErrors() is true, when i write wrong value, but error isn't
shown.

Thanks
    

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/error-message-don-t-show-tp4959090p4959090.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to