THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
requiredstring = $\{getText(fieldName)} is required.
password = Password
username = User Name
|
We also need to make changes to the validator and Logon page. As you see a value in resource bundle can also be specified as an expression.
Logon-validation.xml
<message>Username is required</message>
<message key="requiredstring"/>
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
package tutorial; public class HelloWorld extends ExampleSupportTutorialSupport { public static final String MESSAGE = "HelloWorld.message"; public String execute() throws Exception { setMessage(getText(MESSAGE)); return SUCCESS; } // ... } |
...