This is the way we do it I don’t think it is possible within the binding.

 

var reports = reports.getReportsList()

var max = reports.size();

 

var data = "" Object();

 

data.displayList = new Array(max);

 

for (var i = 0; i < max; i++) {

            data.displayList[i] = { reportId:reports[i].getReportId(), reportName: reports[i].getReportName()};

}

 

reportLoadForm.showForm("adhoc_reportLoad", data);

 

 

-----Original Message-----
From: Richard Huegill [mailto:[EMAIL PROTECTED]
Sent:
Thursday, 26 February 2004 12:54 PM
To: [EMAIL PROTECTED]
Subject: Has anyone used woody binding and aselection-list?

 

Hi,

We have some flowscript

 

    reports = BusinessObjectLoadData();

                // reports contains a collection called

                // public Collection getReportList() { stuff }

                // the objects in this collection have a getReportId() and getReportName() method.

 

    reportLoadForm.createBinding("forms/adhoc_reportLoad_bind.xml");
    reportLoadForm.load(reports);

    reportLoadForm.showForm("adhoc_reportLoad");

 

that loads a bean into a woody form and displays it.

 

Now within that form we have a secltion list

      <wd:field id="adhocReport">
           <wd:label><i18n:text>Available Reports</i18n:text> : </wd:label>
           <wd:datatype base="string"/>
           <wd:selection-list type="flow-jxpath" list-path="displayList" value-path="reportId" label-path="reportName"/>
      </wd:field>

 

and a bind defn

      <wb:value id="displayList" path="./reportList" />

i tried

      <wb:value id="displayList" path="reportList" />

as well (neither worked)

 

we want to bind to a colleciton of items from the bean (loaded into woody with load).

 

The problem is our list doesn't get populated and we get an empty selection list box.

 

Firstly is this possible, I haven't come across an example that does a dynamic selection list and a binding ?

If it is, what do u use as the bind defnition to allow the selection list to be able to read the collection from the bean.

 

Thanks

 

Richard

 

Reply via email to