You have already had a chance in the previous chapters to work with command key properties. Now you can try changing command key labels.
Let's assume you want to change the label for a command key to make it more meaningful in the Web environment. However, you do not want to change it for the 5250 environment. Once again, Web settings come to the rescue for this requirement.
In the wflabxx project, from the WebFacing Projects view,
Select the ORDENTD DDS source member and open it with CODE Designer.
In CODE Designer (Figure 17.27),
Select the Prompt record format in the tree view.
Select the Web Settings tab in the notebook at the bottom right of CODE Designer.
Select Key labels from the tree view.
Select the F4=Prompt in the Labels already defined list box.
Enter Selection list in the New Label entry field.
Click the Change push button at the bottom of this pane.
The Override labels in web setting list box should now contain your new label, as shown in Figure 17.28.
You are now finished with CODE Designer.
Close CODE Designer and save the changed member.
In the WebFacing perspective in the Projects view,
Convert the ORDENTD member.
Test the application.
You will see the changed push button label on the Web page, as shown in Figure 17.29.
Note | You need to change only the command key description of the last record format written to the workstation file, because command key enablement is active only from the last record format. |
If you want to disable a command key in the WebFaced environment, you can also use Web settings. Let's assume you want to disable command key 12 because it is redundant with the function of command key 3.
Open the ORDENTD member in CODE Designer (Figure 17.30).
Figure 17.30: Hiding command keys using Web settings
Expand the Prompt record format.
Select Record Keywords.
Select the Web Settings tab.
Select Key order.
Check the Change order and visibility of command keys check box.
Select the CA04 command key.
Move it to the Display order list box by pressing the ’ push button.
Select the CA03 button.
Move it to the Display order list box by pressing the ’ push button.
Select the HELP function key.
Move it to the Display order list box by pressing the ’ push button.
Close CODE Designer and save the ORDENTD member.
Convert the member.
Test the application.
Your screen should look like Figure 17.31.
Note | The command key is still active. If the user presses it, it will still function. |
If you want to change the order of how the push buttons are displayed on the Web page, you can use the same Web settings you use to hide the function keys. The instructions assume that you have used the instructions to hide command key from the previous section. Here we will move command key 4 after command key 3.
Open the ORDENTD member in CODE Designer (Figure 17.32).
Figure 17.32: Moving command key 3 up using Web settings
Expand the Prompt record format.
Select Record Keywords.
Select the Web Settings tab.
Select Key order.
Make sure the Change order and visibility of command keys check box is checked.
Select the CA03 command key in the Display order list box.
Change the Display order by pressing the Up push button.
Now the command key 3 push button will display before the command key 4 push button.
Close CODE Designer and save the ORDENTD member.
Convert the member.
Test the application.
Your screen should look like Figure 17.33.