You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by kn...@apache.org on 2007/03/07 22:22:28 UTC
svn commit: r515773 -
/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/Form.java
Author: knopp
Date: Wed Mar 7 13:22:27 2007
New Revision: 515773
URL: http://svn.apache.org/viewvc?view=rev&rev=515773
Log:
Added check for rootForm in onComponentTagBody
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/Form.java
Modified: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/Form.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/Form.java?view=diff&rev=515773&r1=515772&r2=515773
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/Form.java (original)
+++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/Form.java Wed Mar 7 13:22:27 2007
@@ -778,21 +778,23 @@
*/
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
{
- // get the hidden field id
- String nameAndId = getHiddenFieldId();
-
-
- // render the hidden field
- AppendingStringBuffer buffer = new AppendingStringBuffer(
- "<div style=\"display:none\"><input type=\"hidden\" name=\"").append(nameAndId)
- .append("\" id=\"").append(nameAndId).append("\" /></div>");
- getResponse().write(buffer);
-
- // if a default button was set, handle the rendering of that
- if (defaultButton != null && defaultButton.isVisibleInHierarchy()
- && defaultButton.isEnabled())
+ if (isRootForm())
{
- appendDefaultButtonField(markupStream, openTag);
+ // get the hidden field id
+ String nameAndId = getHiddenFieldId();
+
+ // render the hidden field
+ AppendingStringBuffer buffer = new AppendingStringBuffer(
+ "<div style=\"display:none\"><input type=\"hidden\" name=\"").append(nameAndId)
+ .append("\" id=\"").append(nameAndId).append("\" /></div>");
+ getResponse().write(buffer);
+
+ // if a default button was set, handle the rendering of that
+ if (defaultButton != null && defaultButton.isVisibleInHierarchy()
+ && defaultButton.isEnabled())
+ {
+ appendDefaultButtonField(markupStream, openTag);
+ }
}
// do the rest of the processing