Forums: Open Discussion (Thread #18034)

エラーメッセージの改行について (2008-03-19 14:49 by Anonymous #35617)

Validationのチェックで、複数エラーが発生して、JSPファイルで、<ts:errors /> と出力した場合、エラーがひとつずつ改行されずに(<br/>が挿入されず)表示されます。
プロパティファイルにタグや\nなどを入れてみたりしていますが、うまくいきません。
メッセージをエラーごとに改行して出力するにはどうしたらよいのでしょうか?

Reply to #35617×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: エラーメッセージの改行について (2008-03-19 15:45 by hachihachi #35618)

Web版の機能サンプル(terasoluna-server4jweb-funcsample_2.0.0.2.zip)や
チュートリアル(terasoluna-server4jweb-tutorial_2.0.0.2.zip)を見ていただくと、
プロパティファイルに errors.prefix、errors.suffix、errors.header、errors.footerの定義がされていると思います。
これらはそれぞれ・・・
 ・errors.header ・・・ エラー全体の前に表示するメッセージ
 ・errors.footer ・・・ エラー全体の後に表示するメッセージ
 ・errors.prefix ・・・ 各エラーの前に表示するメッセージ
 ・errors.suffix ・・・ 各エラーの後に表示するメッセージ
となります。
各エラー毎に改行を行う場合であれば、
errors.suffix=<br>
のように定義すれば、各エラーごとに改行されるはずです。
Reply to #35617

Reply to #35618×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: エラーメッセージの改行について (2008-03-19 16:54 by Anonymous #35620)

早速のご回答ありがとうございます。
試したところ上手く動作しました。
Reply to #35617

Reply to #35620×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login