Search in sources :

Example 1 with JsonDiffPanel

use of org.apache.syncope.client.console.wicket.markup.html.form.JsonDiffPanel in project syncope by apache.

the class HistoryConfDetails method showConfigurationDiffPanel.

private void showConfigurationDiffPanel(final List<T> historyConfTOs) {
    List<Pair<String, String>> infos = new ArrayList<>();
    historyConfTOs.forEach(historyConfTO -> {
        infos.add(getJSONInfo(historyConfTO));
    });
    jsonPanel = new JsonDiffPanel(null, new PropertyModel<String>(infos.get(0), "value"), new PropertyModel<String>(infos.get(1), "value"), null) {

        private static final long serialVersionUID = -8927036362466990179L;

        @Override
        public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
            modal.close(target);
        }
    };
    replace(jsonPanel);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ArrayList(java.util.ArrayList) CompoundPropertyModel(org.apache.wicket.model.CompoundPropertyModel) PropertyModel(org.apache.wicket.model.PropertyModel) JsonDiffPanel(org.apache.syncope.client.console.wicket.markup.html.form.JsonDiffPanel) Pair(org.apache.commons.lang3.tuple.Pair)

Aggregations

ArrayList (java.util.ArrayList)1 Pair (org.apache.commons.lang3.tuple.Pair)1 JsonDiffPanel (org.apache.syncope.client.console.wicket.markup.html.form.JsonDiffPanel)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 CompoundPropertyModel (org.apache.wicket.model.CompoundPropertyModel)1 PropertyModel (org.apache.wicket.model.PropertyModel)1