You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2009/01/13 00:33:32 UTC
svn commit: r733968 - in /tapestry/tapestry5/trunk/tapestry-core/src/main:
java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java
resources/org/apache/tapestry5/corelib/components/AjaxFormLoop.tml
Author: hlship
Date: Mon Jan 12 15:33:32 2009
New Revision: 733968
URL: http://svn.apache.org/viewvc?rev=733968&view=rev
Log:
TAP5-435: AjaxFormLoop does not include a parameter for specifying the animation on adding a new element
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/AjaxFormLoop.tml
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java?rev=733968&r1=733967&r2=733968&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java Mon Jan 12 15:33:32 2009
@@ -1,4 +1,4 @@
-// Copyright 2008 The Apache Software Foundation
+// Copyright 2008, 2009 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -63,6 +63,13 @@
@Parameter(required = true)
private Object value;
+ /**
+ * Name of a function on the client-side Tapestry.ElementEffect object that is invoked to make added content
+ * visible. This is used with the {@link FormInjector} component, when adding a new row to the loop. Leaving as
+ * null uses the default function, "highlight".
+ */
+ @Parameter(defaultPrefix = BindingConstants.LITERAL)
+ private String show;
/**
* The context for the form loop (optional parameter). This list of values will be converted into strings and
@@ -265,7 +272,7 @@
}
};
- @SuppressWarnings({"unchecked"})
+ @SuppressWarnings({ "unchecked" })
@Log
private void syncValue(Serializable id)
{
@@ -300,7 +307,7 @@
/**
* Uses the {@link org.apache.tapestry5.PrimaryKeyEncoder} to convert the current row value to an id.
*/
- @SuppressWarnings({"unchecked"})
+ @SuppressWarnings({ "unchecked" })
private Serializable idForCurrentValue()
{
return encoder.toKey(value);
@@ -419,7 +426,7 @@
Object value = encoder.toValue(coerced);
- resources.triggerEvent(EventConstants.REMOVE_ROW, new Object[] {value}, null);
+ resources.triggerEvent(EventConstants.REMOVE_ROW, new Object[] { value }, null);
return new JSONObject();
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/AjaxFormLoop.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/AjaxFormLoop.tml?rev=733968&r1=733967&r2=733968&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/AjaxFormLoop.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/AjaxFormLoop.tml Mon Jan 12 15:33:32 2009
@@ -5,7 +5,7 @@
</t:formfragment>
<t:block id="tail">
- <t:forminjector element="prop:element" t:id="rowInjector" context="inherit:context">
+ <t:forminjector element="prop:element" t:id="rowInjector" show="inherit:show" context="inherit:context">
<t:delegate to="prop:addRow"/>
<t:block id="defaultAddRow">
<t:addrowlink>Add row</t:addrowlink>