cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Bols" <db...@osirion.be>
Subject RE: Woody: selection list problem
Date Fri, 21 Nov 2003 19:37:04 GMT


> -----Original Message-----
> From: Bruno Dumon [mailto:bruno@outerthought.org]
> Sent: vrijdag 21 november 2003 17:35
> To: dev@cocoon.apache.org
> Subject: Re: Woody: selection list problem
>
>
> On Fri, 2003-11-21 at 10:31, Danny Bols wrote:
> > Hello,
> >
> > when trying to populate a selection list from within flow
> script I ran into
> > a problem. The following piece of code did not work:
> >
> >  function myform(form) {
> >      var widget = form.form.getWidget("myfield");
> >      var selectionList = new
> >
> Packages.org.apache.cocoon.woody.datatype.StaticSelectionList(widg
> et.getData
> > type());
> >      selectionList.addItem("AL", "Alabama");
> >      selectionList.addItem("AK", "Alaska");
> >      widget.setSelectionList(selectionList);
> >      form.showForm("flow/myform.form");
> > }
>
> Well, if you would have read the javadoc of that class and method ...

mmhh...I thought I read almost everything.....almost :-)


> Anyway, this code changed recently, if you update to current CVS you
> should be able to make it work with something like this:
>
> selectionList.addItem("AL", new
> Packages.org.apache.cocoon.woody.util.StringMessage("Alabama"));

Would it be a good idea to create a convenience method which accepts 2
string objects?

--
Danny


Mime
View raw message