cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Latty" <joe.la...@tias.com.au>
Subject RE: Has anyone used woody binding and aselection-list?
Date Thu, 26 Feb 2004 02:15:17 GMT
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 = new 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:richard.huegill@pinnaclesoftware.com.au] 
Sent: Thursday, 26 February 2004 12:54 PM
To: users@cocoon.apache.org
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

 


Mime
View raw message