Yeah, the only problem with that is forms are rewound "directly", so other
forms
won't even be around at the time of rewind.

No solution? Of course there is, somewhere.. ;) We don't really have a
choice I think, seeing
as how no one else is going to do it for us. I could always pull out my
128bit uuid stuff from
old jini days past, but that seems a little brute force for something like
this.

On 11/5/06, andyhot <[EMAIL PROTECTED]> wrote:

Jesse Kuhnert wrote:
> I think I have a solution in the works to solve this "once and for
> all"..Spent the majority of the day hacking around with things and
> finally
> "get it" from an overarching perspective.
>
> Your namespacing of the form idea is a good one, but I don't think it
> will
> be completely reliable either if a few forms are involved in a page
> that sometimes render and sometimes don't.

Well, the idea was that we'd go on and call renderIdAttribute on all those
forms even if they're not to be rendered.
Also thought of using the page-level allocator (instead of the one
provided by FormSupport)
but it actually fails worse for similar reasons.

Anyway, i'm eager to see your solution...

Hope you can prove me wrong cause I currently think that there's no
clean, transparent and global solution to this.
I feel there's always gonna be a sub-sub-sub-case that will fail.
But perhaps this is not that bad... at least if users are aware of what
is happening (and how to deal with it).



>
> I don't know when I'll be done with the changes but hopefully it'll be
> today
> / tomorrow- ish.
>
> On 11/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> Author: andyhot
>> Date: Sun Nov  5 07:54:57 2006
>> New Revision: 471451
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=471451
>> Log:
>> namespace the id of each form element with the id of the current
form...
>> resovles TAPESTRY-1131
>>
>> Modified:
>>
>>
>>
tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/Form.java
>>
>>
>>
>>
tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java
>>
>>
>> Modified:
>>
tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/Form.java
>>
>> URL:
>>
http://svn.apache.org/viewvc/tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/Form.java?view=diff&rev=471451&r1=471450&r2=471451
>>
>>
>>
==============================================================================
>>
>> ---
>>
tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/Form.java
>>
>> (original)
>> +++
>>
tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/Form.java
>>
>> Sun Nov  5 07:54:57 2006
>> @@ -193,6 +193,9 @@
>>
>>          if (isRewinding())
>>          {
>> +            // even if we're rewinding, make sure we 'train' the
>> idallocator.
>> +            renderIdAttribute(writer, cycle);
>> +
>>              String submitType = _formSupport.rewind();
>>
>>              IActionListener listener = findListener(submitType);
>>
>> Modified:
>>
tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java
>>
>> URL:
>>
http://svn.apache.org/viewvc/tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java?view=diff&rev=471451&r1=471450&r2=471451
>>
>>
>>
==============================================================================
>>
>> ---
>>
tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java
>>
>> (original)
>> +++
>>
tapestry/tapestry4/branches/4.1.1-clientIds/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportImpl.java
>>
>> Sun Nov  5 07:54:57 2006
>> @@ -393,7 +393,7 @@
>>
>>          String filteredId = TapestryUtils.convertTapestryIdToNMToken
>> (baseId);
>>
>> -        String result = _elementIdAllocator.allocateId(filteredId);
>> +        String result = _elementIdAllocator.allocateId(filteredId +
>> "_" +
>> _form.getClientId());
>>
>>          if (_rewinding)
>>          {
>>
>>
>>
>
>


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to