K2BTools Update Conditional Confirm in Layout

Introduction

In K2BTools 10.1 there was a change in the way confirm actions are generated that requires layout objects to be updated.

K2BTools will automatically update standard layouts (Modern and Flat) but if a developer is using a customized layout (with a different name) the layout must be updated manually.

When a manual update is needed, the following message will appear when applying the instance:

  • If the instance has no actions with Confirm = True: warning: In order to use actions with confirmation you must update layout object <layoutobjectName>
  • If the instance has at least one action with Confirm = True:  error: In order to use actions with confirmation you must update layout object <layoutObjectName>

Also, when developer makes changes in a layout object, if the "ConditionalConfirm" control is not found the following warning will appear: 

warning validating Layout:WWLayoutFlat. TextBlock with control name ConditionalConfirm not found in layout object. 

How to manually update layout objects

The way to solve this problems depends on which UI you are using.  In the following lines we will explain how to update the layouts in both K2BFlat interaction and K2BModern Interaction.

Adding Confirm to layout in K2BFlat interaction

  1. Open the layout object.
  2. Go to the WebForm part.
  3. In the toolbox, select the Textblock control and place it below the "hidden items" Textblock.
  4. Set the control name property to the value "ConditionalConfirm".
  5. Save the layout object and check that no warnings are shown.

AddingConfirmK2BFlat
Layout with "ConditionalConfirm" textblock

Adding Confirm to layout in K2BModern interaction

  1. Open the layout object.
  2. Go to WebForm part.
  3. Select the HTML view.
  4. Search for a div with the id="K2BSectionErrorViewerContainer".
  5. Copy the following text above that div:
    <div id="K2BSection_ConditionalConfirm" class="Section" classref="d4876646-98dd-419b-8c1c-896f83c48368-85">Conditional Confirm</div>
  6. Save the layout object and check that no warnings are shown.

AddingConfirmK2BModernHtml AddingConfirmK2BModernDesign
Html View with conditional confirm Design View width confitional confirm