cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Messing, Elad" <>
Subject AW: Selection list populated from Hibernate POJO
Date Mon, 23 May 2005 12:26:31 GMT
Hello Ugo !
	Thanks, Option B) is just what I was looking for ! 

	However - is it possible to use this declaration in the form XML ? :
	<fd:field id="type">
	      <fd:datatype base="long"/>
      	<fd:selection-list type="flow-jxpath" list-path="restTypeList" value-path="id" label-path="name"/>

	And in the flowscript - just collect the "restTypeList" list, built from my hibernate POJO's
and pass it own ? If so - don't you think it is better to define the field data in its declaration,
rather in the flow script ?

	Thanks again


-----Ursprüngliche Nachricht-----
Von: Ugo Cei [] 
Gesendet: Montag, 23. Mai 2005 14:01
Betreff: Re: Selection list populated from Hibernate POJO

Il giorno 23/mag/05, alle 13:39, Messing, Elad ha scritto:

>         I have a Hibernate POJO class - for a restaurant type. It is 
> actually a mapping of a look-up table from my DB. An ID, and Name 
> members. That's it.

Two possibilities come to mind:

A) use the src attribute and make it point to a pipeline that would query the Hibernate datastore
and output some XML. You don't have to have Hibernate output XML, as you wrote: you can have
a flowscript function do the query and produce XML via a template page (JXTG or Velocity).
Or even an XSP page.

B) possibly simpler:

var form = new Form("formdef.xml");
var list = hibernateSession.find("from ..."); form.lookupWidget("widget-id").setSelectionList(list,
"id", "name"); form.showForm("form-template");



Ugo Cei
Tech Blog:
Wine & Food Blog:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message