http://cwiki.apache.org/WICKET/[EMAIL PROTECTED]

On Sun, Aug 3, 2008 at 11:07 AM, alex2008 <[EMAIL PROTECTED]> wrote:
>
> ....
>  @SpringBean
>    private ProductManager productManager;
>    //@Autowired
>    public void setProductManager(ProductManager productManager) {
>        this.productManager = productManager;
>    }
> .....
>  LoadableDetachableModel personListModel = new LoadableDetachableModel() {
>            @Override
>            protected Object load() {
>                return productManager.getProducts();
>            }
>        };
> add(new ListView("products", personListModel) {
> ........
>        });
> It's ok.
>
>
> While if a use an external class:
> package wicketapp.util;
>
> import org.apache.wicket.model.LoadableDetachableModel;
> import org.apache.wicket.spring.injection.annot.SpringBean;
> import springapp.service.ProductManager;
>
> public class ProductModel extends LoadableDetachableModel {
>    @SpringBean
>    private ProductManager productManager;
>    //@Autowired
>    public void setProductManager(ProductManager productManager) {
>        this.productManager = productManager;
>    }
>
>    protected Object load() {
>        return productManager.getProducts();
>    }
> }
>
> ..........
>  ProductModel personListModel = new ProductModel();
>
>        add(new ListView("products", personListModel) {
>        .......
>        });
>
> It's wrong.
>
> Which is the problem?
> --
> View this message in context: 
> http://www.nabble.com/Problem-on-external-LoadableDetachableModel-class-tp18797009p18797009.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to