You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by RachelS <re...@gmail.com> on 2007/10/22 10:25:43 UTC

[T4.1.3] Component and Form generated id's and form refresh

Hi

I have a component which has a form on it. This component is included in a
@For and is rendered on the page a number of times.

What I am finding is that the component's generated id's are
component
component_1
component_2 etc...

while the form's generated id is (i'm using jwcid="myform@Form")
myForm
myForm_0
myForm_1

Is there any way to force the component id's to be zero based the same way
that the form id's are?


Some background as to why I want this...

On this form there is are two property selections, country and city. And
when I click on country, I want the form to refresh and load up the relevant
cities. But what I find is that I have to pass in the form name to refresh
like this

onchange="tapestry.form.refresh('myForm', 'refresh');"

So the problem is that 'myForm' is the first copy of the form on the page,
whereas I might actually be manipulating another copy of the form and not
the first one.

Then I thought that I could do this 

onchange="ognl:'javascript:tapestry.form.refresh(\'form_'+clientId+'\',
\'refresh\');'"

where my form looks like this

<form jwcid="form_myForm@Form"

and the clientId is 'myForm'

which would work if the generated id's were either both zero or both 1
based. Which they don't seem to be.


So I guess, either I need a way to generate id's differently, or, I need a
way to call refresh on the 'this' form. 

Any advice would be greatly appreciated. (using T4.1.3)

Thanks,
Rachel

-- 
View this message in context: http://www.nabble.com/-T4.1.3--Component-and-Form-generated-id%27s-and-form-refresh-tf4669455.html#a13338795
Sent from the Tapestry - User mailing list archive at Nabble.com.


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