You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2008/06/08 22:36:30 UTC
svn commit: r664551 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java
Author: hlship
Date: Sun Jun 8 13:36:29 2008
New Revision: 664551
URL: http://svn.apache.org/viewvc?rev=664551&view=rev
Log:
TAPESTRY-2360: Forms in zones in loops have wrong zone id after update
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java?rev=664551&r1=664550&r2=664551&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java Sun Jun 8 13:36:29 2008
@@ -32,7 +32,6 @@
* Often, Zone's are initially invisible, in which case the visible parameter may be set to false (it defaults to
* false).
* <p/>
- * <p/>
* When a user clicks an {@link org.apache.tapestry5.corelib.components.ActionLink} whose zone parameter is set, the
* corresponding client-side Tapestry.Zone object is located. It will update the content of the Zone's <div> and
* then invoke either a show method (if the div is not visible) or an update method (if the div is visible). The show
@@ -58,6 +57,11 @@
@Parameter(defaultPrefix = BindingConstants.LITERAL)
private String update;
+ /**
+ * If bound, then the id attribute of the rendered element will be this exact value. If not bound, then a unique id
+ * is generated for the element.
+ */
+ @Parameter(name = "id", defaultPrefix = BindingConstants.LITERAL)
private String clientId;
@Environmental
@@ -78,7 +82,8 @@
void beginRender(MarkupWriter writer)
{
- clientId = renderSupport.allocateClientId(resources);
+ if (!resources.isBound("id"))
+ clientId = renderSupport.allocateClientId(resources);
Element e = writer.element("div", "id", clientId);