Skip to content

Some jsf wizards are completely messed up  #7532

@AdolfGalland

Description

@AdolfGalland

Apache NetBeans version

Apache NetBeans 22

What happened

New web application selecting jakarta 10 EE web with jakarta.faces-4.0.4.jar.
"Entity classes from database" wizard is selected.
If Jakarta EE 10 API Library has already been added the imported packages are the correct ones: *jakarta.persistence. **, otherwise they are *javax.persistence. ** and lots of errors are reported.
"JSF pages from entity classes" wizard is selected.
Here are some lines extracted from generated controller class:

import jakarta.faces.bean.ManagedBean;
import jakarta.faces.bean.SessionScoped;
@ManagedBean(name = "badgeController")
@SessionScoped

Non existent packages and deprecated annotations are inserted

Controller code not compatible with generated jsf pages:
public String next() { getPagination().nextPage(); recreateModel(); return "List"; }

<h:commandLink action="#{badgeController.next}"

next is not a property, so its should be next()
In generated jsf pages most functions are called as they were properties so there are runtime errors.

Language / Project Type / NetBeans Component

No response

How to reproduce

Use the wizards and check produced code

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 11 pro

JDK

openjdk version "17.0.4.1"

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Java EE/Jakarta EE[ci] enable enterprise jobkind:bugBug report or fixneeds:triageRequires attention from one of the committers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions