This content has been marked as final.
Show 3 replies
-
1. Re: Creating status messages
idyoshin Dec 20, 2009 6:09 AM (in response to jpalmer1026.jpalmer1026.mchsi.com)Take a closer look into documentation.
you can override method getCreatedMessage():
protected String getCreatedMessage() { return createValueExpression("You've successfully added #{course.name}. Thanks for contributing"); }
Regards,
Ilya Dyoshin
-
2. Re: Creating status messages
jpalmer1026.jpalmer1026.mchsi.com Dec 22, 2009 3:32 PM (in response to jpalmer1026.jpalmer1026.mchsi.com)I ended up doing the following:
@Override public void create() { setUpdatedMessage(createValueExpression("Employee #{employee.fullName} has been updated.")); }
This works well for the most part. What I'm noticing, however, is that the EL notation in the message is never getting displayed. For example, the message above is getting displayed as
Employee has been updated
instead ofEmployee Jim Jones has been updated.
Any suggestions? -
3. Re: Creating status messages
jpalmer1026.jpalmer1026.mchsi.com Dec 22, 2009 8:29 PM (in response to jpalmer1026.jpalmer1026.mchsi.com)Figured out what I was doing wrong. I forgot to override the getInstance() method that returns the employee instance being used in the value expression
#{employee.fullName}