[jboss-user] [JBoss Seam] - Re: value of selectItems not posted in the form?

idylle do-not-reply at jboss.com
Thu Jun 21 06:08:47 EDT 2007


Here are my beans :

The entity bean (just the attributes) :

  | @Entity
  | @Table(name = "collectivites", schema = "public")
  | public class Collectivites implements java.io.Serializable {
  | 
  | 	private int colidt;
  | 	private Typcol typcol;
  | 	private Departements departements;
  | 	private String colnom;
  | 	private String coltel;
  | 	private String colfax;
  | 	private String coladr;
  | 	private String colcp;
  | 	private String colnmc;
  | 	private String coltlc;
  | 	private Integer colpop;
  | 	private String colaff;
  | 	private String colvil;
  | 
  | 	public Collectivites() {
  | 	}
  | 
  |  + getter and setter
  | 	...
  | 

The query bean : 

  | @Name("collectivitesList")
  | public class CollectivitesList extends EntityQuery {
  | 
  | 		
  | 	private static final String[] RESTRICTIONS = {
  | 			"lower(collectivites.colnom) like concat('%',lower(#{collectivitesList.collectivites.colnom}),'%')",
  | 			"lower(collectivites.coltel) like concat(lower(#{collectivitesList.collectivites.coltel}),'%')",
  | 			"lower(collectivites.colfax) like concat(lower(#{collectivitesList.collectivites.colfax}),'%')",
  | 			"lower(collectivites.coladr) like concat(lower(#{collectivitesList.collectivites.coladr}),'%')",
  | 			"lower(collectivites.colcp) like concat(lower(#{collectivitesList.collectivites.colcp}),'%')",
  | 			"lower(collectivites.colnmc) like concat(lower(#{collectivitesList.collectivites.colnmc}),'%')",
  | 			"lower(collectivites.coltlc) like concat(lower(#{collectivitesList.collectivites.coltlc}),'%')",
  | 			"lower(collectivites.colvil) like concat('%',lower(#{collectivitesList.collectivites.colvil}),'%')",
  | 			"collectivites.colaff like concat(#{collectivitesList.collectivites.colaff},'%')",
  | 			"collectivites.typcol like concat(#{collectivitesList.collectivites.typcol},'%')",};
  | 
  | 	private Collectivites collectivites = new Collectivites();
  | 
  | 	@Override
  | 	public String getEjbql() {
  | 		return "select collectivites from Collectivites collectivites";
  | 	}
  | 
  | 	@Override
  | 	public Integer getMaxResults() {
  | 		return 25;
  | 	}
  | 
  | 	public Collectivites getCollectivites() {
  | 		return collectivites;
  | 	}
  | 
  | 	@Override
  | 	public List<String> getRestrictions() {
  | 		return Arrays.asList(RESTRICTIONS);
  | 	}
  | 
  | }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056372#4056372

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056372



More information about the jboss-user mailing list