You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/11/19 06:41:05 UTC

[isis] branch master updated: ISIS-2882: remove CharacterConverterWkt, as we can now use a generic one

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 02c2b64  ISIS-2882: remove CharacterConverterWkt, as we can now use a generic one
02c2b64 is described below

commit 02c2b643117931834ba0b19cb853e8411b6c941a
Author: andi-huber <ah...@apache.org>
AuthorDate: Fri Nov 19 07:39:59 2021 +0100

    ISIS-2882: remove CharacterConverterWkt, as we can now use a
    generic one
---
 .../model/converter/CharacterConverterWkt.java     | 37 ----------------------
 .../scalars/primitive/CharacterPanel.java          | 18 ++---------
 2 files changed, 2 insertions(+), 53 deletions(-)

diff --git a/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/converter/CharacterConverterWkt.java b/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/converter/CharacterConverterWkt.java
deleted file mode 100644
index 12332da..0000000
--- a/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/converter/CharacterConverterWkt.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.wicket.model.converter;
-
-import org.apache.isis.core.metamodel.commons.ScalarRepresentation;
-import org.apache.isis.core.metamodel.spec.feature.ObjectFeature;
-
-import lombok.NonNull;
-
-public class CharacterConverterWkt
-extends ConverterBasedOnValueSemantics<Character> {
-
-    private static final long serialVersionUID = 1L;
-
-    public CharacterConverterWkt(
-            final @NonNull ObjectFeature objFeature,
-            final @NonNull ScalarRepresentation scalarRepresentation) {
-        super(objFeature, scalarRepresentation);
-    }
-
-}
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanel.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanel.java
index 7ef728e..fe3a9df 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanel.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanel.java
@@ -18,21 +18,14 @@
  */
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
-import org.apache.wicket.util.convert.IConverter;
-
-import org.apache.isis.core.metamodel.commons.ScalarRepresentation;
-import org.apache.isis.core.metamodel.spec.feature.ObjectFeature;
-import org.apache.isis.viewer.wicket.model.converter.CharacterConverterWkt;
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
-import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldAbstract;
-
-import lombok.NonNull;
+import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldWithValueSemanticsAbstract;
 
 /**
  * Panel for rendering scalars of type {@link Character} or <tt>char</tt>.
  */
 public class CharacterPanel
-extends ScalarPanelTextFieldAbstract<Character> {
+extends ScalarPanelTextFieldWithValueSemanticsAbstract<Character> {
 
     private static final long serialVersionUID = 1L;
 
@@ -40,11 +33,4 @@ extends ScalarPanelTextFieldAbstract<Character> {
         super(id, scalarModel, Character.class);
     }
 
-    @Override
-    protected IConverter<Character> getConverter(
-            final @NonNull ObjectFeature propOrParam,
-            final @NonNull ScalarRepresentation scalarRepresentation) {
-        return new CharacterConverterWkt(propOrParam, scalarRepresentation);
-    }
-
 }