Hi

Well to add to it, you should use @OnEvent(component = "form", value =
EventConstants.VALIDATE) instead of onValidateFromForm().

read more about why to prefer it in later part of this recent thread
http://tapestry.1045711.n5.nabble.com/Form-using-both-a-zone-and-no-zone-td4635695.html

regards
Taha

On Thu, Jul 28, 2011 at 12:11 PM, Taha Tapestry
<tawus.tapes...@gmail.com> wrote:
> Hi
>
> OnValidate is called for each form component and the form so if you want it 
> only for the form try onValidateFromForm()
>
> Regards
> Taha
>
> On Jul 28, 2011, at 11:56 AM, Gunnar Eketrapp <gunnar.eketr...@gmail.com> 
> wrote:
>
>> Hi!
>>
>> Maybe a newbie question but I have been on vacation for a month.
>>
>> Why does onValidate get's called four times when I submit form below.
>>
>> Thank's in advance!
>>
>> /Gunnar Eketrapp
>>
>> Form looks like ...
>>
>> <t:form t:id="form">
>>   <fieldset>
>>
>>   <label for="member" class="span-4">Mötesordförande:</label>
>>   <t:select name="chairman" t:id="chairman" value="meeting.chairman"
>> model="memberModel" encoder="memberEncoder" />
>>   <br/>
>>
>>   <label for="member" class="span-4">Sekreterare:</label>
>>   <t:select name="secretary" t:id="secretary" value="meeting.secretary"
>> model="memberModel" encoder="memberEncoder" />
>>   <br/>
>>
>>   <label for="member" class="span-4">Justerare:</label>
>>   <t:select name="justifier" t:id="justifier" value="meeting.justifier"
>> model="memberModel" encoder="memberEncoder" />
>>   <br/>
>>
>>   <label for="member" class="span-4">Justerare:</label>
>>   <t:select name="justifier2" t:id="justifier2" value="meeting.justifier2"
>> model="memberModel" encoder="memberEncoder" />
>>   <br/>
>>
>>   </fieldset>
>>
>>   <p>
>>   <t:submit t:id="save" value="Save" />
>>   </p>
>> </t:form>
>>
>> ====================================================================
>>
>> And log looks like ...
>>
>> 2011-07-28 08:08:57.666 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ENTER] onActivate(2, 19)
>> 2011-07-28 08:08:57.900 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ EXIT] onActivate [null]
>> 2011-07-28 08:08:57.903 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
>> 2011-07-28 08:08:57.903 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
>> 2011-07-28 08:08:57.903 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
>> 2011-07-28 08:08:57.903 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
>> 2011-07-28 08:08:57.903 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
>> 2011-07-28 08:08:57.904 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
>> 2011-07-28 08:08:57.904 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
>> 2011-07-28 08:08:57.904 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
>> 2011-07-28 08:08:57.906 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
>> 2011-07-28 08:08:57.906 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
>> 2011-07-28 08:08:57.907 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ENTER] onSuccessFromForm()
>> 2011-07-28 08:08:57.907 [btpool0-29] DEBUG
>> u.pages.meeting.MeetingParticipants - [ EXIT] onSuccessFromForm [null]
>
>

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

Reply via email to