I will recklessly assume I have fully comprehended your mixin. I couldn't
get it to work thought since my zones are initially empty (filled later
through ajax or a t:delegate if the page is refreshed) and your mixin
operates on components being rendered. Also I have my fields in
*t:block* elements
and they aren't rendered initially by nature of course.

I'm fairly new to these methods so I'm stuck here and I have no ideas to
workaround this. Don't you think this deserves a JIRA as at least an
improvement if not a bug ? Or may be any other ideas ?

And thanks a million for your help :)

On Mon, Nov 19, 2012 at 5:44 PM, Ivan Khalopik <ikhalo...@gmail.com> wrote:

> All this because of changed form controls names after ajax update (some
> hash added to the end). After form submission this controls saves their
> state for changed names (with hash) and then are rendered to client with
> normal names(without hash). As they searches for erros by name they can not
> find any.
> I have my solution for such sittuations, to fix control names, make them
> static. I've described this here:
>
> http://mutabra.blogspot.com/2012/09/tapestry-fixed-control-name-fixin.html
>
> On Mon, Nov 19, 2012 at 6:37 PM, Muhammad Gelbana <m.gelb...@gmail.com
> >wrote:
>
> > I use <t:error> for each field.
> >
> > Here is some more enlightening investigation results, based on the fact
> > that the form's fields are changed using ajax, once the fields are
> updated,
> > the fields errors are shown only after the first submission and the same
> > happens every time the form field's are changed. So it has something to
> do
> > with binding the fields with the "validation tracker on the client side".
> >
> > In another words, on the second submission, the page is fully loaded so
> the
> > "client side validation tracker" is setup right and bound to the fields.
> > But when I update the form's fields using ajax, it's broken. I have a
> > feeling this could be wrong but its my very best guess so far.
> >
> > On Mon, Nov 19, 2012 at 5:33 PM, Ivan Khalopik <ikhalo...@gmail.com>
> > wrote:
> >
> > > Do you use <t:errors> component to show errors for whole form or just
> use
> > > separate <t:error> components to show errors for particular field?
> > >
> > > On Mon, Nov 19, 2012 at 6:28 PM, Muhammad Gelbana <m.gelb...@gmail.com
> > > >wrote:
> > >
> > > > When I first load my page, some form's fields are changed through
> ajax
> > > and
> > > > then I submit the form (Without ajax) with empty fields to force it
> > into
> > > > validation errors. But no errors are shown. If just submit the form
> > > again,
> > > > exactly as it was the last time, the errors are shown !
> > > >
> > > > That's how I inject my components
> > > > private static final int MULTIPLE_BRAS_LOOP_END = 20;
> > > >
> > > > >     @InjectComponent
> > > > >     private TextField dnsServerField, domainNameField;
> > > > >     @InjectComponent("testConfigurationForm")
> > > > >     private Form testForm;
> > > >
> > > >
> > > > I checked the form using .getHasErrors() and it returned true on both
> > > > submits. It's only that on the first submit, nothing is shown for the
> > > > client !
> > > >
> > > > I also forced the form into 2 different validation errors and only
> the
> > > > second submission's error was shown, so its not like showing
> validation
> > > > errors for previous submissions. Even more, this strange behavior
> stops
> > > > after the first submission, everything works as expected !
> > > >
> > >
> > >
> > >
> > > --
> > > BR
> > > Ivan
> > >
> >
>
>
>
> --
> BR
> Ivan
>

Reply via email to