File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insert text after executing action

 
Jukka Nevalainen
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I have a template which looks like that:


The 'msgs' are defined in every page like that:

The error handler should return all errors that have to be displayed. Errors are added to the ErrorHandler while processing the action, which obviously happens after the call to ErrorHandler.errors. So, what happens? First, all errors are displayed (there are none). Secondly, the action is being processed and perhaps some erros added. But they are only displayed in the next request/response. The problem is, that the call to ErrorHandler.errors is made before the action is being processed.

How could we change that order?

I'd appreciate if anybody could give a hint.

Regards,
rethab
 
Sridhar Santhanakrishnan
Ranch Hand
Posts: 317
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using some JSF extensions? Like RichFaces?
 
Jukka Nevalainen
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sridhar Santhanakrishnan wrote:Are you using some JSF extensions? Like RichFaces?

No, nothing
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17620
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no "ErrorHandler.errors" method here. What you are doing is coding an EL expression that references the "errors" property of a bean named "ErrorHandler". Which is a bad choice for a bean name, because you're using the Classname capitalization convention on an instance of a class.

However, like I said, there's no "errors" method, just calls to getErrors() and setErrors(). Or, since this is an output-only component, just getErrors(). The actual value of the "errors" property has be be set somewhere else, such as in an action processor.

As a side note, you're using the "escape" option which means you're apparently planning to output raw HTML. That's not something I recommend as a general rule. It muddies the Model and View boundaries. In fact, ff you look at the JSF standard "messages" tag, you'll notice there is no "escape" attribute there. They provide basic formatting services (table or list view) and leave the rest up to CSS.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic