Author: batosai
Date: 2008-08-11 01:34:29 +0000 (Mon, 11 Aug 2008)
New Revision: 21732
Modified:
trunk/apps/WoT/src/plugins/WoT/WoTplugin.java
Log:
Display nothing if no trust is set.
Modified: trunk/apps/WoT/src/plugins/WoT/WoTplugin.java
===================================================================
--- trunk/apps/WoT/src/plugins/WoT/WoTplugin.java 2008-08-11 01:31:41 UTC
(rev 21731)
+++ trunk/apps/WoT/src/plugins/WoT/WoTplugin.java 2008-08-11 01:34:29 UTC
(rev 21732)
@@ -260,12 +260,12 @@
row.addChild("td",
String.valueOf(id.getScore((OwnIdentity)treeOwner, db).getScore())+"
("+id.getScore((OwnIdentity)treeOwner, db).getRank()+")");
// Trust
- int trustValue = 0;
+ String trustValue = "";
String trustComment = "";
ObjectSet<Trust> trusts = db.queryByExample(new
Trust(treeOwner, id, 0, null));
if(trusts.hasNext()) {
Trust trust = trusts.next();
- trustValue = trust.getValue();
+ trustValue = String.valueOf(trust.getValue());
trustComment = trust.getComment();
}
@@ -273,7 +273,7 @@
HTMLNode trustForm = pr.addFormChild(cell, SELF_URI +
"/setTrust", "setTrustForm");
trustForm.addChild("input", new String[] { "type",
"name", "value" }, new String[] { "hidden", "truster",
treeOwner.getRequestURI().toString() });
trustForm.addChild("input", new String[] { "type",
"name", "value" }, new String[] { "hidden", "trustee",
id.getRequestURI().toString() });
- trustForm.addChild("input", new String[] { "type",
"name", "size", "value" }, new String[] { "text", "value", "2",
String.valueOf(trustValue) });
+ trustForm.addChild("input", new String[] { "type",
"name", "size", "value" }, new String[] { "text", "value", "2", trustValue });
trustForm.addChild("input", new String[] { "type",
"name", "size", "value" }, new String[] { "text", "comment", "20", trustComment
});
trustForm.addChild("input", new String[] { "type",
"name", "value" }, new String[] { "submit", "update", "Update !" });
}