dev@jsftemplating.java.net

Is it possible to write JSFT component that wraps <f:selectItems />

From: Leonid Lamburt <leonidlamburt_at_hotmail.com>
Date: Tue, 25 Sep 2007 15:53:02 -0400

I have a follow up question then,

I understand that it's possible to create another tag mergeSelectOneMenu.

but that would be a major inconvenience for tag users, as they'll be forced to
learn a new set of tags (in addition to JSF h: tags).

I was thinking about just one tag that can be plugged into all h: tags that take f:selectItems, e.g.

<h:selectOneMenu id="selectUSState" value="#{myBean.selectedState}">
  <myjsft:merge filterout="PR VI">
    <f:selectItems value="#{geoController.USStatesAndTerritories}" />
   </myjsft:merge>
 </h:selectOneMenu>

I understand that if JSFT is using JSF RI facilities to render
selectOneMenu, then it won't work out of the box. It will throw
an exception (as the child is not an instance of UISelectItem/UISelectItems ).

However, maybe it possible to create a component (for myjsft:merge tag)
public class MergeSelectItems extends UISelectItems
?

or more complicated:
MergeSelectItems doesn't extend UISelectItems,
but the framework swaps out MergeSelectItems for UISelectItems right before

encodeBegin()

and then puts it back after encodeEnd()

?

Thanks.



_________________________________________________________________
Kick back and relax with hot games and cool activities at the Messenger Café.
http://www.cafemessenger.com?ocid=TXT_TAGLM_SeptWLtagline