Okay, I understand.
Thanks Ken!
On Thu, Jun 26, 2008 at 8:09 PM, Ken Paulsen <Ken.Paulsen_at_sun.com> wrote:
>
> Hi Jaco,
>
> The problem was that "f:selectItems" was not defined, so that tag was
> ignored. JSFT defines most of the f:* properties, but it doesn't define
> them all. JSFT (as well as JSP and Facelets) require support for each
> component type they support. JSFT will accept facelets taglib files to
> define components, but the f:* components do not have a taglib, they're
> supported natively by facelets, jsp, and JSFT. I have overlooked this f:
> component (and a few others which I still haven't implemented). This is
> mostly because I don't regularly use the h:* or f:* components, I mostly use
> the Woodstock components. In this case, the <sun:dropDown> component. Also
> if you choose to use the "template" syntax, this component's factory has a
> big advantage over using the "selectItem" tags:
>
> <sun:dropDown labels=["foo", "bar"] />
>
> This creates a drop down with 2 choices. It creates Woodstock ListItem
> objects automatically (for some reason Woodstock didn't use SelectItem
> objects defined by the default components -- I don't know why). I can add
> support for this feature for h:selectOneMenu as well, however, I don't have
> a way to represent this in xhtml yet since the above syntax is invalid.
>
> Anyway, I added support for f:selectItem/f:selectItems, so it should now
> work fine.
>
> Thanks!
>
> Ken
>
> Jaco Prinsloo wrote:
>
>> Hi All (and specifically Ken),
>>
>> The new copyProperty expression works fine, except if I have something in
>> line of the following:
>>
>> <h:selectOneMenu>
>> <f:selectItems value="$copyProperty{rowListItems, true}" />
>> </h:selectOneMenu>
>>
>> Instead of creating the SelectItems it insteads generates a String which
>> looks something like this:
>> <f:selectItems value="Test.xhtml @23,63
>> rowListItems="[javax.faces.model.SelectItem_at_83be58,
>> javax.faces.model.SelectItem_at_1459f5e,
>> javax.faces.model.SelectItem_at_1e1d5ff,
>> javax.faces.model.SelectItem_at_1a88151,
>> javax.faces.model.SelectItem_at_1c22829]":
>> ValueExpression[[javax.faces.model.SelectItem_at_220327,
>> javax.faces.model.SelectItem_at_fd0f27, javax.faces.model.SelectItem_at_1edf60e,
>> javax.faces.model.SelectItem_at_1b552bf,
>> javax.faces.model.SelectItem_at_14baaaf]]"></f:selectItems>
>> I tried to follow the code, but I can't really say I understand enough of
>> it yet. It seems to me that at Line 437 of ComponentUtil.java, where it is
>> supposed to create a ValueExpression for the following String:
>>
>> <f:selectItems value="Test.xhtml @23,63
>> rowListItems="#{TestBean.rowList}": ValueExpression[#{TestBean.rowList}]">
>>
>> It creates a ValueExpression which has that exact same String as the expr
>> value (whereas, I suppose, it should only have 'TestBean.rowList'?).
>> If that's not the problem, my second guess would be that it calls toString
>> on the SelectItems somewhere where it shouldn't.
>>
>> If you could have a look at it I'd appreciate it,
>> Thanks,
>> Jaco
>>
>>
>>