This content has been marked as final.
Show 1 reply
-
1. Re: resolving el messages in a js file.
cash1981 Oct 30, 2009 11:17 PM (in response to scphantm.scphantm.gmail.com)I am not sure I understand your problem. However this is how we do things:
To get messages from message bundle in javascript:
var err = '#{messages['my.message']}';
If I have some kind of validation going on inside the webremote, I usually handle that in the callback function from the webremote.
Component.getInstance("myComponent").someMethod('param1','param2',callBack); function callBack(objectReturnedFromSomeMethod) { if(objectReturnedFromSomeMethod=='success') { alert('#{messages['okMessage'}'); } }
DISCLAIMER: I just wrote this code from my mind, so don't expect copy paste to work :-)