Search Listing Causes Length Message to be Displayed
sandman202 Apr 4, 2009 5:40 AMI have a search screen called uzerList.xhtml. There are 2 search paramaters on the screen: Company and Name. Upon entering the screen, the listing displays fine. If I click on the Search
button, the message:
length must be between 1 and 40
This is coming from my uzer entity where the name length must be between 1 and 40.
uzerList.xhtml
<ui:define name="body">
<h:form id="uzerSearch" styleClass="edit">
<rich:simpleTogglePanel label="User Search Parameters" switchType="ajax">
<s:decorate template="/layout/display.xhtml">
<ui:define name="label">Company</ui:define>
<h:inputText id="company" value="#{uzerList.uzer.company}"/>
</s:decorate>
<s:decorate template="/layout/display.xhtml">
<ui:define name="label">Name</ui:define>
<h:inputText id="name" value="#{uzerList.uzer.name}"/>
</s:decorate>
</rich:simpleTogglePanel>
<div class="actionButtons">
<h:commandButton id="search" value="Search" action="/role/admin/UzerList.xhtml"/>
</div>
</h:form>
<rich:panel>
<f:facet name="header">User Search Results</f:facet>
<ui:include src="/role/admin/UzerTable.xhtml">
<ui:param name="uzerFrom" value="/role/admin/UzerList"/>
</ui:include>
</rich:panel>
<s:div styleClass="actionButtons" rendered="#{empty from}">
<s:button view="/role/admin/UzerEdit.xhtml"
id="create"
value="Create User">
<f:param name="uzerId"/>
</s:button>
</s:div>
</ui:define>
Uzer.java
public class Uzer implements Serializable
{
...
private String company;
private String name;
...
@Length(max = 50)
@Column(name = FIELD_COMPANY)
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
@Length(min = 1, max = 40)
@Column(name = FIELD_NAME)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
...
}
What is causing this to happen?