[daisy] Re: Possible Daisy 2.0 regression?
Robert Cecil
rob.cecil at gmail.com
Mon Dec 11 20:40:03 CST 2006
Can someone confirm this? It appears that SelectionList.getItems() is
returning null instead of ListItem[].
Thanks
Rob Cecil
On Dec 11, 2006, at 2:50 PM, Robert Cecil wrote:
> This snippet worked in Daisy 1.5.1, but now I am getting a
> "undefined" in my cocoon.log when getItems() method returns:
>
>
>
> var schema = repository.getRepositorySchema();
> var selectionList = schema.getFieldTypeByName(fieldTypeName,
> false).getSelectionList();
> if (selectionList == null) {
> var msg = "No selection list found for field " + fieldTypeName;
> throw(msg);
> }
> var typeArray = new Array();
> var selectionListItems = selectionList.getItems();
> cocoon.log.error("num items: " + selectionListItems.length);
> for (var i = 0; i < selectionListItems.length; i++) {
> var listItem = selectionListItems[i];
> var listLabel = listItem.getLabel(java.util.Locale.getDefault());
> typeArray[i] = { value:listItem.getValue(), label:listLabel };
> }
>
>
> ERROR (2006-12-11) 14:42.05:971 [flow] (/daisy/funding/ext/forms/
> conceptproposal) SocketListener0-4/MemberBox: num items: undefined
>
> Is this a regression?
>
> Thanks
>
> Rob Cecil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cocoondev.org/pipermail/daisy/attachments/20061211/1cacb65d/attachment.htm
More information about the daisy
mailing list