4 Replies Latest reply on Oct 24, 2007 9:39 AM by Matthew Lieder

    @DataModelSelection and selectOneItem?

    Matthew Lieder Apprentice

      Does @DataModelSelection work with selectOneItem, when using s:selectItems? I'm trying to use it, but it always just points at the first item in the model.

       @DataModel(scope=ScopeType.PAGE) private List<Product> products;
      
       @DataModelSelection private Product product;
      
       @Factory(value="products")
       public void initProducts() {
       products = ProductHelper.fetchProducts(database);
       }
      


       <h:selectOneMenu>
       <s:selectItems value="#{products}" var="product" label="#{product.productDesc}" />
       </h:selectOneMenu>