Skip to content

Commit

Permalink
[dashboard] wicket-8.x build is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
solomax committed Jul 17, 2016
1 parent 8beb1ec commit b3ee763
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public HighChartsSettingsPanel(String id, IModel<HighChartsWidget> model) {
form.add(new AjaxSubmitLink("submit") {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
protected void onSubmit(AjaxRequestTarget target) {
getModelObject().getSettings().put(Settings.seriesType.name(), seriesType.name());
getModelObject().updateChart();

Expand All @@ -72,13 +72,15 @@ protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
HighChartsWidgetView widgetView = (HighChartsWidgetView) widgetPanel.getWidgetView();
target.add(widgetView);
}

@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
protected void onError(AjaxRequestTarget target) {
}
});

form.add(new AjaxLink<Void>("cancel") {
private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
hideSettingPanel(target);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public JqPlotSettingsPanel(String id, IModel<JqPlotWidget> model) {
private static final long serialVersionUID = 1L;

@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
protected void onSubmit(AjaxRequestTarget target) {
getModelObject().getSettings().put("chartType", chartType);
Dashboard dashboard = findParent(DashboardPanel.class).getDashboard();
dashboardContext.getDashboardPersister().save(dashboard);
Expand All @@ -67,7 +67,7 @@ protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
}

@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
protected void onError(AjaxRequestTarget target) {
}

});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public ChartSettingsPanel(String id, IModel<ChartWidget> model) {
private static final long serialVersionUID = 1L;

@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
protected void onSubmit(AjaxRequestTarget target) {
getModelObject().getSettings().put("chartType", chartType);
Dashboard dashboard = findParent(DashboardPanel.class).getDashboard();
dashboardContext.getDashboardPersister().save(dashboard);
Expand All @@ -67,7 +67,7 @@ protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
}

@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
protected void onError(AjaxRequestTarget target) {
}

});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
Expand Down Expand Up @@ -77,9 +78,9 @@ public String getJavaScript() {
flashUrl, id, width, height, version, "expressInstall.swf", parObj, attObj);

// see http://old.nabble.com/Re%3A-Graphs%2C-Charts-and-Wicket-p21987222.html
AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
if (target != null) {
target.appendJavaScript(javascript);
Optional<AjaxRequestTarget> target = RequestCycle.get().find(AjaxRequestTarget.class);
if (target.isPresent()) {
target.get().appendJavaScript(javascript);
}

return javascript;
Expand Down
4 changes: 2 additions & 2 deletions dashboard-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j.version>1.6.4</slf4j.version>
<log4j.version>1.2.16</log4j.version>
<slf4j.version>1.7.21</slf4j.version>
<log4j.version>1.2.17</log4j.version>
</properties>

<build>
Expand Down

0 comments on commit b3ee763

Please sign in to comment.