0

I try to excute the servlet code given, like an exemple to understand how it works. BUT I did not understand from where the attribut optionDAO and what is the necessity to use it. The find method seems like the given by hibernate in package".base". What should I really do to skip this. Thanks.

kawtousse
  • 3,971
  • 12
  • 38
  • 57
  • 1
    You need to give some more details here. We do not have the context to understand what you are asking? – Vincent Ramdhanie Mar 17 '10 at 12:26
  • I bet he's talking about my answer here: http://stackoverflow.com/questions/2263996/populating-child-dropdownlists-in-jsp-servlet In the future, you should be really more clear about that, user294750. – BalusC Mar 17 '10 at 13:47

1 Answers1

0

It's just a fictive code example according the DAO pattern with a self-explaining classname and methodname which you need to write/implement yourself. E.g.

public class OptionDAO {
    public List<Option> find(String dd, String val) { 
        // Write code here yourself which does the desired task: returning
        // a list of options based on the given dropdown id and value. 
        return options;
    }
}

The way how to do it namely differs per environment, ORM libraries used, datamodel design, etc.. that it's impossible to give a concrete code example. Examples how to do it with "plain vanilla" JDBC can be found here. Examples how to do it with Hibernate can be found here. Examlpes how to do it with JPA can be found here.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555