Hi Anissa,
I see that the DropDownFactory does not evaulate #{} expressions, but
instead expects this to be converted to a ValueBinding. This is
standard behavior in a factory, but this factory is consuming the value
itself... so it should resolve the #{} expression in this case. Please
file a bug.
In the mean time, you can get around this by doing:
$pageSession{...} instead of #{...}
FYI, if you're trying to take advantage of a ValueBinding to dynamically
update the list values, then this is another RFE. The component factory
is generating the list at creation time and then setting the value
directly on the component. It will need to find a way to dynamically
generate this information based on your #{} expression. The problem
with this is that the Component data model isn't strictly data, which
makes it difficult to work with (poor design IMO)... so there is no way
to bind it directly to your data, instead it has to be indirectly, or
you have to use "Option" objects for your data (which already works now).
Ken
Anissa Lam wrote:
> Hi Ken,
>
> I notice that if i store a List as a page attribute, and then use that
> as the labels for a dropdown, in the dropdown factory, it only sees
> that as a String, and thus won't initialize the dropdown. Is this a
> bug or limitation of the page attribute ?
>
> case 1: (works fine)
> <sun:dropdown labels="$attribute{myList}" > <!beforeCreate
> getList( result=>$attribute{myList} );
> />
> </sun:dropdown>
>
>
> case 2: (will not work)
> <sun:dropdown labels="#{myList}" > <!beforeCreate
> getList( result=>$page{myList} );
> />
> </sun:dropdown>
>
> In DropDownFactory: line 78
> Object labels = descriptor.getEvaluatedOption(context, "labels",
> comp);
> labels is a String for case 2
>
>
> thanks
> Anissa.