This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes findByProperty() in the scaffold.sql.AccessBase - Need Additional Parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "findByProperty() in the scaffold.sql.AccessBase - Need Additional Parameters " Watch "findByProperty() in the scaffold.sql.AccessBase - Need Additional Parameters " New topic
Author

findByProperty() in the scaffold.sql.AccessBase - Need Additional Parameters

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I need to pass additonal parameters rather than using one pair of property/value of parameters in the exising findByProperty() method.
I am using the findByProperty method in the org.apache.commons.scaffold.sql.AccessBase. The findByProperty method takes "only one" pair of property/value as it parameters. As such, visitors of the web site queries all articles in the database by providing 'author' as the property and supply the name of the author (xyz) as value.

I have this field "category" in my database. I want to search and get all the articles written by author(property) with name xyz (value) within; say, the HISTORY category. The value of the category will be supplied by the application developer (NOT BY THE VISITOR of the web site via selecting from a drop-down list and fill out the value in the text field).
I need help in handling this kind of situation. Thanks in advance.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: findByProperty() in the scaffold.sql.AccessBase - Need Additional Parameters
 
Similar Threads
Need Help From Those Who Are Good At Using Lucene In the Struts Application
jsp:setProperty is ignored !
Hibernate not saving
Best practice to get table form data back to Java beans
Using getHibernateTemplate() problem