Skip to Content.
Sympa Menu

perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r6254 - in trunk: parent perfsonar-java-web-admin/perfsonar-java -web-admin-component/src/main/java/org/perfsonar/webadmin/ config perfsonar-java-web-admin/perfsonar-java-web-admin-c omponent/src/main/java/org/perfsonar/webadmin/util

Subject: perfsonar development work

List archive

[pS-dev] [GEANT/SA2/ps-java-services] r6254 - in trunk: parent perfsonar-java-web-admin/perfsonar-java -web-admin-component/src/main/java/org/perfsonar/webadmin/ config perfsonar-java-web-admin/perfsonar-java-web-admin-c omponent/src/main/java/org/perfsonar/webadmin/util


Chronological Thread 
  • From:
  • To:
  • Subject: [pS-dev] [GEANT/SA2/ps-java-services] r6254 - in trunk: parent perfsonar-java-web-admin/perfsonar-java -web-admin-component/src/main/java/org/perfsonar/webadmin/ config perfsonar-java-web-admin/perfsonar-java-web-admin-c omponent/src/main/java/org/perfsonar/webadmin/util
  • Date: Mon, 22 Apr 2013 13:07:43 +0100 (BST)
  • Authentication-results: sfpop-ironport04.merit.edu; dkim=neutral (message not signed) header.i=none

Author: dante.delvaux
Date: 2013-04-22 13:07:43 +0100 (Mon, 22 Apr 2013)
New Revision: 6254

Modified:
trunk/parent/pom.xml

trunk/perfsonar-java-web-admin/perfsonar-java-web-admin-component/src/main/java/org/perfsonar/webadmin/config/HTMLGenerator.java

trunk/perfsonar-java-web-admin/perfsonar-java-web-admin-component/src/main/java/org/perfsonar/webadmin/util/HTMLUtil.java
Log:
WebAdmin: HTML code simplification and correcting fields alignment.

Modified: trunk/parent/pom.xml
===================================================================
--- trunk/parent/pom.xml 2013-04-19 20:05:54 UTC (rev 6253)
+++ trunk/parent/pom.xml 2013-04-22 12:07:43 UTC (rev 6254)
@@ -295,6 +295,8 @@
<execution>
<id>run-war</id>
<!-- We link this plugin to
some non default phase so that we can disable it in some modules. -->
+ <!-- You might need to
increase Maven allocated memory for this plugin to work properly. -->
+ <!-- MAVEN_OPTS="-Xmx1024m
-XX:MaxPermSize=512m" -->
<phase>integration-test</phase>
<goals>
<goal>run-war</goal>

Modified:
trunk/perfsonar-java-web-admin/perfsonar-java-web-admin-component/src/main/java/org/perfsonar/webadmin/config/HTMLGenerator.java
===================================================================
---
trunk/perfsonar-java-web-admin/perfsonar-java-web-admin-component/src/main/java/org/perfsonar/webadmin/config/HTMLGenerator.java
2013-04-19 20:05:54 UTC (rev 6253)
+++
trunk/perfsonar-java-web-admin/perfsonar-java-web-admin-component/src/main/java/org/perfsonar/webadmin/config/HTMLGenerator.java
2013-04-22 12:07:43 UTC (rev 6254)
@@ -258,7 +258,7 @@
}

