Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git://github.com/wicketstuff/core

Conflicts:
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid-examples/src/main/java/com/inmethod/grid/examples/WicketApplication.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid-examples/src/main/java/com/inmethod/grid/examples/contact/Contact.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/IDataSource.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/PropertyColumn.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/editable/EditableCellPanel.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/AbstractGrid.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/AttachPrelightBehavior.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/ColumnsHeaderRepeater.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/ColumnsState.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/GridSortState.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/toolbar/paging/NavigatorLabel.java
	jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/treegrid/TreePanel.java
  • Loading branch information...
commit 1fc5bb7204ccac8487c0bf5196be13f1bb01771d 2 parents db68867 + 9e01bd0
=Tom B authored
Showing with 40 additions and 90 deletions.
  1. +3 −13 ...inmethod-grid-parent/inmethod-grid-examples/src/main/java/com/inmethod/grid/examples/WicketApplication.java
  2. +1 −1  ...t/inmethod-grid-parent/inmethod-grid-examples/src/main/java/com/inmethod/grid/examples/contact/Contact.java
  3. +1 −1  jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/IDataSource.java
  4. +0 −14 jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/CheckBoxColumn.java
  5. +1 −1  jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/PropertyColumn.java
  6. +1 −1  ...t/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/editable/EditableCellPanel.java
  7. +23 −41 jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/AbstractGrid.java
  8. +3 −3 jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/ColumnsState.java
  9. +0 −2  jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/GridSortState.java
  10. +0 −8 ...rent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/SortableHeaderLinkPanel.java
  11. +1 −0  ...arent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/toolbar/paging/NavigatorLabel.java
  12. +6 −5 jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/treegrid/TreePanel.java
