Hi,
On Mon, Dec 12, 2011 at 9:38 AM, Andreas Bohnert <[email protected]> wrote:
> Thanks Dragan for your quick response!
>
> I have tried 2. und 3. but I still get the random id for my form (I have
> bound the .submit() to an button pressed event, so I can not do 1.).
>
> I just wonder why your focus is on the zoneId (and not on the formId),
> because my zoneId do not change after the zone update.
>
Sorry I wrote the reply as I was just going out so didn't answer your
question exactly right.
If you don't want tapestry to change the id of the form just bind it to a
property expression like this.
Tml
<form t:type="Form" t:id="loginForm" id="${formId}" />
Java
public String getFormId(){
return "myformid";
}
and in the javascript also
$('${formId}').submit();
Also if you want tapestry to make the change and use the generated id. Than
leave the form id as is in you example and then just. In this case the form
should be rendered before the javascript so tapestry generated the id
already.
Java
@InjectComponent
private Form loginForm;
public String getFormId(){
return loginForm.getClient();
}
and in the javascript also
$('${formId}').submit();
Hope this answers it right.
Cheers,
Dragan Sahpaski
> regards,
> andreas
>