We will now add the two push buttons and their associated events and logic.
Follow these steps:
This brings up another interesting topic. Where should this type of validation be performed? Should it be in the client procedure step, as we are about to put it? Should it be in the server procedure step? Alternatively, more likely, should it be in the elementary process?
If you want the same business rule to apply regardless of who performs the transaction, or where, when or how the transaction is performed, then you would probably want the validation to be in the elementary process. If the rules can vary for any of the reasons specified earlier, then you will likely want the rules in the client procedure step.
For example, in this particular case we are allowing golfers to register themselves online. When the golfers do that, we do not want them to enter their password incorrectly, so we make them enter it twice. But we can also have a batch procedure in which we get feeds from local golf clubs, pro shops, and sporting goods stores where we set up prospects with some common password, like their last name, or the store name from which we got the feed, and then email them and invite them to login, change their password, and enter their scores. We can set the password differently depending on how we set them up. In such a case, it would make more sense to place the validation rules in the different procedure steps, online versus batch. We are going to put the check here in the client procedure.
In the procedure step action diagram, from the Tool Palette select the If push button and with the cursor (which now resembles a crosshair), select the event handler EVENT ACTION egolfer_reg_pb_next_click. Then in the Add Statement panel, select the expression attribute view, select the entity view import golfer, select the attribute password, select the operator IS EQUAL TO, select the expression character view, select the entity view import confirmation golfer, and then select the Add push button.
Copyright © 2013 CA.
All rights reserved.
|
|