but that event handler wont work correctly once zone updates it to
MyForm_123bashas

(at least it doesnt work for me :))


On Wed, Jan 1, 2014 at 9:42 PM, Kristian Marinkovic <
kristian.marinko...@gmail.com> wrote:

> in tapestry your server side event handlers are not related to the client
> side html ids. the client side html ids happen to use the server side
> component id for convenience. An onValidateFromMyForm() handler will we
> triggered even if the MyForm form is nested and updated in a zone.
>
>
>
>
>
> On Tue, Dec 31, 2013 at 7:15 PM, Boris Horvat <horvat.z.bo...@gmail.com
> >wrote:
>
> > I have tried to create a method that will set the id every time, however
> > this has filed with an exception refusing to set the id vie a method.
> >
> > I am a bit surprised that there is no way to catch form submission once
> > zone is refreshed. I understand that id is changed but it would be nice
> if
> > I could catch this change.
> >
> > Than,
> >
> > I am not sure I understand your idea. If I have a form with id *formID
> *my
> > method in java side will wait for that, if zone is updated then the new
> > form will be *formID_1233123 *how can I catch this event then? The
> > javascript you wrote $("form[id^=form]") - would help me to catch this on
> > client side not on server
> >
> > Cheers and happy new year :D
> >
> >
> > On Tue, Dec 31, 2013 at 4:06 PM, Boris Horvat <horvat.z.bo...@gmail.com
> > >wrote:
> >
> > > Well I did used this before, and it worked fine... Also I believe that
> I
> > > have read somewhere that I can use a property and pass it to the id
> field
> > > and in this way to fix the form id. I will try that to see if it works
> > >
> > > tnx
> > >
> > >
> > > On Tue, Dec 31, 2013 at 5:28 AM, Thai Tran <bubu...@gmail.com> wrote:
> > >
> > >> No, you misunderstood my answer. You need to keep the same id which is
> > >> generated by tapestry in order to let tapestry processes underneath
> its
> > >> hood. If you want to use javascript to handle the DOM elements, you
> > need to
> > >> use wildcard, regular expression to select the tapestry generated ID
> > >>
> > >>
> > >> On 12/30/2013 9:14 PM, Boris Horvat wrote:
> > >>
> > >>> Yea that was my idea, to use javascript code to modify the id in
> order
> > >>> for
> > >>> the java side to be able to process the correct form, however this
> > seems
> > >>> like ugly solution :)
> > >>>
> > >>>
> > >>> On Mon, Dec 30, 2013 at 3:10 AM, Thai Tran <bubu...@gmail.com>
> wrote:
> > >>>
> > >>>  It is better to use class for CSS stuffs and $("form[id^=form]")
> > (select
> > >>>> the form with the id started with "form") for javascript stuffs.
> > >>>> Tapestry
> > >>>> creates a new id not only on the client side but also keep track the
> > >>>> new id
> > >>>> underneath the hood (for security purpose, I guess)
> > >>>>
> > >>>>
> > >>>> On 12/30/2013 4:02 AM, Boris Horvat wrote:
> > >>>>
> > >>>>  Hi everyone,
> > >>>>>
> > >>>>> I have a zone around my form (pseudo code below)
> > >>>>>
> > >>>>> <t:zone t:id="zone" id="zone">
> > >>>>>    <t:form t:id="form" id="form" t:zone="^">
> > >>>>>      // some fields
> > >>>>>    </t:form:>
> > >>>>> </t:zone>
> > >>>>>
> > >>>>> After the zone is submitted the value is saved, the zone is
> refreshed
> > >>>>> and
> > >>>>> my form is broken.
> > >>>>> I believe that I could write a javascript code that will capture
> this
> > >>>>> event
> > >>>>> and override the id back to the original, but is there any better
> way
> > >>>>> to
> > >>>>> resolve this?
> > >>>>>
> > >>>>> Cheers
> > >>>>>
> > >>>>>
> > >>>>>
> >  ---------------------------------------------------------------------
> > >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >>>> For additional commands, e-mail: users-h...@tapestry.apache.org
> > >>>>
> > >>>>
> > >>>>
> > >>>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > Sincerely
> > > *Boris Horvat*
> > >
> >
> >
> >
> > --
> > Sincerely
> > *Boris Horvat*
> >
>



-- 
Sincerely
*Boris Horvat*

Reply via email to