Convert to WebPanelDesigner

Introduction

Many times, legacy KBs contain WorkPanels or WebPanels that were created manually. In these cases, the developer may want to migrate these Panels to be maintained using WebPanelDesigner, and thus take advantage of the features included with this tool.

To do this, an automated tool was created by K2BTools to help a developer converting a Panel to the designer. Panels developed without using K2BTools, can contain innumerable scenarios, so this tool is heuristic, meaning that it will not always convert exactly a WebPanel to the Designer and that the developer should check the new WebPanel and adjust the panel's behaviour. We believe that this tool will help developers in migration of legacy webpanels to K2BTools.

Usage

  1. In the folder view, select the Panel to be converted (it should not be using the designer already).
  2. In the contextual menu select the "Converto To Web Panel Designer" action.
  3. Wait until the convertion process is finished.
  4. Open the WebPanel
  5. Run the webpanel and make the customizations needed, so that it has the desired behavior.

K2BToolsToWebPanelMigrationTool
WebPanel conversion to designer process

MSBuild tasks

ConvertToWebPanelDesigner task

This tool can be called using a MSBuild task, called in ConvertToWebPanelDesigner and defined in the file <GX_Install_Dir>\Packages\K2BToolsBuild.Tasks.targets.

This task accepts these parameters:

  • ObjectsList: this parameter accepts a comma separated list of object qualified names.
  • ObjectListFile: this parameter accepts a file path. The file referenced in this parameter will be processed as follows:
    • Lines starting with "//" will be skipped (you can use this to add comments)
    • Other lines will be treated as a comma separated list of qualified names (just as the ObjectsList parameter).

Sample

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(GX_PROGRAM_DIR)\GeneXus.Tasks.targets" />
  <Import Project="$(GX_PROGRAM_DIR)\Packages\K2BToolsBuild.Tasks.targets" />

  <Target Name="Build" DependsOnTargets="OpenKnowledgeBase;">
    <ConvertToWebPanelDesigner ObjectsListFile="C:\temp\panelList.txt" />
  </Target>

  <Target Name="OpenKnowledgeBase">
    <OpenKnowledgeBase Directory="C:\Models\<KbName>" />
  </Target>
</Project>

CanConvertToWebPanelDesigner task

This task can help diagnose the KB, finding the list of web panels in a KB that can be converted to Web Panel Designer. Panels are considered as convertible when:

  1. It is not a Master Page
  2. It is not a Basic or Dynamic Layout
  3. It is not generated by one of K2BTools' patterns.
  4. It is not generated using Web Panel Designer already.