This content has been marked as final.
Show 3 replies
-
1. Re: Why null values are stored on calling persist method
rmuruga Oct 24, 2008 12:40 PM (in response to swathis)Please Post your XHTML file
-
2. Re: Why null values are stored on calling persist method
swathis Oct 24, 2008 12:53 PM (in response to swathis)xhtml file is too lengthy to post
-
3. Re: Why null values are stored on calling persist method
swathis Oct 24, 2008 2:08 PM (in response to swathis)I have changed the code even its storing null values....
I need help please....package com.manam.mewe.agile.pms.customer; import java.io.Serializable; import org.apache.commons.beanutils.BeanUtils; import org.jboss.seam.annotations.Begin; import org.jboss.seam.annotations.In; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.web.RequestParameter; import org.jboss.seam.framework.EntityHome; import org.jboss.seam.security.Identity; import com.manam.mewe.agile.pms.data.DoCustomer; import com.manam.mewe.agile.pms.entity.ccr.Customer; @Name("customerHome") public class CustomerHome extends EntityHome<Customer> implements Serializable{ @RequestParameter String customercustId; @In Identity identity; private static final long serialVersionUID = 7256951482186187096L; @In(create=true) DoCustomer doCustomer; @Override @Begin(join=true) public void create() { super.create(); try{ BeanUtils.copyProperties(doCustomer, getInstance()); }catch(Exception ee){ ee.printStackTrace(); } } public String persist(){ try{ BeanUtils.copyProperties(getInstance(), doCustomer); }catch(Exception f){ f.printStackTrace(); } super.persist(); return "done"; } @Override public Object getId() { if (customercustId == null) { return super.getId(); } else { return customercustId; } } }