Il giorno 02/mag/05, alle 14:48, Sebastien Arbogast ha scritto:

I'd like to display a form containing a list of items, each item
corresponding to a value object I get from flowscript through Spring.

I'm not sure what you mean by 'list' here. Is it a drop-down listbox as in the HTML <select> element?

In other words I would like to :
1 - get the list of value object from Spring layer
2 - build my form model (of which I don't know the size 'a priori')
3 - populate my model with data from the value objects in the list
4 - display the form

It's the dynamic model and the data binding aspects that make me
uncomfortable above all.

Assuming your value objects are defined somewhat like:

public class Item {
  public String getKey();
  public String getValue();
}

Then your flowscript code should be liike:

var aList = getTheList(); // via Spring, returns a List of Item's
form.lookupWidget("theSelectField").setSelectionList(aList, "key", "value");

        Ugo


-- Ugo Cei Tech Blog: http://agylen.com/ Source.zone: http://sourcezone.info/ Wine & Food Blog: http://www.divinocibo.it/

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to