hi, there,
has anybody tried to use SQL Maps framework with struts? i am now using
the struts with SQL Maps framework, all is convenient. i have tried to use
ActionForm instead of create a new javaBean passed to SQL Map parameter.
just like this:
AuthorForm authorForm = (AuthorForm) form;
try {
baseDAO.insertAuthor(authorForm);
} catch(Exception ex) {
ex.printStackTrace();
}
now, i have a query about using DynaActionForm in it...
assume that i am using DynaActionForm and config in struts-config.xml,
What should i do to pass the dynaformBean to SQL Map parameter?
some code like these, but it threw some exception...
DynaActionForm authorForm = (DynaActionForm) form;
try {
baseDAO.insertAuthor(authorForm);
} catch(Exception ex) {
ex.printStackTrace();
}
and in my BaseDAO.java :
public void insertAuthor(DynaActionForm author) throws DaoException {
try {
javaDIYDaoManager.startTransaction();
authorDao.insertAuthor(author);
javaDIYDaoManager.commitTransaction();
}
catch (DaoException e) {
try {
javaDIYDaoManager.rollbackTransaction();
}
catch (Exception e2) { /* ignore */}
throw ( (DaoException) e.fillInStackTrace());
}
}
it threw some exception:
Error executing 'insertAuthor' in 'com/dao/sql/Author.xml'.
Check the Parameter Map (or inline parameters). Check the 'author_name' property.
Cause: com.ibatis.common.beans.BeansException: There is no READABLE property named
'author_name' in class 'org.apache.struts.action.DynaActionForm'
com.ibatis.common.beans.BeansException: There is no READABLE property named
'author_name'
in class 'org.apache.struts.action.DynaActionForm'
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]