You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jc...@apache.org on 2007/05/04 13:33:03 UTC
svn commit: r535181 - in
/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions:
ajax/markup/html/ ajax/markup/html/modal/ breadcrumb/
markup/html/form/palette/component/ markup/html/form/select/
markup/html/tree/ ...
Author: jcompagner
Date: Fri May 4 04:33:02 2007
New Revision: 535181
URL: http://svn.apache.org/viewvc?view=rev&rev=535181
Log:
reattach refactor
Modified:
incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java
incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbBar.java
incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java
incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOptions.java
incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/Tree.java
incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java
incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardStep.java
Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java?view=diff&rev=535181&r1=535180&r2=535181
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java Fri May 4 04:33:02 2007
@@ -322,11 +322,11 @@
}
/**
- * @see org.apache.wicket.Component#onAttach()
+ * @see org.apache.wicket.Component#onBeforeRender()
*/
- protected void onAttach()
+ protected void onBeforeRender()
{
- super.onAttach();
+ super.onBeforeRender();
// if tempModel - set on construction - is not-null, the label and
// editor components have not yet been set.
if (editor == null)
Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java?view=diff&rev=535181&r1=535180&r2=535181
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java Fri May 4 04:33:02 2007
@@ -722,11 +722,11 @@
}
/**
- * @see org.apache.wicket.Component#onAttach()
+ * @see org.apache.wicket.Component#onBeforeRender()
*/
- protected void onAttach()
+ protected void onBeforeRender()
{
- super.onAttach();
+ super.onBeforeRender();
getContent().setOutputMarkupId(true);
getContent().setVisible(shown);
}
Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbBar.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbBar.java?view=diff&rev=535181&r1=535180&r2=535181
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbBar.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbBar.java Fri May 4 04:33:02 2007
@@ -53,8 +53,6 @@
{
private static final long serialVersionUID = 1L;
- private transient boolean attachedButNotRendered = false;
-
private transient boolean dirty = false;
private transient int size;
@@ -108,26 +106,16 @@
}
/**
- * @see org.apache.wicket.markup.html.list.ListView#onAttach()
+ * @see org.apache.wicket.markup.html.list.ListView#onBeforeRender()
*/
- protected void onAttach()
+ protected void onBeforeRender()
{
- super.onAttach();
+ super.onBeforeRender();
if (dirty)
{
super.internalOnAttach();
this.dirty = false;
}
- attachedButNotRendered = true;
- }
-
- /**
- * @see org.apache.wicket.Component#onBeforeRender()
- */
- protected void onBeforeRender()
- {
- // it this point, we can't change the hierarchy anymore
- attachedButNotRendered = false;
}
/**
@@ -146,22 +134,11 @@
*/
private void signalModelChange()
{
- if (!attachedButNotRendered)
- {
- // if the list view was not yet attached, or
- // it has already been rendered, setting it dirty will suffice
- // it will have the effect that next time the list view
- // is processes, it will recalculate it's children
- this.dirty = true;
- }
- else
- {
- // else let the listview recalculate it's childs immediately;
- // it was attached, but it needs to go trhough that again now
- // as the signalling component attached after this
- getModel().detach();
- super.internalOnAttach();
- }
+ // else let the listview recalculate it's childs immediately;
+ // it was attached, but it needs to go trhough that again now
+ // as the signalling component attached after this
+ getModel().detach();
+ super.internalOnAttach();
}
}
Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java?view=diff&rev=535181&r1=535180&r2=535181
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java Fri May 4 04:33:02 2007
@@ -71,9 +71,9 @@
setOutputMarkupId(true);
}
- protected void onAttach()
+ protected void onBeforeRender()
{
- super.onAttach();
+ super.onBeforeRender();
if (!getForm().hasError())
{
Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOptions.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOptions.java?view=diff&rev=535181&r1=535180&r2=535181
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOptions.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOptions.java Fri May 4 04:33:02 2007
@@ -80,11 +80,11 @@
}
/**
- * @see org.apache.wicket.Component#onAttach()
+ * @see org.apache.wicket.Component#onBeforeRender()
*/
- protected void onAttach()
+ protected void onBeforeRender()
{
- super.onAttach();
+ super.onBeforeRender();
if (size() == 0 || recreateChoices)
{
Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/Tree.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/Tree.java?view=diff&rev=535181&r1=535180&r2=535181
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/Tree.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/Tree.java Fri May 4 04:33:02 2007
@@ -684,11 +684,11 @@
}
/**
- * @see org.apache.wicket.Component#onAttach()
+ * @see org.apache.wicket.Component#onBeforeRender()
*/
protected void onAttach()
{
- super.onAttach();
+ super.onBeforeRender();
// if we don't optimize, rebuild the paths on every request
if (!getOptimizeItemRemoval())
{
Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java?view=diff&rev=535181&r1=535180&r2=535181
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java Fri May 4 04:33:02 2007
@@ -73,11 +73,11 @@
}
/**
- * @see org.apache.wicket.Component#onAttach()
+ * @see org.apache.wicket.Component#onBeforeRender()
*/
protected final void onAttach()
{
- super.onAttach();
+ super.onBeforeRender();
// TODO after the constructor change we can do this in the constructor
// of either this class or the button form
getForm().setDefaultButton(this);
Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardStep.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardStep.java?view=diff&rev=535181&r1=535180&r2=535181
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardStep.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardStep.java Fri May 4 04:33:02 2007
@@ -457,11 +457,11 @@
/**
* Workaround for adding the form validators; not needed in 2.0.
*
- * @see org.apache.wicket.Component#onAttach()
+ * @see org.apache.wicket.Component#onBeforeRender()
*/
- protected void onAttach()
+ protected void onBeforeRender()
{
- super.onAttach();
+ super.onBeforeRender();
if (onAttachAction != null)
{
onAttachAction.execute();