Author: ivaynberg
Date: Tue Oct 20 16:19:50 2009
New Revision: 827722
URL: http://svn.apache.org/viewvc?rev=827722&view=rev
Log:
missing commit for wicket-ng migration preparation
Modified:
wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java
wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LinkPage.java
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/BasePage.java
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxLazyLoadPanel.java
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbLink.java
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/panel/BreadCrumbPanel.java
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/OrderByLink.java
Modified:
wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java?rev=827722&r1=827721&r2=827722&view=diff
==============================================================================
---
wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java
(original)
+++
wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java
Tue Oct 20 16:19:50 2009
@@ -59,7 +59,6 @@
import org.apache.wicket.util.convert.MaskConverter;
import org.apache.wicket.validation.validator.MinimumValidator;
import org.apache.wicket.validation.validator.RangeValidator;
-import org.apache.wicket.version.undo.Change;
/**
*/
@@ -362,15 +361,7 @@
public void onClick()
{
i++;
- addStateChange(new Change()
- {
- private static final long
serialVersionUID = 1L;
-
- @Override
- public void undo()
- {
- }
- });
+ addStateChange();
}
});
Modified:
wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java?rev=827722&r1=827721&r2=827722&view=diff
==============================================================================
---
wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
(original)
+++
wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
Tue Oct 20 16:19:50 2009
@@ -104,7 +104,7 @@
Page page = (Page)entry;
page.detachModels();
size = page.getSizeInBytes();
- versions = page.getVersions();
+ versions = 0; // WICKET-NG
}
else
{
Modified:
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java?rev=827722&r1=827721&r2=827722&view=diff
==============================================================================
---
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java
(original)
+++
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java
Tue Oct 20 16:19:50 2009
@@ -420,7 +420,7 @@
@Override
public void onClick(AjaxRequestTarget target)
{
- setResponsePage(getPage().rollbackPage(1));
+ setResponsePage(getPage());
}
});
// add the add container for the todo items.
Modified:
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LinkPage.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LinkPage.java?rev=827722&r1=827721&r2=827722&view=diff
==============================================================================
---
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LinkPage.java
(original)
+++
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LinkPage.java
Tue Oct 20 16:19:50 2009
@@ -23,7 +23,6 @@
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.version.undo.Change;
/**
@@ -79,15 +78,7 @@
{
final int count = count1.clicks;
count2.clicks++;
- addStateChange(new Change()
- {
- @Override
- public void undo()
- {
- // revert
- count2.clicks = count;
- }
- });
+ addStateChange();
}
};
add(linkWithStateChange);
Modified:
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/BasePage.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/BasePage.java?rev=827722&r1=827721&r2=827722&view=diff
==============================================================================
---
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/BasePage.java
(original)
+++
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/BasePage.java
Tue Oct 20 16:19:50 2009
@@ -22,7 +22,6 @@
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.version.undo.Change;
/**
* Base page for component demo pages.
@@ -97,17 +96,7 @@
*/
public void setSelected(Contact selected)
{
- addStateChange(new Change()
- {
- private final Contact old = BasePage.this.selected;
-
- @Override
- public void undo()
- {
- BasePage.this.selected = old;
-
- }
- });
+ addStateChange();
this.selected = selected;
}
}
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxLazyLoadPanel.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxLazyLoadPanel.java?rev=827722&r1=827721&r2=827722&view=diff
==============================================================================
---
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxLazyLoadPanel.java
(original)
+++
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxLazyLoadPanel.java
Tue Oct 20 16:19:50 2009
@@ -24,7 +24,6 @@
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.version.undo.Change;
/**
* A panel where you can lazy load another panel. This can be used if you have
a panel/component
@@ -117,10 +116,6 @@
*/
private void setState(byte state)
{
- if (this.state != state)
- {
- addStateChange(new StateChange(this.state));
- }
this.state = state;
}
@@ -144,32 +139,4 @@
RequestCycle.get().urlFor(AbstractDefaultAjaxBehavior.INDICATOR) +
"\"/>").setEscapeModelStrings(false);
}
- /**
- *
- */
- private final class StateChange extends Change
- {
- private static final long serialVersionUID = 1L;
-
- private final byte state;
-
- /**
- * Construct.
- *
- * @param state
- */
- public StateChange(byte state)
- {
- this.state = state;
- }
-
- /**
- * @see org.apache.wicket.version.undo.Change#undo()
- */
- @Override
- public void undo()
- {
- AjaxLazyLoadPanel.this.state = state;
- }
- }
}
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbLink.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbLink.java?rev=827722&r1=827721&r2=827722&view=diff
==============================================================================
---
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbLink.java
(original)
+++
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/BreadCrumbLink.java
Tue Oct 20 16:19:50 2009
@@ -18,15 +18,13 @@
import org.apache.wicket.extensions.breadcrumb.panel.BreadCrumbPanel;
import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.version.undo.Change;
/**
- * A link that when clicked will set the the active
- * {...@link IBreadCrumbParticipant bread crumb participant} to the one that
is returned by
- * {...@link #getParticipant(String)}. It is used internally by
- * {...@link BreadCrumbBar the the bread crumb bar component}, and you can use
it for rendering links
- * e.g. with {...@link BreadCrumbPanel bread crumb panel components}.
+ * A link that when clicked will set the the active {...@link
IBreadCrumbParticipant bread crumb
+ * participant} to the one that is returned by {...@link
#getParticipant(String)}. It is used
+ * internally by {...@link BreadCrumbBar the the bread crumb bar component},
and you can use it for
+ * rendering links e.g. with {...@link BreadCrumbPanel bread crumb panel
components}.
*
* <p>
* When clicked, it registers a change for backbutton support.
@@ -66,23 +64,14 @@
if (active == null)
{
throw new IllegalStateException("The model has no
active bread crumb. Before using " +
- this + ", you have to have at least one
bread crumb in the model");
+ this + ", you have to have at least one bread
crumb in the model");
}
// get the participant to set as active
final IBreadCrumbParticipant participant =
getParticipant(active.getComponent().getId());
// add back button support
- addStateChange(new Change()
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void undo()
- {
- breadCrumbModel.setActive(active);
- }
- });
+ addStateChange();
// set the next participant as the active one
breadCrumbModel.setActive(participant);
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/panel/BreadCrumbPanel.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/panel/BreadCrumbPanel.java?rev=827722&r1=827721&r2=827722&view=diff
==============================================================================
---
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/panel/BreadCrumbPanel.java
(original)
+++
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/breadcrumb/panel/BreadCrumbPanel.java
Tue Oct 20 16:19:50 2009
@@ -22,18 +22,17 @@
import org.apache.wicket.extensions.breadcrumb.IBreadCrumbParticipant;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.version.undo.Change;
/**
- * A panel that participates with a {...@link IBreadCrumbModel bread crumb
model}. The idea is that
- * you would have a dialog-like component that is much like a wizard, but more
decoupled. A typical
+ * A panel that participates with a {...@link IBreadCrumbModel bread crumb
model}. The idea is that you
+ * would have a dialog-like component that is much like a wizard, but more
decoupled. A typical
* setup is that you have a panel, where the content is dynamic but
hierarchical in nature, and that
* there are links on the panel that <i>take you deeper into the hierarchy<i>
*
* <p>
- * An example of using {...@link BreadCrumbPanel bread crumb panels} and
- * {...@link BreadCrumbLink bread crumb links}:
+ * An example of using {...@link BreadCrumbPanel bread crumb panels} and
{...@link BreadCrumbLink bread
+ * crumb links}:
*
* <pre>
* add(new BreadCrumbLink("myLink", breadCrumbModel)
@@ -117,9 +116,9 @@
/**
* Activates the provided participant, which typically has the effect
of replacing this current
- * panel with the one provided - as the participant typically would be a
- * {...@link BreadCrumbPanel bread crumb panel} - and updating the
bread crumb model of this panel,
- * pushing the bread crumb for the given participant on top.
+ * panel with the one provided - as the participant typically would be
a {...@link BreadCrumbPanel
+ * bread crumb panel} - and updating the bread crumb model of this
panel, pushing the bread
+ * crumb for the given participant on top.
*
* @param participant
* The participant to set as the active one
@@ -135,16 +134,7 @@
}
// add back button support
- addStateChange(new Change()
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void undo()
- {
- breadCrumbModel.setActive(active);
- }
- });
+ addStateChange();
// set the bread crumb panel as the active one
breadCrumbModel.setActive(participant);
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/OrderByLink.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/OrderByLink.java?rev=827722&r1=827721&r2=827722&view=diff
==============================================================================
---
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/OrderByLink.java
(original)
+++
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/OrderByLink.java
Tue Oct 20 16:19:50 2009
@@ -21,8 +21,6 @@
import org.apache.wicket.IClusterable;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.Model;
-import org.apache.wicket.util.lang.Objects;
-import org.apache.wicket.version.undo.Change;
/**
* A component that represents a sort header. When the link is clicked it will
toggle the state of a
@@ -125,8 +123,7 @@
if (isVersioned())
{
// version the old state
- Change change = new SortStateChange();
- addStateChange(change);
+ addStateChange();
}
ISortState state = stateLocator.getSortState();
@@ -145,31 +142,6 @@
return this;
}
- private final class SortStateChange extends Change
- {
- private static final long serialVersionUID = 1L;
-
- private final ISortState old =
(ISortState)Objects.cloneModel(stateLocator.getSortState());
-
- /**
- * @see org.apache.wicket.version.undo.Change#undo()
- */
- @Override
- public void undo()
- {
- stateLocator.setSortState(old);
- }
-
- /**
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString()
- {
- return "[StateOrderChange old=" + old.toString() + "]";
- }
- }
-
/**
* Uses the specified ICssProvider to add css class attributes to the
link.