Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6828763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:25:16+00:00 2026-05-26T22:25:16+00:00

One of the most awesome features of Netbeans is to generate code using some

  • 0

One of the most awesome features of Netbeans is to generate code using some FreeMarker templates. I have some questions about it, I hope someone here can help me.

How can I make a template on Netbeans that generates more than just 1 file?

For example, I use the “JSF Pages From Entity Beans” wizard to generate CRUD files. So it creates automatically 4 files for each entity I have:

- Create.xhtml
- Edit.xhtml
- List.xhtml
- View.xhtml

This is very useful, because you often needs to create, edit, list or view some records from your database. So I know I can edit each template individually by clicking on Tools -> Templates -> JavaServer Faces -> JSF entity -> View.xhtml. And then I can change the way View.xhtml is generated. Then a FTL file is created on “C:\Users\yourname\.netbeans\6.9\config\Templates\JSF\JSF_From_Entity_Wizard\view.ftl”.

But I want more, I need also a Search page. My question is how can I make or change a template like “JSF Pages From Entity Beans” that generates not only 1 file, but 4 for each entity. So I can change this template to generate 5 files:

- Create.xhtml
- Edit.xhtml
- List.xhtml
- View.xhtml
- Search.xhtml (for example)

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:25:17+00:00Added an answer on May 26, 2026 at 10:25 pm

    You could create your own project template. Here’s some instructions for doing that:

    http://netbeans.dzone.com/tips/hack-your-own-custom-project-t

    So, you could create a new project and use the “JSF Pages From Entity Beans” wizard and then add your own files. Then you would follow from step 2 of the above link and create the template.

    Edit After giving this some more thought I think that what you’re really looking for is creating a File Template Module:

    http://platform.netbeans.org/tutorials/60/nbm-filetemplates.html

    Edit 2: Based on your comment I’m posting a url to Geertjan’s blog for a short description on how to create multiple files from a single wizard*. However, after more reflection I understand that this is also not what you want. What you really want is the ability to add another file to an existing wizard (JSF from Entity). This is of course possible but not as simple as creating your own wizard as the only way to do such a thing is to modify the source code for that particular module (JSF Support).

    *Understand that the above tutorial is showing only a snippet of how to create your own New File wizard. There are a few aspects that are assumed to be understood already and not discussed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of the most common dilemmas I have when commenting code is how to
One of the most difficult things about understand Spring is that Spring supports multiple
One of the most appealing features of Ext-JS is the Grid control in my
I have recently downloaded the most recent build of this awesome tool WSDL2OBJC from
I have code which issues many HTTP GET requests using Python's urllib2, in several
I have 10 textfields, each of which could hold at most one character. When
I cannot find comparison of these parsing technique. Which one is most commonly used?
one of the most frequent requests I get is to create XY report for
One of the most powerful things of jQuery is to select any item on
This is one of the most used Regex functions Regex.IsMatch(Test text for regex test.,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.