syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1613363 - in /syncope/trunk: ./ console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
Date Fri, 25 Jul 2014 08:20:35 GMT
Author: ilgrosso
Date: Fri Jul 25 08:20:35 2014
New Revision: 1613363

URL: http://svn.apache.org/r1613363
Log:
Merge from 1_2_X

Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_2_X:r1613081-1613362

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java?rev=1613363&r1=1613362&r2=1613363&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
Fri Jul 25 08:20:35 2014
@@ -293,7 +293,6 @@ public class ConnectorModalPage extends 
                     private static final long serialVersionUID = 9101744072914090143L;
 
                     @Override
-                    @SuppressWarnings({ "unchecked", "rawtypes" })
                     protected void populateItem(final ListItem<ConnConfProperty> item)
{
                         final ConnConfProperty property = item.getModelObject();
 
@@ -303,6 +302,7 @@ public class ConnectorModalPage extends 
                                 : property.getSchema().getDisplayName());
                         item.add(label);
 
+                        @SuppressWarnings("rawtypes")
                         final FieldPanel field;
                         boolean required = false;
                         boolean isArray = false;
@@ -331,8 +331,10 @@ public class ConnectorModalPage extends 
                                 propertySchemaClass = String.class;
                             }
                             if (ClassUtils.isAssignable(Number.class, propertySchemaClass))
{
+                                @SuppressWarnings("unchecked")
+                                final Class<Number> numberClass = (Class<Number>)
propertySchemaClass;
                                 field = new SpinnerFieldPanel<Number>("panel", label.getDefaultModelObjectAsString(),
-                                        (Class<Number>) propertySchemaClass, new Model<Number>(),
null, null);
+                                        numberClass, new Model<Number>(), null, null);
 
                                 required = property.getSchema().isRequired();
                             } else if (ClassUtils.isAssignable(Boolean.class, propertySchemaClass))
{
@@ -361,10 +363,12 @@ public class ConnectorModalPage extends 
                                 property.getValues().add(null);
                             }
 
-                            item.add(new MultiFieldPanel<String>(
-                                            "panel", new PropertyModel<List<String>>(property,
"values"), field));
+                            @SuppressWarnings("unchecked")
+                            final MultiFieldPanel<String> multiFieldPanel = new MultiFieldPanel<String>(
+                                    "panel", new PropertyModel<List<String>>(property,
"values"), field);
+                            item.add(multiFieldPanel);
                         } else {
-                            field.setNewModel(property.getValues());
+                            setNewFieldModel(field, property.getValues());
                             item.add(field);
                         }
 
@@ -488,6 +492,11 @@ public class ConnectorModalPage extends 
         connectorForm.add(cancel);
     }
 
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    private void setNewFieldModel(final FieldPanel field, final List<Object> values)
{
+        field.setNewModel(values);
+    }
+
     private ConnBundleTO getSelectedBundleTO(final ConnInstanceTO connInstanceTO) {
         ConnBundleTO result = null;
         if (connInstanceTO != null



Mime
View raw message