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.

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)
         {





--
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