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 85594 - Insert JSF Form from Palette does not work
Summary: Insert JSF Form from Palette does not work
Status: RESOLVED DUPLICATE of bug 144217
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: _ potingwu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-22 20:35 UTC by jfurmankiewicz
Modified: 2008-11-24 21:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jfurmankiewicz 2006-09-22 20:35:56 UTC
Create new JSF project, create new managed bean in it.

Open the welcomeJSF.jsp page, click on the Palette -> JSF -> JSF Form

The Insert JSF Form dialog appears, select "Form generated from Entity Class"

a) first of all, why does it prompt for class name? It should prompt for managed
bean name as defined in the faces-config.xml file.

b) find my managed bean (by actuall class name), select it. Press OK.

The window flickers and it reappers again! Nothing happened. No code was
generated. No error message either.

you can keep doing this over and over again. Have to press Cancel to get out.
Comment 1 Petr Jiricka 2006-09-22 23:09:44 UTC
First, you are not supposed to select a Java Persistence Entity class, not a
managed bean. When I tried with the managed bean, I can not reproduce - it
generates the following code:

<h2>Detail</h2>
<h:form>
    <h:panelGrid columns="2">
    </h:panelGrid>
</h:form>

Changing priority to P3. Which build are you using and which OS? Can you please
also attach the IDE log? Thanks.
Comment 2 jfurmankiewicz 2006-09-22 23:32:48 UTC
I'm on 5.5 beta, Windows XP SP4, JDK 6.0 Beta 2.

Will attach the log and maybe a sample project on Monday.
Comment 3 Petr Jiricka 2006-09-23 16:38:38 UTC
Can you please see if this still happens in the latest daily build? Many bugs
have been fixed since beta (>500), so this should work now. Thanks.
Comment 4 jfurmankiewicz 2006-09-25 15:45:23 UTC
I downloaded the latest daily build and the insert JSF form now works fine.

However, I have a question : when the form gets generated it puts something
along the lines of:

<h:inputText id="name" value="#{anInstanceOfmyapp.datamodel.Resources.name}"
title="Name" />

But, there seems to be no link between the name of the bean and the managed
beans defined in faces-config.xml, so at runtime I will I get an exception along
the lines of:

Error testing property '<some field name from my bean>' in bean of type null

Shouldn't this wizard automatically create a managed bean entry in
faces-config.xml that matches the name it uses, or should it maybe be changed
altogether to prompt off the list of defined managed beans, instead of entity
classes.

As it stands right now, the wizard generates code that fails at runtime since it
ignores the list of defined (or un-defined) managed beans. It just doesn't seem
like the right way to implement this otherwise very useful feature...
Comment 5 Jiri Prox 2008-04-11 01:13:18 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 6 _ potingwu 2008-11-24 21:24:40 UTC

*** This issue has been marked as a duplicate of 144217 ***