[Yanel-commits] rev 31619 -
public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Mon Feb 11 16:38:33 CET 2008
Author: michi
Date: 2008-02-11 16:38:32 +0100 (Mon, 11 Feb 2008)
New Revision: 31619
Modified:
public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java
Log:
password type implemented
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 2008-02-11 15:38:00 UTC (rev 31618)
+++ public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java 2008-02-11 15:38:32 UTC (rev 31619)
@@ -362,12 +362,21 @@
} else {
sb.append("Exception: Parameter doesn't seem to be a of type SELECT: " + propertyNames[i]);
}
+ } else if (propertyType != null && propertyType.equals(CreatableV2.TYPE_PASSWORD)) {
+ //sb.append("<input type=\"file\" name=\"rp." + propertyNames[i] + "\"/><br/>");
+ Object value = ((CreatableV2) resource).getProperty(propertyNames[i]);
+ if (value == null) {
+ sb.append("<input type=\"password\" name=\"rp." + propertyNames[i] + "\" value=\"\" size=\"60\"/><br/>");
+ } else {
+ sb.append("<input type=\"password\" name=\"rp." + propertyNames[i] + "\" value=\"" + value + "\" size=\"60\"/><br/>");
+ }
} else {
+ log.debug("Let's assume the property is of type text ...");
Object value = ((CreatableV2) resource).getProperty(propertyNames[i]);
if (value == null) {
- sb.append("<input name=\"rp." + propertyNames[i] + "\" value=\"\" size=\"60\"/><br/>");
+ sb.append("<input type=\"text\" name=\"rp." + propertyNames[i] + "\" value=\"\" size=\"60\"/><br/>");
} else {
- sb.append("<input name=\"rp." + propertyNames[i] + "\" value=\"" + value + "\" size=\"60\"/><br/>");
+ sb.append("<input type=\"text\" name=\"rp." + propertyNames[i] + "\" value=\"" + value + "\" size=\"60\"/><br/>");
}
}
sb.append("</td></tr>");
More information about the Yanel-commits
mailing list