The following comment has been added to this issue:
Author: Andrew Stevens
Created: Sat, 18 Dec 2004 4:50 AM
Body:
What version of XDoclet? The fact that your generated file contains "1.0" in
the DOCTYPE suggests it's <= 1.2.1; could you try with 1.2.2 and see if that
behaves the same?
Judging by the template (i.e. the "<XDtValidator:forAllForms>
<XDtValidator:ifFormHasFields>" immediately inside the <formset> element), the
formset should only be completely empty if a) it found no classes which extend
org.apache.struts.validator.ValidatorForm, b) the ones it did find were
abstract or generated by XDoclet, or c) there are no fields in the form classes
it finds. Since you don't appear to have a class-level @xdoclet-generated tag,
you do have some fields, and the class isn't abstract, that would rule out b) &
c). So it's most likely that it doesn't know your class is of the right type.
Was that the complete source for your TestForm.java? You have "extends
ValidatorForm", but I don't see any import statements - unless you import
org.apache.struts.validator.ValidatorForm (or use the fully qualified name in
the extends clause) then it's actually extending a ValidatorForm class in the
same package as TestForm itself rather than the Struts one...
---------------------------------------------------------------------
View this comment:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1176?page=comments#action_15460
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1176
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XDT-1176
Summary: Empty validation.xml file
Type: Bug
Status: Open
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: XDoclet
Components:
Apache Module
Assignee: xdoclet-devel (Use for new issues)
Reporter: Alok Pota
Created: Fri, 3 Dec 2004 1:30 PM
Updated: Sat, 18 Dec 2004 4:50 AM
Description:
I have the following ant task in mu build.xml
<webdoclet destdir="${project.build}/WEB-INF"
force="true"
mergedir="${project.java.conf}/struts/merge">
<fileset dir="${project.java.src}"> <include
name="**/*.java"/> </fileset>
<strutsconfigxml validatexml="true"
version="1.1"
mergedir="${project.java.conf}/struts/merge"
/>
<strutsvalidationxml />
</webdoclet>
The following Java code for the TestForm..
/**
* @struts.form name="testForm"
*/
public class TestForm extends ValidatorForm {
private String lastName = "Bond";
public String getLastName() {
return (this.lastName);
}
/**
* @struts.validator type= "required" msgkey="error.required"
arg0value="Last name"
*
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
Upon a build, I get the struts-config.xml file just fine. However
my validation.xml file is empty i.e. it looks like this..
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons
Validator Rules Configuration 1.0//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
<form-validation>
<!--
Define global validation config in validation-global.xml
-->
<formset>
</formset>
</form-validation>
There are no rules..
Whats going on?
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel