This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 203986 - JSF Pages from Entities wizard issues
Summary: JSF Pages from Entities wizard issues
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal with 1 vote (vote)
Assignee: Martin Fousek
URL:
Keywords:
: 204613 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-19 22:58 UTC by rarchibald
Modified: 2012-07-23 06:49 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rarchibald 2011-10-19 22:58:24 UTC
To help improve adoption of Java EE, the wizards should be a good place to start.  However, they need to be updated to use the new features.  

1.  Use h:link instead of h:CommandLink for menu items that aren't using POST - most notably the index.xhtml page that the wizard creates.  I spent hours trying to understand why I couldn't get the security to work. Finally ran into the solution posted at http://stackoverflow.com/questions/7089120/jsf-2-0-change-default-behaviour-from-page-forward-to-page-redirect.  

2.  Use CDI - the backing beans should be @Named instead of @ManagedBean.
Comment 1 Martin Fousek 2011-10-20 06:31:29 UTC
Thanks for raising this enhancement. Both points you mentioned are about project capabilities. Nr.1 is JSF2.x dependent and Nr.2 requires project with enabled CDI.

But I has to agree that both objections should be implemented to stay up-to-date. I targeted that for next release.
Comment 2 rarchibald 2011-10-20 17:39:09 UTC
(In reply to comment #1)
> Thanks for raising this enhancement. Both points you mentioned are about
> project capabilities. Nr.1 is JSF2.x dependent and Nr.2 requires project with
> enabled CDI.
> 
> But I has to agree that both objections should be implemented to stay
> up-to-date. I targeted that for next release.

Thank you for the quick response and putting it on the roadmap.
Comment 3 Martin Fousek 2011-11-03 16:36:21 UTC
*** Bug 204613 has been marked as a duplicate of this bug. ***
Comment 4 Martin Fousek 2012-03-12 13:01:27 UTC
I started to working on that ...

> 1.  Use h:link instead of h:CommandLink for menu items that aren't using POST -
> most notably the index.xhtml page that the wizard creates.  I spent hours
> trying to understand why I couldn't get the security to work. Finally ran into
> the solution posted at
> http://stackoverflow.com/questions/7089120/jsf-2-0-change-default-behaviour-from-page-forward-to-page-redirect.

At lease all simple links are replaced by h:link tag in web-main #205eb701516a.

> 2.  Use CDI - the backing beans should be @Named instead of @ManagedBean.

I started to working on that but I hit troubles by getting information if the project has CDI enabled or not, will be resolved soon as well.
Comment 5 Martin Fousek 2012-03-12 13:56:23 UTC
Ok, so the CDI beans are generated instead of ManagedBean in CDI capable projects since:
web-main #7e1de621897

So both requests seem to be fixed.
Comment 6 Quality Engineering 2012-03-13 14:06:22 UTC
Integrated into 'main-golden', will be available in build *201203130400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/205eb701516a
User: Martin Fousek <marfous@netbeans.org>
Log: #203986 - JSF Pages from Entities wizard issues; fixed static links
Comment 7 Martin Fousek 2012-07-23 05:42:58 UTC
Finally the replacing of @ManagedBean by @Named annotation will be removed in patch1 of NetBeans 7.2 since it causes troubles in case of joined tables, see issue #203986 for more details. So CDI technologies can probably take a place after bundling next JSF version earliest again.