[Yanel-commits] rev 21976 - public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Sun Jan 21 23:13:13 CET 2007


Author: michi
Date: 2007-01-21 23:13:12 +0100 (Sun, 21 Jan 2007)
New Revision: 21976

Modified:
   public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java
Log:
check on property type

Modified: public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java	2007-01-21 22:12:25 UTC (rev 21975)
+++ public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java	2007-01-21 22:13:12 UTC (rev 21976)
@@ -200,10 +200,16 @@
                     if (propertyNames != null && propertyNames.length > 0) {
                         sb.append("<p>Resource specific properties:</p>");
                         for (int i = 0; i < propertyNames.length; i++) {
-                            sb.append(propertyNames[i] + ": <input name=\"rp." + propertyNames[i]
+                            sb.append(propertyNames[i] + ": ");
+                            String propertyType = ((CreatableV2) resource).getPropertyType(propertyNames[i]);
+                            if (propertyType != null && propertyType.equals(CreatableV2.TYPE_UPLOAD)) {
+                                sb.append("<input type=\"file\" name=\"rp."+propertyNames[i]+"\"/>");
+                            } else {
+                            sb.append("<input name=\"rp." + propertyNames[i]
                                 + "\" value=\""
                                 + ((CreatableV2) resource).getProperty(propertyNames[i])
                                 + "\" size=\"60\"/><br/>");
+                            }
                         }
                     } else {
                         sb.append("<p>No resource specific properties!</p>");




More information about the Yanel-commits mailing list