cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnson" <john...@soho.club.tw>
Subject Re: a one2many binding with hibernate
Date Sun, 20 Mar 2005 14:09:14 GMT
If I use a different node than @id/shclj2Csdh even the node is a virtual one,the load is ok.But
save had the same error.
  <fb:identity>
   <fb:value id="id" path="@oid"/>
  </fb:identity>

Johnson
  ----- Original Message ----- 
  From: Johnson 
  To: users@cocoon.apache.org 
  Sent: Sunday, March 20, 2005 9:46 PM
  Subject: a one2many binding with hibernate


  Hi:

  I want to write a one2many binding,the O/R MAP and java code were generated by hibernatesync,
  it had two kind of beans for parent table,Bean,DAO
  and it had three kind of beans child table,Bean,DAO,PK

  The Biding collection is below

   <fb:repeater id="shclj2List" parent-path="." row-path="shclj2Set">
    <fb:on-bind>
     <fb:value id="shclj2_csdh" path="id/shclj2Csdh"/>
     <fb:value id="shclj2_csjc" path="shclj2Csjc"/>
     <fb:value id="shclj2_cspm" path="shclj2Cspm"/>
     <fb:value id="shclj2_coin" path="shclj2Coin"/>
     <fb:value id="shclj2_price" path="shclj2Price"/>
     <fb:value id="shclj2_cgl" path="shclj2Cgl"/>
    </fb:on-bind>
    <fb:on-delete-row>
     <fb:delete-node/>
    </fb:on-delete-row>
    <fb:on-insert-row>
    <fb:insert-bean classname="com.goodwillheater.Shclj2" addmethod="addToShclj2Set"/>
    </fb:on-insert-row>
   </fb:repeater>

  When Load It's ok,But When save org.apache.avalon.framework.CascadingRuntimeException: InsertBean
failed

  If I don't use a PK class,the same error appear.

  If I add a 

    <fb:identity>
     <fb:value id="id" path="@id/shclj2Csdh"/>
    </fb:identity>

  the error happend

  java.lang.RuntimeException: Tried to set value of output widget "shclj2List.0.id" with an
object of an incorrect type: expected class java.lang.Long, received class java.lang.String

  I do not write a hibernate session component in cocoon.xconf like the sample said.

  Best Regards

  Johnson
Mime
View raw message