Class SweetDevRia.MessageHelper
Utility class in order to produce completed message from string with parameters ({0}, {1}, etc).
This class can now handle until 5 parameters.
Defined in: SweetDevRia_MessageHelper.js.
Constructor Attributes | Constructor Name and Description |
---|---|
------------------------------------
SweetDEV RIA library
Copyright [2006 - 2010] [Ideo Technologies]
------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
|
Field Attributes | Field Name and Description |
---|---|
<private> |
MessageHelper instance
|
<private> <static> |
SweetDevRia.MessageHelper._instance
Singleton
|
Method Attributes | Method Name and Description |
---|---|
completeAllParams(message, param1, param2, param3, param4, param5)
Return messages after fill optional parameter get from MessageHelper
|
|
completeParam(message, param, index)
Compete a specific parameter in a message
|
|
getMessage(message, param1, param2, param3, param4, param5)
Return messages after fill optional parameter get from MessageHelper
|
Class Detail
SweetDevRia.MessageHelper()
------------------------------------
SweetDEV RIA library
Copyright [2006 - 2010] [Ideo Technologies]
------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information, please contact us at:
Ideo Technologies S.A
124 rue de Verdun
92800 Puteaux - France
France & Europe Phone : +33 1.46.25.09.60
web : http://www.ideotechnologies.com
email : SweetDEV-RIA@ideotechnologies.com
Author: Ideo Technologies.
Author: Ideo Technologies.
Field Detail
<private>
_instance
MessageHelper instance
<private> <static>
SweetDevRia.MessageHelper._instance
Singleton
Method Detail
{String}
completeAllParams(message, param1, param2, param3, param4, param5)
Return messages after fill optional parameter get from MessageHelper
- Parameters:
- {String} message
- Message to return after completion
- {String} param1
- Value for field {0} for message @key
- {String} param2
- Value for field {1} for message @key
- {String} param3
- Value for field {2} for message @key
- {String} param4
- Value for field {3} for message @key
- {String} param5
- Value for field {4} for message @key
- Returns:
- Completed message, else null.
{String}
completeParam(message, param, index)
Compete a specific parameter in a message
- Parameters:
- {String} message
- message to complete
- {String} param
- value to fill
- {int} index
- index to put the value into message (0 for "{0}", 1 for "{1}', etc).
- Returns:
- Completed message
{String}
getMessage(message, param1, param2, param3, param4, param5)
Return messages after fill optional parameter get from MessageHelper
- Parameters:
- {String} message
- Message to return after completion
- {String} param1
- Value for field {0} for message @key
- {String} param2
- Value for field {1} for message @key
- {String} param3
- Value for field {2} for message @key
- {String} param4
- Value for field {3} for message @key
- {String} param5
- Value for field {4} for message @key
- Returns:
- Completed message, else null.