[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    [jboss-user] [JBoss Seam] - Re: How to use si:selectItems with an
From:       lawrieg <do-not-reply () jboss ! com>
Date:       2007-01-31 21:48:22
Message-ID: 20474512.1170280102375.JavaMail.jboss () colo-br-02 ! atl ! jboss ! com
[Download RAW message or body]

I stepped through the code and you are quite right that the first CampaignType object \
passed to BasicEntityConverter's getIdAsString method has null values in its fields.

If I modify the BasicEntityConverter code to not throw an exception, then I see that \
on the second and third calls to the getIdAsString method, the entity argument \
contains the CampaignType objects I would expect.

customerTypes.resultList is populated by a Seam Application Framework Entity-Query:

<framework:entity-query name="customerTypes" ejbql="select customerType from \
CustomerType customerType" />  | 

I've checked that my entity-query only returns two CustomerType objects which have \
non-null id values.

My si:selectItems tag is as follows:

<h:selectOneMenu value="#{customerHome.instance.customerType}" id="customerType">
  |   <si:selectItems value="#{customerTypes.resultList}" var="customerType" \
label="#{customerType.name}" noSelectionLabel="Please Select..." />  | \
</h:selectOneMenu>	

So now I'm more than a bit confused as to how a CustomerType with a null id value is \
being passed to BasicEntityConverter's getIdAsString method.

Does the object from the <h:selectOneMenu> value property get passed to the \
BasicEntityConverter??? The reason I ask is because I'm creating a new Customer and \
therefore #{customerHome.instance.customerType} would initially contain a new \
instance of CustomerType. If so, how do you work around this?

Any help would be very much appreciated as I'm starting to tear my hair out...

Cheers,

Lawrie

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009047
 _______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic