This assumes we can rely on the order of methods that come from XJavadoc... is this true (please, someone that knows the inner workings of it let us know)? It should be a straightforward change to store the fields in an List rather than a TreeMap somehow.
Erik
On Thursday, January 2, 2003, at 05:42 PM, Derek Lin wrote:
Erik,
I would tend to think that this is a xdoclet issue, not a struts one.
In my java code, username comes before password:
/**
* @struts.validator type="futurecargorequired"
* @struts.validator-args arg0resource="username"
*/
public void setUsername(String username){
this.username = username;
}
public String getPassword(){
return password;
}
/**
* @struts.validator type="futurecargorequired"
* @struts.validator-args arg0resource="password"
*/
public void setPassword(String password){
this.password = password;
}
But in the generated validation.xml, password comes before username:
<form name="loginForm">
<field property="password"
depends="futurecargorequired">
<arg0
key="password"
/>
</field>
<field property="username"
depends="futurecargorequired">
<arg0
key="username"
/>
</field>
</form>
The problem is that when JavaScript validation happens, I will bring the
user back to the password input box first (I want it to go back the the
username input box)
Do you still think it might be a struts problem? I am using 1.1b2.
Thanks,
Derek
----- Original Message -----
From: "Erik Hatcher" <[EMAIL PROTECTED]>
To: "Derek Lin" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 2:38 AM
Subject: Re: [Xdoclet-user] strutsvalidationxml generates entries out of
order
Why is the order relevant? Is there something with Validator that
cares about order? Oh, maybe the validation occurs in that order?
What version of Struts are you using? I believe changes in the
ordering of validation has occurred recently.
The tag handler for the validation.xml generation is automatically
sorting the fields alphabetically, thats why, and without digging deep
into the code its not possible to fix. Before we change it, lets see
how the latest Struts versions (1.2b3+) deal with ordering to see if
its even still an issue.
Erik
On Thursday, January 2, 2003, at 01:07 AM, Derek Lin wrote:
strutsvalidationxmlstrutsvalidationxml doesn't generate my
validation.xml in the order I specify in my StrutsForm. For example, I
define two properties: username and password. I define username first,
then password. But strutsvalidationxmlstrutsvalidationxml generates
the password validation entry before password. How do I fix this?
Please help.
Thanks, Derek------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
