- - PR -
Teedaでテキストフィールドに入力した値がDaoのメソッドの引数でNULLになってしまう
1
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2007-05-10 20:45
こんにちわ、現在Seasar2で開発をしております。
環境: Dolteng0.17.0(Teeda+S2Dao) S2framework-2.4.8 S2Dao-1.0.39 Teeda-1.0.3 テキストフィールドにIDを入力してサブミットすると テーブルからデータを取得して表示するというアプリケーション を作っているのですが、テキストフィールドに入力したIDが Pageクラスで呼び出したDaoのメソッドの引数でnullに なってしまいます。原因がわかる方おられませんでしょうか? 以下、HTML -----省略---- <body> <form id="RentBookForm"><input type="hidden" id="userItemsSave"/> 利用者IDを入力し、ボタンを押してください<br/> 利用者ID:<input type="text" id="userId"/><span id="userIdMessage"></span><br/> <input type="button" value="送信" id="doSubmit"/><br/> </form> ----省略----- 以下、Pageクラス public class RentBookPage { private String userId; private RentInfo[] userItems; ----ゲッター、セッター省略---- public String doSubmit() { RentInfo[] rentInfo = getRentInfoDao().getAllRentInfo(userId); if(rentInfo == null) { return null; } userItems = rentInfo; return null; } } 以下、Daoクラス public interface RentInfoDao { public Class BEAN = RentInfo.class; public static final String getAllRentInfo_ARGS = "userId"; public RentInfo[] getAllRentInfo(String userId); } 以下、SQLファイル select user.id, user.name, user.entryDate, user.kind, user.contact, rentInfo.limitDate, bookSpec.title from book left outer join bookSpec on book.bookSpecId = bookSpec.id left outer join rentInfoDetail on book. id = rentInfoDetail.bookId left outer join rentInfo on rentInfoDetail.rentInfoId = rentInfo.id left outer join user on rentInfo.userId = user.id where user.id = /*userId*/1 以上、 よろしく御願いいたします。 |
|
投稿日時: 2007-05-23 19:09
入力した値はどこで設定されるか考えよう
|
|
投稿日時: 2007-06-01 18:36
杏さん、お返事ありがとうございました。
問題は解決しました。 |
1