0
我的问题是,我在Struts2的action类像支柱标注问题
private String[] origfilenofrom;
@FieldExpressionValidator(fieldName="origfilenofrom",key="",message="File Length should be 12 for old file format and 15 for new file format",expression="checkorigFileFormat(origfilenofrom)")
注解现在我的方法是
public boolean checkorigFileFormat(String[] files)
{
for(int counter=0;counter<files.length;counter++)
{
int n=files[counter].length();
if(!(n==12 || n==15))
{
return false;
}
}
return true;
}
所以对于该字符串[]任意字符串,它返回错误的价值是假的。 无论该字符串[]中的3个字符串是否为true,如果其中一个为false,则会为所有字符显示注释消息。
我希望消息不要显示字符串为真的地方。
so none can answer this ...这是Struts 2设计框架的一个问题.. ....任何评论 – Gourav 2010-05-01 06:26:57