Book a Demo

Author Topic: Generating HTML from classes  (Read 2877 times)

José Farinha

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Generating HTML from classes
« on: September 02, 2020, 09:06:49 am »
I’m trying to leverage a Java-targeted model I have to generate HTML forms from some classes. For that I added HTML as a new language to the Code Template Editor, created the templates I needed and after changing the ‘language’ of those classes to HTML I manage to have the HTML code I wanted.

The problem is that the code is still being generated into .java files. I have to change their extension to .html every time I regenerate them.

Does anyone know how to get an .html extension? I can't find a way.
Is it that every class gets intrinsically tied to a target language ever since they are created, which determines the file extension? Do I need to generate a new model targeted to HTML?

Thanks for your attention.
José

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Generating HTML from classes
« Reply #1 on: September 02, 2020, 10:38:35 am »
You need to create an MDG technology with a Code Module.

You can also reset the code language for an entire package.

José Farinha

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Generating HTML from classes
« Reply #2 on: September 03, 2020, 09:09:47 am »
Thanks, Eve.

Following your second pointer I manage to solve the problem by clearing the filenames.

Best regards