erm, i thought filters were executed in the order they were defined in web.xml. so open..inview should be declared before wicket. and its not the filter-mapping but the filter element...
-igor On Sat, Mar 29, 2008 at 4:15 AM, lars vonk <[EMAIL PROTECTED]> wrote: > What is the order of the filters you defined in your filter-mapping element > in the web.xml. IIRC you should put the OpenEntityManagerInViewFilter > definition in the filter-mapping after the WicketFilter otherwise the > WicketFilter will come first. > > Lars > > > > On Fri, Mar 28, 2008 at 9:11 PM, cjlyth <[EMAIL PROTECTED]> wrote: > > > > > I have been getting the same error. I feel like im missing something. > > Maybe I > > am doing something horibly wrong but I haven't been able to figure out > > what > > it is. > > > > I am using spring 2.5, Wicket 1.3.2, and I have put the > > OpenEntityManagerInViewFilter in my web xml. The filter is loading ok, im > > not sure what to do next... > > > > If anyone can help please let me know what you need to see. I even have an > > example application i can upload. > > I am using a DataView, I have tried to inject the spring beans into every > > part (data provider, etc) and I always get the same result... > > For now I will include the wicket stuff: > > > > > > public class Home extends WebPage { > > @SpringBean > > private TestService testService; > > > > public Home() { > > init(); > > } > > > > public Home(PageParameters parameters) { > > super(parameters); > > init(); > > } > > > > private void init() { > > add(new DataView("container", new ListOwnerProvider()) { > > private static final long serialVersionUID = 1L; > > > > @Override > > protected void populateItem(Item item) { > > /*ListOwner owner = > > (ListOwner)item.getModelObject();*/ > > item.add(new Label("name")); > > item.add(new ListView("entries"){ > > private static final long > > serialVersionUID = 1L; > > > > @Override > > protected void > > populateItem(ListItem item) { > > item.add(new > > Label("value")); > > } > > }); > > } > > }); > > } > > > > class ListOwnerProvider implements IDataProvider { > > > > private static final long serialVersionUID = 1L; > > > > @Override > > public void detach() { > > > > > > } > > > > @Override > > public Iterator iterator(int first, int count) { > > return testService.getListOwners > > (first,count).iterator(); > > } > > > > @Override > > public IModel model(Object object) { > > > > return new CompoundPropertyModel(new > > ListOwnerModel((ListOwner)object)); > > } > > > > @Override > > public int size() { > > return testService.getListOwners().size(); > > } > > } > > > > class ListOwnerModel extends LoadableDetachableModel { > > private static final long serialVersionUID = 1L; > > private Integer id; > > > > public ListOwnerModel(ListOwner listOwner) { > > this.id = listOwner.getId(); > > } > > > > @Override > > protected Object load() { > > return testService.getListOwner(id); > > } > > } > > } > > > > > > > > Mathias P.W Nilsson wrote: > > > > > > I'm using wicket with hibernate and spring. In my web.xml I have > > > OpenEntityManagerInViewFilter. But when trying to add a dataview to my > > > wicket page I get the org.hibernate.LazyInitializationException > > > > > > > -- > > View this message in context: > > > http://www.nabble.com/Lazy-load-exception-wicket-and-hibernate-tp15976668p16361116.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]