Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[inmethod-grid] Update to upstream - JavaScriptPrecondition is removed

  • Loading branch information...
commit 1e652b1ae7b74ad22683fa95ad70a723d4e603b6 1 parent 61e0f9e
Martin Grigorov martin-g authored
23 jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/AbstractGrid.java
@@ -6,13 +6,19 @@
6 6
7 7 import javax.swing.tree.TreeModel;
8 8
  9 +import com.inmethod.grid.IGridColumn;
  10 +import com.inmethod.grid.IGridSortState;
  11 +import com.inmethod.grid.SizeUnit;
  12 +import com.inmethod.grid.datagrid.DataGrid;
  13 +import com.inmethod.grid.toolbar.AbstractHeaderToolbar;
  14 +import com.inmethod.grid.toolbar.AbstractToolbar;
  15 +import com.inmethod.grid.treegrid.TreeGrid;
9 16 import org.apache.wicket.Component;
10 17 import org.apache.wicket.MetaDataKey;
11 18 import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior;
12 19 import org.apache.wicket.ajax.AjaxRequestTarget;
13 20 import org.apache.wicket.ajax.attributes.AjaxCallListener;
14 21 import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
15   -import org.apache.wicket.ajax.attributes.JavaScriptPrecondition;
16 22 import org.apache.wicket.ajax.form.AjaxFormSubmitBehavior;
17 23 import org.apache.wicket.behavior.Behavior;
18 24 import org.apache.wicket.markup.ComponentTag;
@@ -36,14 +42,6 @@
36 42 import org.apache.wicket.util.visit.IVisit;
37 43 import org.apache.wicket.util.visit.IVisitor;
38 44
39   -import com.inmethod.grid.IGridColumn;
40   -import com.inmethod.grid.IGridSortState;
41   -import com.inmethod.grid.SizeUnit;
42   -import com.inmethod.grid.datagrid.DataGrid;
43   -import com.inmethod.grid.toolbar.AbstractHeaderToolbar;
44   -import com.inmethod.grid.toolbar.AbstractToolbar;
45   -import com.inmethod.grid.treegrid.TreeGrid;
46   -
47 45 /**
48 46 * Provides common functionality for {@link DataGrid} and {@link TreeGrid}.
49 47 *
@@ -836,9 +834,10 @@ protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
836 834 CharSequence columnParameter = "return {'column': Wicket.$(attrs.c).imxtClickedColumn}";
837 835 attributes.getDynamicExtraParameters().add(columnParameter);
838 836
839   - CharSequence precon = "return InMethod.XTable.canSelectRow(attrs.event);";
840   - JavaScriptPrecondition precondition = new JavaScriptPrecondition(precon);
841   - attributes.getPreconditions().add(precondition);
  837 + CharSequence precondition = "return InMethod.XTable.canSelectRow(attrs.event);";
  838 + AjaxCallListener ajaxCallListener = new AjaxCallListener();
  839 + ajaxCallListener.onPrecondition(precondition);
  840 + attributes.getAjaxCallListeners().add(ajaxCallListener);
842 841 }
843 842
844 843 @Override

0 comments on commit 1e652b1

Please sign in to comment.
Something went wrong with that request. Please try again.