I have 3 small patches to the current tacos source, I will be very
happy if it's merged to the trunk.
This allows to have custom class for the table. As in contrib:table
Index: src/java/net/sf/tacos/ajax/components/table/Table.html
===================================================================
--- src/java/net/sf/tacos/ajax/components/table/Table.html (revision 336)
+++ src/java/net/sf/tacos/ajax/components/table/Table.html (working copy)
@@ -8,7 +8,7 @@
<table>
<tr>
<td>
- <table jwcid="tableElement" class="data">
+ <table jwcid="tableElement">
<tr><span jwcid="tableColumns"/></tr>
<tr jwcid="tableRows"><td jwcid="tableValues"/></tr>
</table>
This is for working number validation :
Index: src/java/net/sf/tacos/form/validator/RealNumberValidator.java
===================================================================
--- src/java/net/sf/tacos/form/validator/RealNumberValidator.java
(revision 336)
+++ src/java/net/sf/tacos/form/validator/RealNumberValidator.java
(working copy)
@@ -20,6 +20,8 @@
******************************************************************************/
package net.sf.tacos.form.validator;
+import java.math.BigDecimal;
+
import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.TapestryUtils;
@@ -60,8 +62,17 @@
public void validate(IFormComponent field, ValidationMessages
messages, Object object)
throws ValidatorException
{
- Number value = (Number) object;
- //if it's already a number, it's valid right?
+ if (object instanceof Number)
+ return;
+
+ if (object instanceof String) {
+ String s = (String) object;
+ try {
+ new BigDecimal(s.trim());
+ } catch (NumberFormatException nfe) {
+ throw new ValidatorException(buildMessage(messages, field));
+ }
+ }
}
/**
And the third one is for the error when the build fails after the
initial checkout:
Index: build.xml
===================================================================
--- build.xml (revision 336)
+++ build.xml (working copy)
@@ -189,14 +189,14 @@
</testng>
</target>
- <taskdef resource="tasks.properties">
+<!-- <taskdef resource="tasks.properties">
<classpath>
<fileset dir="lib" includes="cobertura*.jar" />
<fileset dir="lib" includes="log4j*.jar" />
<fileset dir="lib" includes="asm*.jar" />
<fileset dir="lib" includes="oro*.jar" />
</classpath>
- </taskdef>
+ </taskdef> -->
<!-- Coverage tasks -->
BR
Zsombor
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel