Portlet Factory, Version 6.1.2


 

Creating a properties file for all form fields

Use the the Data Page builder to modify all labels in a form. You can use the Data Page builder's "Create Resource Bundle" functionality to create a properties file that defines the label for each element in a form. Using a properties file to determine field labels allows you to modify form labels without having to edit the model. It also provides you with a head start if you decide to localize the application.

To generate a properties file for all the form fields:

  1. Open the Data Page builder call in your model.

  2. Expand the Label Translation Settings input group.

  3. Click the Create Resource Bundle button and specify a location and name for the properties file. For example, FormLabels.properties. (Be sure to include the .properties extension.) The location must be in the IBM® WebSphere Portlet Factory class path. During development, WEB-INF/work/classes is recommended so that you can see changes to the properties file without having to restart the WebSphere Portlet Factory application.

  4. Set the Resource Bundle Name input to the name of the properties file you just created. Do not use the .properties file extension. For example, example_simple_forms.

  5. Click OK in the Data Page builder call editor. An error displays saying that the properties file cannot be found. Click the Generate Model icon to "pick up" your new properties file.

  6. Edit the new properties file in your favorite text editor and save it.

  7. Run the model to see the new form.

Parent topic: About setting labels for form fields


Library | Support |