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.
[ JDK VERSION : 1.5.0_06 ] NetBeans 5.5 Beta + Enterprise Pack Windows XP JDK1.5.0_06 1. In Java DB, Create a table that has primary key as "SMALLINT", another row is also "SMALLINT" 2. Create a Web application project 3. Create Entity class by "Persistence->Entity Classes from Database", use the table 4. Create Persistence Unit for it 5. Create JSF Pages from Entity Class, select the Entity class Now we have "<tablename>Controller.java" and "<tablename>Converer.java" in source directory, these two files contain these codes blow, but it can not compile it by error, public Object getAsObject(FacesContext facesContext, UIComponent uIComponent, String string) { MytableController controller = (MytableController) facesContext.getApplication().getELResolver().getValue( facesContext.getELContext(), null, "mytable"); java.lang.Short id = (java.lang.Short)string; return controller.findMytable(id); } public Mytable getMytableFromRequestParam() { ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext(); HttpServletRequest request = (HttpServletRequest)ec.getRequest(); String param = request.getParameter("key"); java.lang.Short id = (java.lang.Short)param; return em.find(Mytable.class, id); } The compile error happens in java.lang.Short id = (java.lang.Short)string;
I added support for all numeric types in java.lang and for all primitive types (I hope). Checking in src/org/netbeans/modules/web/jsf/wizards/JSFClinetGenerator.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/wizards/Attic/JSFClinetGenerator.java,v <-- JSFClinetGenerator.java new revision: 1.1.2.17; previous revision: 1.1.2.16 done
Thanks! I've verified the fix on 200605220200 Windows.