This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Wicket DataProvider calling a Service/Dao that requires a domain object Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply Bookmark "Wicket DataProvider calling a Service/Dao that requires a domain object" Watch "Wicket DataProvider calling a Service/Dao that requires a domain object" New topic
Author

Wicket DataProvider calling a Service/Dao that requires a domain object

Fernando Sproviero
Greenhorn

Joined: Mar 10, 2011
Posts: 3
Hi,

I have a DataProvider that implements IDataProvider, and for example in the size method I need to call the service as follows:

public int size() {
return service.countAllByDomainObjectY(domainObjectY);
}

DomainObjectX contains a manytoone relationship with DomainObjectY.
So, this countAllByDomainObjectY internally searches by the domainObjectY's id and returns the count of DomainObjectX associated with that specific domainObjectY.

Now, in order to do this I would need to have domainObjectY as a property of the DataProvider which I think it is not good because it would be serialized.

Should I change the service to receive just the domainObjectY's id and only "save" this id as a property of the DataProvider?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Wicket DataProvider calling a Service/Dao that requires a domain object
 
Similar Threads
How to access a bean in a web application
Session Problem
Tomcat startup error "Exception processing TLD..."
Dataprovider in TestNg
Design Question