View
16 ...ethod-grid-parent/inmethod-grid-examples/src/main/java/com/inmethod/grid/examples/WicketApplication.java
@@ -1,24 +1,14 @@
package com.inmethod.grid.examples;
import org.apache.wicket.Page;
+import org.apache.wicket.core.request.mapper.MountedMapper;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Response;
-import org.apache.wicket.request.mapper.MountedMapper;
-import com.inmethod.grid.examples.pages.datagrid.DataGridColumnPropertiesPage;
-import com.inmethod.grid.examples.pages.datagrid.DataGridSelectionPage;
-import com.inmethod.grid.examples.pages.datagrid.DataGridWithUnknownItemCount;
-import com.inmethod.grid.examples.pages.datagrid.EditableDataGridPage;
-import com.inmethod.grid.examples.pages.datagrid.EditableDataGridWithSelectionPage;
-import com.inmethod.grid.examples.pages.datagrid.SimpleDataGridPage;
-import com.inmethod.grid.examples.pages.datagrid.VerticalScrollingDataGridPage;
-import com.inmethod.grid.examples.pages.treegrid.EditableTreeGridPage;
-import com.inmethod.grid.examples.pages.treegrid.SimpleTreeGridPage;
-import com.inmethod.grid.examples.pages.treegrid.TreeGridColumnPropertiesPage;
-import com.inmethod.grid.examples.pages.treegrid.TreeGridSelectionPage;
-import com.inmethod.grid.examples.pages.treegrid.VerticalScrollingTreeGridPage;
+import com.inmethod.grid.examples.pages.datagrid.*;
+import com.inmethod.grid.examples.pages.treegrid.*;
/**
*
View
2  ...nmethod-grid-parent/inmethod-grid-examples/src/main/java/com/inmethod/grid/examples/contact/Contact.java
@@ -16,7 +16,7 @@
*/
package com.inmethod.grid.examples.contact;
-import org.apache.wicket.IClusterable;
+import org.apache.wicket.util.io.IClusterable;
/**
* domain object for demonstrations.
View
2  jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/IDataSource.java
@@ -101,7 +101,7 @@
/**
* Returns the amount of items to be loaded. If the total amount is known (it was either set
- * by {@link IQueryResult#setTotalCount(int)} before calling this method or the previous
+ * by {@link IQueryResult#setTotalCount(long)} before calling this method or the previous
* call to {@link IDataSource#query(IDataSource.IQuery, IDataSource.IQueryResult)} set
* {@link IQueryResult#NO_MORE_ITEMS} as total count), this method will return the exact
* amount of required rows. If the total amount of rows is not known, it will always return
View
14 ...1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/CheckBoxColumn.java
@@ -2,8 +2,6 @@
import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.IAjaxCallDecorator;
-import org.apache.wicket.ajax.calldecorator.CancelEventIfNoAjaxDecorator;
import org.apache.wicket.ajax.form.AjaxFormSubmitBehavior;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebMarkupContainer;
@@ -191,12 +189,6 @@ protected CharSequence getPreconditionScript()
return "window.setTimeout(function(){this.checked=!this.checked}.bind(this),0);" +
super.getPreconditionScript();
}
-
- @Override
- protected IAjaxCallDecorator getAjaxCallDecorator()
- {
- return new CancelEventIfNoAjaxDecorator();
- }
});
}
@@ -348,12 +340,6 @@ protected CharSequence getPreconditionScript()
return "window.setTimeout(function(){this.checked=!this.checked}.bind(this),0);" +
super.getPreconditionScript();
}
-
- @Override
- protected IAjaxCallDecorator getAjaxCallDecorator()
- {
- return new CancelEventIfNoAjaxDecorator();
- }
});
}
View
2  ...1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/PropertyColumn.java
@@ -45,7 +45,7 @@
* column is being sorted
*/
public PropertyColumn(String columnId, IModel<String> headerModel, String propertyExpression,
- String sortProperty)
+ String sortProperty)
{
super(columnId, headerModel, sortProperty);
this.propertyExpression = propertyExpression;
View
2  ...nmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/editable/EditableCellPanel.java
@@ -56,7 +56,7 @@ protected boolean isFocusTextField()
}
}
- protected IModel<I> getDefaultRowModel()
+ protected IModel<I> getDefaultRowModel()
{
return (IModel<I>)getDefaultModel();
}
View
64 jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/AbstractGrid.java
@@ -9,9 +9,8 @@
import org.apache.wicket.MetaDataKey;
import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.IAjaxCallDecorator;
+import org.apache.wicket.ajax.attributes.AjaxCallListener;
import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
-import org.apache.wicket.ajax.calldecorator.AjaxCallDecorator;
import org.apache.wicket.ajax.form.AjaxFormSubmitBehavior;
import org.apache.wicket.behavior.Behavior;
import org.apache.wicket.markup.ComponentTag;
@@ -237,8 +236,8 @@ protected void respond(AjaxRequestTarget target)
onColumnStateChanged();
}
-
- @Override
+
+ @Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
@@ -344,7 +343,7 @@ boolean isRendering()
*/
private void addToolbar(AbstractToolbar<M, I> toolbar, RepeatingView container)
{
- Args.notNull(container, "toolbar");
+ Args.notNull(toolbar, "toolbar");
// create a container item for the toolbar (required by repeating view)
WebMarkupContainer item = new WebMarkupContainer(container.newChildId());
@@ -507,9 +506,9 @@ private String getInitializationJavascript()
sb.append("];\n");
// method that calls the proper listener when column state is changed
- sb.append("var submitStateCallback = function(columnState) { ");
+ sb.append("var submitStateCallback = ");
sb.append(submitColumnStateBehavior.getCallbackScript());
- sb.append(" }\n");
+ sb.append("\n");
// initialization
sb.append("InMethod.XTableManager.instance.register(\"" + getMarkupId() +
@@ -792,16 +791,16 @@ protected void onEvent(AjaxRequestTarget target)
{ // preserve the entered values in form components
Form<?> form = super.getForm();
form.visitFormComponentsPostOrder(new IVisitor<FormComponent<?>, Void>()
- {
- public void component(FormComponent<?> formComponent,
- IVisit<Void> visit)
- {
- if (formComponent.isVisibleInHierarchy())
- {
- formComponent.inputChanged();
- }
- }
- });
+ {
+
+ public void component(FormComponent<?> formComponent, IVisit<Void> visit)
+ {
+ if (formComponent.isVisibleInHierarchy())
+ {
+ formComponent.inputChanged();
+ }
+ }
+ });
String column = getRequest().getRequestParameters()
.getParameterValue("column").toString();
@@ -825,8 +824,8 @@ public void component(FormComponent<?> formComponent,
onRowClicked(target, model);
}
-
- @Override
+
+ @Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
@@ -834,34 +833,17 @@ protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
CharSequence columnParameter = "return {'column': Wicket.$(attrs.c).imxtClickedColumn}";
attributes.getDynamicExtraParameters().add(columnParameter);
- CharSequence precon = "return InMethod.XTable.canSelectRow(attrs.event);";
- JavaScriptPrecondition precondition = new JavaScriptPrecondition(precon);
- attributes.getPreconditions().add(precondition);
+ CharSequence precondition = "return InMethod.XTable.canSelectRow(attrs.event);";
+ AjaxCallListener ajaxCallListener = new AjaxCallListener();
+ ajaxCallListener.onPrecondition(precondition);
+ attributes.getAjaxCallListeners().add(ajaxCallListener);
}
@Override
- public CharSequence getCallbackUrl()
+ public CharSequence getCallbackScript()
{
return getCallbackFunction("col");
}
-
- @Override
- protected IAjaxCallDecorator getAjaxCallDecorator()
- {
- return new AjaxCallDecorator()
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public CharSequence decorateScript(Component c, CharSequence script)
- {
- return super.decorateScript(c,
- "if (InMethod.XTable.canSelectRow(event)) { " +
- "var col=(this.imxtClickedColumn || ''); this.imxtClickedColumn='';" +
- script + " }");
- }
- };
- }
});
}
View
6 jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/ColumnsState.java
@@ -89,8 +89,8 @@ public void setVisible(boolean visible)
public String getColumnId()
{
return columnId;
- };
- };
+ }
+ }
private final Entry[] stateArray;
@@ -109,7 +109,7 @@ public String getColumnId()
stateArray[i] = new Entry(column.getId());
++i;
}
- };
+ }
/**
* Creates new {@link ColumnsState} instance. The instance will be initialized from the
View
2  jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/GridSortState.java
@@ -26,7 +26,6 @@
*/
private static class SortStateColumn implements ISortStateColumn, IClusterable
{
-
private static final long serialVersionUID = 1L;
private final String propertyName;
@@ -54,7 +53,6 @@ public String getPropertyName()
{
return direction;
}
-
}
private final List<ISortStateColumn> columns = new ArrayList<ISortStateColumn>();
View
8 ...t/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/common/SortableHeaderLinkPanel.java
@@ -2,8 +2,6 @@
import org.apache.wicket.ajax.AjaxEventBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.IAjaxCallDecorator;
-import org.apache.wicket.ajax.calldecorator.CancelEventIfNoAjaxDecorator;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.panel.Panel;
@@ -59,12 +57,6 @@ protected void onEvent(AjaxRequestTarget target)
sortStateChanged(target);
}
-
- @Override
- protected IAjaxCallDecorator getAjaxCallDecorator()
- {
- return new CancelEventIfNoAjaxDecorator();
- }
});
}
View
1  ...nt/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/toolbar/paging/NavigatorLabel.java
@@ -57,6 +57,7 @@
implements IClusterable
{
private static final long serialVersionUID = 1L;
+
private final DataGrid<D, T> table;
/**
View
11 jdk-1.6-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/treegrid/TreePanel.java
@@ -180,7 +180,7 @@ public void afterRender(Component component)
}
private static final IconBorder INSTANCE = new IconBorder();
- };
+ }
/**
* Class that wraps a link (or span) with a junction table cells.
@@ -228,12 +228,12 @@ public void beforeRender(Component component)
response.write("<td class=\"imxt-spacer\">");
}
- };
+ }
private TreeGridBody<T, I> getTreeGridBody()
{
return findParent(TreeGridBody.class);
- };
+ }
/**
* Creates the junction link for given node. Also (optionally) creates the junction image. If
@@ -272,6 +272,7 @@ public void onClick(AjaxRequestTarget target)
getTreeGridBody().updateTree(target);
}
});
+
junctionLink.add(new Behavior()
{
private static final long serialVersionUID = 1L;
@@ -359,8 +360,8 @@ protected void onError(AjaxRequestTarget target, Form<?> form)
}
/**
- * Callback function called after user clicked on an junction link. The node has already been
- * expanded/collapsed (depending on previous status).
+ * Callback function called after user clicked on an junction link.
+ * The node has already been expanded/collapsed (depending on previous status).
*
* @param target
* Request target - may be null on non-ajax call
Please sign in to comment.
Something went wrong with that request. Please try again.