well i have understood the problem but cannot find solution for it.. well i
have
h:outputText in my JSF page as
<h:inputText id="username" value="#{customer.username}">
which is mapped to the Entity bean
Entity
@Name("customer")
@Scope(SESSION)
@Table(name="ERegCustomer")
@SequenceGenerator(name="CUSTOMER_SEQUENCE", sequenceName="EREGCUSTOMER_SEQ")
public class ERegCustomer implements Serializable
{
private static final long serialVersionUID = 1881413500711441953L;
private Integer id;
private String username;
private String password;
....
....
....
And my session bean as
public class ERegCustomerAction implements ERegCustomerLocal {
@In
private Context sessionContext;
@In(required=false)
@Out(required=false)
private ERegCustomer customer;
public String registerCustomer()
{
.......
.........
......... /// here customer.getUsername returns empty String not
null
when i submit the form with empty field, ........ customer.username have value.
i mean it is assigined to empty string ("") not to null so abviously @NotNull
anotation will not work. if this is the case then for what @NotNull is used for
and if i am right then what mistake i made
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994911#3994911
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994911
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user