Posts Tagged ‘JSF’

More intelligence for JSF component libraries

Tuesday, March 30th, 2010

Make sure you try the extended JSF components support in the latest IntelliJ IDEA 9.0.2 EAP. Completion, error highlighting and basic refactorings have been added for RichFaces 3.x (a4j and rich) and standard (html and core) component libraries.

Write us about your favorite JSF library and we’ll add support for it asap.

JSF 2.0 Managed Beans in Maia

Tuesday, April 14th, 2009

Maia supports JSF 2.0 annotated Managed Beans with code completion, rename refactoring, usage search, goto declaration, and the others.

Configure JSF Navigation Rules Without Typing

Tuesday, March 17th, 2009

With IntelliJ IDEA you can easily configure navigation rules in faces-config files without making a lot of tedious typing. Just open a faces configuration file, select the Navigation tab, and then drag pages from project tree and drop them to the graph.

Added pages can be linked with mouse — just draw a line from one page to another.

@Named WebBeans (JSR-299) Support in IntelliJ IDEA 9 (Maia)

Wednesday, March 11th, 2009

@Named Web Beans references may be used in Unified EL expressions on a JSP or JSF page. @Named Beans support includes code completion, usage search, rename refactoring, go to declaration, and more.

Find usages of @Named Web Bean in JSF EL:

JSF Application in Just Two Clicks

Thursday, November 23rd, 2006

IntelliJ IDEA Java EE support was beefed up with the very interesting feature. Now you can build a database Web interface in literally a few mouse clicks. Well, okay, at least get yourself a starting point, which is way better that beginning from scratch.


I must note that there are some prerequisites, though:

  1. A Web Module that is used to host the Persistence Unit
  2. Persistence Unit that is used to encapsulate the database access



Details about creating Web modules, Persistence Units and mapping them to various datasources can be found in the IntelliJ IDEA built-in help, under Java EE Support, EJB Support and Web Application Development sections.

After the prerequisites are met, follow this simple step-by-step procedure:

Remember to switch to the Java EE View for performing the steps below

  1. Right-click the Persistence Unit and select Generate Faces Pages

Screenshot

  1. In the Create application files in field type the path where you want to store all the generated files.
  2. In the Create Manage Beans in package specify the package where you want to create the Managed Bean classes.
  3. From the Store facelets configuration list select the JSF configuration file where JSF configuration descriptor will be placed. This list contains all JSF configuration files eligible for the project.
  4. In the Use this suffix for Managed Bean names specify the suffix that is added all generated Managed Bean names.
  5. Select the Create separate subdirectory for each of the entities if you want to create separate folder for each of the entities and place all generated files that are used to access that entity.
    If you clear this option, the Automatically generate page names is selected to prevent from ambigous file names.

After the settings are configured, define what pages you want to generate:

  1. Under the Entity column select what entities you want to generate interface pages for.
  2. Under Edit, View, List, Create columns select what template should be used to generated the data access pages. Note that selecting a template from the column header overrides setting for the entire column.
    Remember that templates can be managed through the File Templates dialog and so you have the option to create the data access pages from your custom templates that contain functionality and layout of your choice.
  3. Under Managed Bean column select template that will be used to generate the Managed Bean code.
  4. Select a tab below the table to examine what code will be generated for each of the pages.
  5. Click Generate.

IntelliJ IDEA generates the specified application files and you can try it by compiling and deploying the module to an application server.


Download the 6.0.2 release of IntelliJ IDEA and try this feature. You may also want to join IntelliJ IDEA EAP and watch the latest improvements and additions.

Technorati tags: , , ,