parentModel; 26 | 27 | public CascadingLoadableDetachableModel(IModel
parentModel) {
28 | super();
29 |
30 | this.parentModel = parentModel;
31 | }
32 |
33 | @Override
34 | public void detach() {
35 | super.detach();
36 |
37 | parentModel.detach();
38 | }
39 |
40 | public abstract M load(P parentObject);
41 |
42 | @Override
43 | protected M load() {
44 | return load(parentModel.getObject());
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/core/src/main/java/ro/fortsoft/wicket/dashboard/web/util/ConfirmAjaxCallListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 Decebal Suiu
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with
5 | * the License. You may obtain a copy of the License in the LICENSE file, or at:
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11 | * specific language governing permissions and limitations under the License.
12 | */
13 | package ro.fortsoft.wicket.dashboard.web.util;
14 |
15 | import org.apache.wicket.ajax.attributes.AjaxCallListener;
16 | import org.apache.wicket.core.util.string.JavaScriptUtils;
17 |
18 | /**
19 | * @author Decebal Suiu
20 | */
21 | public class ConfirmAjaxCallListener extends AjaxCallListener {
22 |
23 | private static final long serialVersionUID = 1L;
24 |
25 | public ConfirmAjaxCallListener(String confirmMessage) {
26 | CharSequence message = JavaScriptUtils.escapeQuotes(confirmMessage);
27 | StringBuilder precondition = new StringBuilder("if(!confirm('").append(message).append("')) { return false; };");
28 | onPrecondition(precondition);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/core/src/main/java/ro/fortsoft/wicket/dashboard/wicket-package.properties:
--------------------------------------------------------------------------------
1 | # widget collapse/expand
2 | collapse=Collapse
3 | expand=Expand
4 |
5 | # widget actions
6 | refresh=Refresh
7 | delete=Delete
8 | settings=Settings
9 |
10 | deleteAsk=Delete widget "${}"?
--------------------------------------------------------------------------------
/core/src/main/java/ro/fortsoft/wicket/dashboard/wicket-package_de.properties:
--------------------------------------------------------------------------------
1 | # widget collapse/expand
2 | collapse=Einklappen
3 | expand=Ausklappen
4 |
5 | # widget actions
6 | refresh=Neu laden
7 | delete=Löschen
8 | settings=Einstellungen
9 |
10 | deleteAsk=Widget "${}" löschen?
--------------------------------------------------------------------------------
/core/src/main/java/ro/fortsoft/wicket/dashboard/wicket-package_fr.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/decebals/wicket-dashboard/ece9250c8bcc8f4fe66b8ea3ba57fdb31561c805/core/src/main/java/ro/fortsoft/wicket/dashboard/wicket-package_fr.properties
--------------------------------------------------------------------------------
/core/src/main/java/ro/fortsoft/wicket/dashboard/wicket-package_ro.properties:
--------------------------------------------------------------------------------
1 | # widget collapse/expand
2 | collapse=Colapseaza
3 | expand=Extinde
4 |
5 | # widget actions
6 | refresh=Reincarca
7 | delete=Sterge
8 | settings=Proprietati
9 |
10 | deleteAsk=Sterge widget "${}"?
--------------------------------------------------------------------------------
/core/src/main/java/ro/fortsoft/wicket/dashboard/wicket-package_ru.properties:
--------------------------------------------------------------------------------
1 | # widget collapse/expand
2 | collapse=Свернуть
3 | expand=Развернуть
4 |
5 | # widget actions
6 | refresh=Обновить
7 | delete=Удалить
8 | settings=Настройки
9 |
10 | deleteAsk=Удалить виджет "${}"?
11 |
--------------------------------------------------------------------------------
/core/src/main/java/wicket.properties:
--------------------------------------------------------------------------------
1 | initializer=ro.fortsoft.wicket.dashboard.DashboardContextInitializer
--------------------------------------------------------------------------------
/demo/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |