[jboss-user] [JBoss Seam] - Re: Entity Convert

nusseis do-not-reply at jboss.com
Tue Sep 25 03:33:53 EDT 2007


Well, I'm back...

Ain't got problems with the selectOneMenu, but with the selectManyMenu and I don't know why. Hoping for help, so here's what I've got:

I've implemented the equals and hashCode Method in all of my entity beans
	@Override
  | 	public boolean equals(Object obj) {
  | 		if (!(obj instanceof Platform)) {
  | 			return false;
  | 		}
  | 		
  | 		Platform o = (Platform) obj;
  | 		return this.platform_id == o.getPlatform_id();
  | 	}
  | 
  | 	@Override
  | 	public int hashCode() {
  | 		int result = 17;
  | 		
  | 		result = 37 * result + this.platform_id;
  | 		
  | 		return result;
  | 	}

And that works fine with the selectOneMenu, no errors or warnings. Now I've got a selectManyMenu, that looks like this:

<h:selectManyMenu value="#{release.platform_id}" id="selectPlatformList" size="10">
  | 				<s:selectItems value="#{admin_release.ra_platformList}" var="p" label="#{p.platform_descr}" />
  | 				<s:convertEntity />
  | 			</h:selectManyMenu>

Now the question: Why do I get the "Value is not a valid option" message?

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

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



More information about the jboss-user mailing list