ktlili 2005/10/12 11:01:53 CEST
Modified files:
core/src/conf/java ApplicationResources.properties
ApplicationResources_fr.properties
core/src/java/org/jahia/clipbuilder/html/struts
SelectPartForm.java
core/src/java/org/jahia/clipbuilder/sql/struts
EditQueryAction.java
core/src/webapp/jsp/clipbuilder/html/actions
selectPartAction.jsp
Log:
- add error message sqlcliBuilder bug: table size must be an integer
- fix display bug in htmlclipBuilder (Chew method)
Revision Changes Path
1.7 +1 -0 jahia/core/src/conf/java/ApplicationResources.properties
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/conf/java/ApplicationResources.properties.diff?r1=1.6&r2=1.7&f=h
1.3 +1 -0
jahia/core/src/conf/java/ApplicationResources_fr.properties
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/conf/java/ApplicationResources_fr.properties.diff?r1=1.2&r2=1.3&f=h
1.2 +45 -42
jahia/core/src/java/org/jahia/clipbuilder/html/struts/SelectPartForm.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/clipbuilder/html/struts/SelectPartForm.java.diff?r1=1.1&r2=1.2&f=h
1.6 +15 -0
jahia/core/src/java/org/jahia/clipbuilder/sql/struts/EditQueryAction.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/clipbuilder/sql/struts/EditQueryAction.java.diff?r1=1.5&r2=1.6&f=h
1.3 +2 -2
jahia/core/src/webapp/jsp/clipbuilder/html/actions/selectPartAction.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/clipbuilder/html/actions/selectPartAction.jsp.diff?r1=1.2&r2=1.3&f=h
Index: ApplicationResources.properties
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/conf/java/ApplicationResources.properties,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ApplicationResources.properties 11 Oct 2005 17:57:55 -0000 1.6
+++ ApplicationResources.properties 12 Oct 2005 09:01:52 -0000 1.7
@@ -337,5 +337,6 @@
sql.query.nbResultPerTable = Max number of rows per table
sql.messages.database.empty = there is no default configuration.
error.sql = Error: check values of parameters
+error.sql.Numberformat = Error: Table size value must be a positive integer.
Index: ApplicationResources_fr.properties
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/conf/java/ApplicationResources_fr.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ApplicationResources_fr.properties 11 Oct 2005 17:57:55 -0000
1.2
+++ ApplicationResources_fr.properties 12 Oct 2005 09:01:52 -0000
1.3
@@ -321,3 +321,4 @@
sql.query.nbResultPerTable = Nombre de ligne maximal par table
sql.messages.database.empty = Il n'y pas de valeur par défaut.
error.sql = Erreur: Vérifier la valeurs des différents paramètres.
+error.sql.Numberformat = Erreur: Le nombre de ligne maximal doit être un
entier positif.
Index: SelectPartForm.java
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/java/org/jahia/clipbuilder/html/struts/SelectPartForm.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SelectPartForm.java 19 Aug 2005 13:42:49 -0000 1.1
+++ SelectPartForm.java 12 Oct 2005 09:01:52 -0000 1.2
@@ -19,7 +19,7 @@
private String selectedContent;
private String webClippingTypeContent;
private String webClippingPartHashCode;
- private String webClippingTagName ;
+ private String webClippingTagName;
private String webClippingXPath = "//form";
private String webClippingShowCss;
private String webClippingShowJavascript;
@@ -42,7 +42,7 @@
[EMAIL PROTECTED] clippingMethod The new ClippingMethod value
*/
public void setClippingMethod(String clippingMethod) {
- this.clippingMethod= clippingMethod;
+ this.clippingMethod = clippingMethod;
}
@@ -108,6 +108,26 @@
/**
+ * Sets the WebClippingShowCss attribute of the SelectPartForm object
+ *
+ [EMAIL PROTECTED] value The new WebClippingShowCss value
+ */
+ public void setWebClippingShowCss(String value) {
+ this.webClippingShowCss = value;
+ }
+
+
+ /**
+ * Sets the WebClippingShowJavascript attribute of the SelectPartForm
object
+ *
+ [EMAIL PROTECTED] value The new WebClippingShowJavascript value
+ */
+ public void setWebClippingShowJavascript(String value) {
+ this.webClippingShowJavascript = value;
+ }
+
+
+ /**
* Gets the Id attribute of the SelectPartForm object
*
[EMAIL PROTECTED] The Id value
@@ -194,6 +214,9 @@
[EMAIL PROTECTED] The WebClippingTagName value
*/
public String getWebClippingTagName() {
+ if (webClippingTagName == null ||
webClippingTagName.equalsIgnoreCase("")) {
+ webClippingTagName = "table";
+ }
return webClippingTagName;
}
@@ -209,6 +232,26 @@
/**
+ * Gets the WebClippingShowCss attribute of the SelectPartForm object
+ *
+ [EMAIL PROTECTED] The WebClippingShowCss value
+ */
+ public String getWebClippingShowCss() {
+ return webClippingShowCss;
+ }
+
+
+ /**
+ * Gets the WebClippingShowJavascript attribute of the SelectPartForm
object
+ *
+ [EMAIL PROTECTED] The WebClippingShowJavascript value
+ */
+ public String getWebClippingShowJavascript() {
+ return webClippingShowJavascript;
+ }
+
+
+ /**
* Description of the Method
*
[EMAIL PROTECTED] actionMapping Description of Parameter
@@ -242,44 +285,4 @@
}
-
- /**
- * Sets the WebClippingShowCss attribute of the SelectPartForm object
- *
- [EMAIL PROTECTED] value The new WebClippingShowCss value
- */
- public void setWebClippingShowCss(String value) {
- this.webClippingShowCss = value;
- }
-
-
- /**
- * Sets the WebClippingShowJavascript attribute of the SelectPartForm
object
- *
- [EMAIL PROTECTED] value The new WebClippingShowJavascript value
- */
- public void setWebClippingShowJavascript(String value) {
- this.webClippingShowJavascript = value;
- }
-
-
- /**
- * Gets the WebClippingShowCss attribute of the SelectPartForm object
- *
- [EMAIL PROTECTED] The WebClippingShowCss value
- */
- public String getWebClippingShowCss() {
- return webClippingShowCss;
- }
-
-
- /**
- * Gets the WebClippingShowJavascript attribute of the SelectPartForm
object
- *
- [EMAIL PROTECTED] The WebClippingShowJavascript value
- */
- public String getWebClippingShowJavascript() {
- return webClippingShowJavascript;
- }
-
}
Index: EditQueryAction.java
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/java/org/jahia/clipbuilder/sql/struts/EditQueryAction.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- EditQueryAction.java 11 Oct 2005 17:57:55 -0000 1.5
+++ EditQueryAction.java 12 Oct 2005 09:01:53 -0000 1.6
@@ -111,6 +111,21 @@
String sql = form.getSqlQuery();
String tableSize = form.getTableSize();
+ //check table size value
+ try {
+ int tableSizeInt = Integer.parseInt(tableSize);
+ if (tableSizeInt < 1) {
+ throw new Exception("Table size not positive.");
+ }
+ }
+ catch (Exception ex) {
+ log.error("Table size error");
+ ActionMessages messages = new ActionMessages();
+ messages.add("error", new
ActionMessage("error.sql.Numberformat", ex.toString()));
+ saveMessages(request, messages);
+ return actionMapping.getInputForward();
+ }
+
String driverAndUrl[] = buildDriverAndUrl(database,
databaseName, databaseUrl);
//set properties
Index: selectPartAction.jsp
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/webapp/jsp/clipbuilder/html/actions/selectPartAction.jsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- selectPartAction.jsp 26 Aug 2005 16:17:53 -0000 1.2
+++ selectPartAction.jsp 12 Oct 2005 09:01:53 -0000 1.3
@@ -57,9 +57,9 @@
for (int i = 0; i < tags.length; i++) {
String name = tags[i].toString();
options = options + "\n" + "<option value=" + name;
- if (name.equalsIgnoreCase("table")) {
+ /*if (name.equalsIgnoreCase("table")) {
options = options + " selected=selected" + " ";
- }
+ }*/
options = options + " > " + name + "</option>";
}
%>