intersystems-cacheintersystemsobjectscriptintersystems-cache-studiointersystems-cache-zen

Updating a form generated by a wizard based on a class


I'm following the tutorial here. I created my data class and added a name property using the wizard. I then created a zen form using the wizard, during which I selected the data class created above. Everything worked great. However, I went back and added an additional property, longName to my data class. Now, since it's over 300 lines of generated code I am assuming there is some way to regenerate it based on the updated class but I cannot figure out how.

I did end up copying the line below from the XData Contents section and modifying the values. It seems to work well but my question remains, is there some way to regenerate the form based on the updated class?

<text id="Name"  label="Name *" title="Enter a value" size="50" dataBinding="Name" height="23" />

Solution

  • Can you point to exact part of tutorial? Is it Zen Form Wizard? If so just regenerate the form class (you don't need to delete it beforehand).

    UPD. As you use Zen Form Wizard, you can call it programmatically via:

    do ##class(%ZEN.Template.ZENFormWizard).CreatePage(dataClassName, appName, pkgName, newClassName, formName, cssNames, clsComment)