cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joel McConaughy" <j...@displayware.com>
Subject RE: Hibernate, Woody and repeaters
Date Sat, 17 Apr 2004 02:42:34 GMT
Mark,

Glad to hear from you!  Here's the form template.  Basically, a cut n
paste from Hugo's sample with a few things changed.  If I comment out
the form.load() in the flow, this form displays fine (albeit empty). 

joel

 <?xml version="1.0" ?> 
  <page xmlns:wt="http://apache.org/cocoon/woody/template/1.0"
xmlns:wi="http://apache.org/cocoon/woody/instance/1.0">
  <title>Centerpad User Administration</title> 
  <logout /> 
  <content>
  <wt:form-template action="#{$continuation/id}.continue" method="POST">
  <table align="center">
  <tr>
  <td>
  <!--  group with tabs. Each of the children of <items> will constitute
a tab 
  --> 
  <wi:group>
  <wi:styling type="tabs" /> 
  <wi:label>Choose a panel:</wi:label> 
  <wi:state>
  <wt:widget id="tab-state" /> 
  </wi:state>
  <!--  group with automatic two-column layout 
  --> 
  <wi:items>
  <wi:group>
  <wi:styling layout="columns" /> 
  <wi:label>User fields</wi:label> 
  <wi:items>
  <!--  manual layout of fieldw, without use of a wi:group 
  --> 
  <wt:widget-label id="contacts" /> 
  <br /> 
  <wt:repeater-size id="contacts" /> 
  <table border="1">
  <tr>
  <th>
  <wt:repeater-widget-label id="contacts" widget-id="username" /> 
  </th>
  <th>
  <wt:repeater-widget-label id="contacts" widget-id="password" /> 
  </th>
  <th>
  <wt:repeater-widget-label id="contacts" widget-id="firstname" /> 
  </th>
  <th>
  <wt:repeater-widget-label id="contacts" widget-id="lastname" /> 
  </th>
  <th>
  <wt:repeater-widget-label id="contacts" widget-id="phone" /> 
  </th>
  <th>
  <wt:repeater-widget-label id="contacts" widget-id="email" /> 
  </th>
  <th>
  <wt:repeater-widget-label id="contacts" widget-id="select" /> 
  </th>
  </tr>
  <!-- 
 The contents of the repeater-widget element is a template that will
        be applied to each row in the repeater. 

  --> 
  <wt:repeater-widget id="contacts">
  <tr>
  <td>
  <wt:widget id="username" /> 
  </td>
  <td>
  <wt:widget id="password" /> 
  </td>
  <td>
  <wt:widget id="firstname" /> 
  </td>
  <td>
  <wt:widget id="lastname" /> 
  </td>
  <td>
  <wt:widget id="phone" /> 
  </td>
  <td>
  <wt:widget id="email" /> 
  </td>
  <td>
  <wt:widget id="select" /> 
  </td>
  </tr>
  </wt:repeater-widget>
  <tr>
  <td colspan="4" align="right">
  <wt:widget id="addcontact" /> 
  <wt:widget id="removecontacts" /> 
  </td>
  </tr>
  </table>
  <input type="submit" /> 
  </wi:items>
  </wi:group>
  </wi:items>
  </wi:group>
  <input type="submit" /> 
  </td>
  </tr>
  </table>
  </wt:form-template>
  </content>
  </page>

Joel McConaughy
Managing Partner
Displayware
800 Fifth Ave., #101-316
Seattle, WA 98104-3191
206-300-4732 Direct
206-382-2188 Fax
joel@displayware.com


-----Original Message-----
From: Mark Lundquist [mailto:ml@wrinkledog.com] 
Sent: Friday, April 16, 2004 6:09 PM
To: users@cocoon.apache.org
Subject: Re: Hibernate, Woody and repeaters



On Apr 16, 2004, at 5:07 PM, Joel McConaughy wrote:

> I am having trouble using the result of a hibernate query in a woody
> form.

ha ha, as it so happens I am up to my elbows in Hibernate today, too... 
:-)

>    I'm trying to do the following:
>
> 1.  Generate the bean from a hibernate mapping file using hbm2java. 2.

> Load the entire contents of a table using hibernate -- obj = 
> hs.find(queryString). 3.  Use the resulting object as the form model 
> for woody -- form.load(obj).
> 4.  Save the (possibly) edited results -- hs.save(obj);
>
> I think I have datatype problems but not sure how to fix them.  I've
> attached the flowscript code, exception text, form definition and bean

> class.   Any help will be GREATLY appreciated.  Thanks in advance.

What does your form binding document look like?
~mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message