/**
- * From here and all the sub types, the tranlate method doesn't
return a boolean.
+ * From here and all the sub types, the translate method doesn't
return a boolean.
* It just print a error message if something goes wrong, but
continue processing the objectMap
* @param p
*/
@@ -423,9 +423,9 @@
logger.trace("WA --- Drawing a password box : title: \"" +
title
+ "\" value: \"" + t.second() + "\"");
try {
- htmlUtil.singlerow_begin(5);
+// htmlUtil.singlerow_begin(5);
htmlUtil.passtextbox(t.first() + "", title,
t.second());
- htmlUtil.singlerow_end();
+// htmlUtil.singlerow_end();
} catch (Exception e) {
// FIXME: no point in outputing a stack trace
e.printStackTrace();
@@ -438,9 +438,9 @@
logger.trace("WA --- Drawing a box : title: \"" + title
+ "\" value : \"" + t.second() + "\"");
try {
- htmlUtil.singlerow_begin(5);
+// htmlUtil.singlerow_begin(5);
htmlUtil.textbox(t.first() + "", title, t.second());
- htmlUtil.singlerow_end();
+// htmlUtil.singlerow_end();
} catch (Exception e) {
// FIXME: no point in outputing a stack trace
e.printStackTrace();
@@ -452,9 +452,9 @@
logger.trace("WA --- Drawing a radio : title: \"" +
title.second() + "\"");
// for( String s : values.second() ) println("\nradio value :
" + s);
try {
- htmlUtil.singlerow_begin(5);
+// htmlUtil.singlerow_begin(5);
htmlUtil.radio(values.first() + "", title.second(),
values.second());
- htmlUtil.singlerow_end();
+// htmlUtil.singlerow_end();
} catch (Exception e) {
// FIXME: no point in outputing a stack trace
e.printStackTrace();
@@ -467,9 +467,9 @@
// for( String s : values.second() ) println("\ndrop-down
value : " +
// s);
try {
- htmlUtil.singlerow_begin(5);
+// htmlUtil.singlerow_begin(5);
htmlUtil.dropdown(values.first() + "",
title.second(), values.second());
- htmlUtil.singlerow_end();
+// htmlUtil.singlerow_end();
} catch (Exception e) {
// FIXME: no point in outputing a stack trace
e.printStackTrace();
@@ -482,11 +482,11 @@
boolean enabled = false;
// FIXME: Hardcoded values
try {
- htmlUtil.singlerow_begin(5);
+// htmlUtil.singlerow_begin(5);
htmlUtil.radiogroup_begin("key3", "Grouped box",
"yes", "no", enabled);
htmlUtil.println(innerHTML);
htmlUtil.radiogroup_end();
- htmlUtil.singlerow_end();
+// htmlUtil.singlerow_end();
} catch (Exception e) {
// FIXME: no point in outputing a stack trace
e.printStackTrace();

Modified:
trunk/perfsonar-java-web-admin/perfsonar-java-web-admin-component/src/main/java/org/perfsonar/webadmin/util/HTMLUtil.java
===================================================================
---
trunk/perfsonar-java-web-admin/perfsonar-java-web-admin-component/src/main/java/org/perfsonar/webadmin/util/HTMLUtil.java
2013-04-19 20:05:54 UTC (rev 6253)
+++
trunk/perfsonar-java-web-admin/perfsonar-java-web-admin-component/src/main/java/org/perfsonar/webadmin/util/HTMLUtil.java
2013-04-22 12:07:43 UTC (rev 6254)
@@ -7,7 +7,9 @@
* This is done in a StringBufffer for ease of use.
*/
public class HTMLUtil {
- private int colspan = 3;
+ // Size of all <INPUT> fields
+ private int inputSize = 75;
+ private int colspan = 1;
private StringBuffer sb;

public HTMLUtil(StringBuffer sb) {
@@ -230,10 +232,8 @@
public void radiogroup_begin(String id, String title, String yesval,
String noval, boolean enabled) throws IOException {
println(
- // att("align","center"),
tag("tr", tag("td", title)
- + // ,att("colspan",""+3)
- times(13)
+ + times(13)
+ tag("td", atag("input", att("type",
"hidden")
+ att("value", yesval) +
att("id", "Vl_" + id))
+ tag("input", att("type",
"radio") + att("name", id)
@@ -246,11 +246,7 @@
+ noval +
times(14)))));
println("<tr><td>" + "<div " + att("id", id)
+ att("class", "inner_properties")
- + (!enabled ? unblockedAttribute :
blockedAttribute) + " > ");// +
- // "<div "+
- // att("class","properties")
- // +
- // " >");
+ + (!enabled ? unblockedAttribute :
blockedAttribute) + " > ");
table_begin();
}

@@ -263,14 +259,12 @@
private void generictextbox(String type, String key, String title,
String val) throws IOException {

- final int size = 30;
println(tag("tr", tag("td", att("colspan", "" + colspan),
title)
+ tag("td", att("align", "left"),
atag("input", att("class",
"input_style")
+ att("type", type)
+ att("name", key)
- + att("size", "" + size) +
att("value", val))))
-
+ + att("size", "" + inputSize)
+ att("value", val))))
);
}

@@ -312,7 +306,6 @@
+ att("class", "properties")
+ " > "
+
- // "<center>" +
"<form action=\"" + url + "\"
method=\"POST\">\n"
+ "<input type=\"hidden\" name=\"" + key +
"\" value=\"" + val
+ "\">\n" + "<table align=\"center\" "
@@ -350,7 +343,6 @@
}

public void table_begin() {
- // println("<center><table align=\"center\">");
table_begin(10);
}

@@ -371,7 +363,6 @@
}

public void simplelineoftext(String text, String colour) { // +
- // att("colspan",""+span)
println("<tr><td " + " >\n"
+ tag("tr", tag("td", tag("p",
colouredtext(text, colour))))
+ "</td></tr>");



  • [pS-dev] [GEANT/SA2/ps-java-services] r6254 - in trunk: parent perfsonar-java-web-admin/perfsonar-java -web-admin-component/src/main/java/org/perfsonar/webadmin/ config perfsonar-java-web-admin/perfsonar-java-web-admin-c omponent/src/main/java/org/perfsonar/webadmin/util, svn-noreply, 04/22/2013

Archive powered by MHonArc 2.6.16.

Top of Page