Enum in JSF 1.2_06 - EnumConverter Bug

Hi,
I have a Enum as such :
public enum ComponentType {
     AJAX_SUPPORT { public String toString(){ return "Ajax Support";} },
     INPUT_TEXT { public String toString(){ return "Input Text";}},
     OUTPUT_TEXT { public String toString(){ return "Output Text";}},
     PANEL_GRID { public String toString(){ return "Panel Grid";}},
     PANEL_GROUP { public String toString(){ return "Panel Group";}},
     PANEL { public String toString(){ return "Panel";}},
     SELECT_ONE_MENU { public String toString(){ return "Select One Menu";}},
     SELECT_ITEM { public String toString(){ return "Select Item";}}
}when i put the Enum Values in datatable as such :
<h:dataTable var="component" value="#{bean.allComponentTypes}">
                         <h:column>
                         </h:column>
</h:dataTable>
i get an exception as follows :
javax.faces.convert.ConverterException: j_id1:j_id3:0:j_id8: 'Ajax Support' must be convertible to an enum from the enum, but no enum class provided.
     at javax.faces.convert.EnumConverter.getAsString(EnumConverter.java:195)
     at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getFormattedValue(HtmlBasicRenderer.java:447)
     at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:286)
     at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
     at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:849)
     at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286)
     at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
     at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:825)
     at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234)
     at com.sun.faces.renderkit.html_basic.TableRenderer.renderRow(TableRenderer.java:312)
     at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:133)
     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:825)
     at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
     at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
     at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
     at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
     at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:825)
     at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234)
     at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:178)
     at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:126)
     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:825)
     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
     at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:825)
     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
     at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
     at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
     at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
     at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
     at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
     at com.bipt.tiva.interceptor.SessionFilter.doFilter(SessionFilter.java:45)
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
     at org.springframework.webflow.executor.jsf.FlowSystemCleanupFilter.doFilterInternal(FlowSystemCleanupFilter.java:40)
     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:766)
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:674)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
     at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
     at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
     at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
     at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
     at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)This was not a problem when i used JSF 1.1 MyFaces
So what gives ?
Any knowledge on this would be helpful..

Ok ok i got the answer
if i change my Enum into :
public enum ComponentType {
     AJAX_SUPPORT("Ajax Support"),
     INPUT_TEXT ("Input Text"),
     OUTPUT_TEXT ("Output Text"),     
     private String text;
       ComponentType(String text) {
       this.text = text; }
       public String toString(){
            return text;
}then it works......
but i still don't see a reason why the first approach should fail.

Similar Messages

  • JSF 1.2_06 failed hard where MyFaces 1.2.1 issued a warning  0 : 1 for My F

    Using
    JSF 1.2_06 RI
    Facelets 1.1.14
    richfaces-ui-3.1.2.SP1.jar
    richfaces-impl-3.1.2.SP1.jar
    richfaces-api-3.1.2.SP1.jar
    Websphere 6.1.013 JDK 5 impl J2EE 1.4 spec
    before you say that it's not jsf 1.2, it's RichFaces, i already verified this and no it's not richFaces that cause this
    Error Rendering View[/quote/quote.xhtml]
                                     java.lang.NullPointerException
         at org.richfaces.renderkit.TabPanelRendererBase.encodeTabs(TabPanelRendererBase.java:327)
         at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeBegin(TabPanelRenderer.java:227)
         at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeBegin(TabPanelRenderer.java:180)
         at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:801)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934)
         at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:825)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
         at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
         at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
         at com.bipt.tiva.interceptor.SessionFilter.doFilter(SessionFilter.java:45)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
         at org.springframework.webflow.executor.jsf.FlowSystemCleanupFilter.doFilterInternal(FlowSystemClea
    nupFilter.java:40)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
         at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:766)
         at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:674)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
         at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:4
    54)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:3
    83)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.
    java:165)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
         at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
         When i Replaced it with MyFaces 1.2.1-snapshot
    i got :
    UIComponentBa W javax.faces.component.UIComponentBase getClientId WARNING: Component j_id72 just got an automatic id, because there was no id a
    ssigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from t
    he current UIViewRoot component right after creation! Path to Component: {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /policy/customer/view.xhtml][Class: j
    avax.faces.component.html.HtmlPanelGrid,Id: j_id25][Class: javax.faces.component.html.HtmlOutputText,Id: j_id72]}While it sure might be my fault for not knowing the JSF 1.2 spec from A to Z it does not help when the Implementation craps out with an ambiguous exceptions.
    MyFaces got my vote on this one...

    I could be really mean right now in my answer.
    I did not even have to post anything, i choose to use MyFaces 1.2.1 and scraped JSF 1.2_06 SUN RI out of my projects lib folder.
    Sorry dude that's the reality, the exceptions the SUN RI threw does not help me in trying to work on real life applications.
    You know i have read that Sun RI implementation is probably best out there since work began on the 1.2 spec way before Apache MyFaces started, hence potentially less buggy.
    I picked up the latest code from SUN RI and encountered at least 3 exceptions that are very low level and hard to mitigate.
    While without any JSF pages modifications i plugged in MyFaces 1.2.1-Snapshot and not a single NullPointerException or a failure.
    I just want to reflect here on this situation because i have been always defending SUN and it's work against other packages
    but my situation with upgrading from 1.1 to JSF 1.2 really puts a dent in my conviction
    specially where UI is such a risky business for us developers in the Web industry.
    this Forum probably is taking me longer then if i just logged the issue against RI.
    But my point is that when such frameworks are being developed they should be tested against real large applications under many industry problems.
    I am after getting this point across, because right now i don't care if you these exceptions are being fixed i dumped your packages anyway.
    Now i know MyFaces have their own problems, but at this moment they are not my issues, my project works using their implementation and that's the story .

  • Does Oracle's implementation of JSF have this published bug?

    re: jsf with filter crashes when link to static html link is clicked.
    I also posted this on Sun's JSF forum and got a reply that said it sounded like this bug:
    https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=146
    Does Oracle know whether or not this bug is in their implementation of JSF?
    Regards,
    Al Malin

    Steve,
    I have determined that, with the JDev supplied JSF libs, a jsf with filter crashes when an invalid static html link is clicked.
    Replacing jsf-api.jar and jsf-impl.jar with the ones from JSF 1.1_02, my app did not crash. Instead it correctly displayed a 404 Not Found page.
    After restoring the jars and correcting the static link paths in the jsp, the links worked properly.
    What a way to discover a coding error!
    Al

  • EnumConverter in JSF 1.2

    It is my understanding that JSF 1.2 has a built in EnumConverter class. The typical case where this would be used would be in a drop down select list. However, I cannot get this to work.
    Example Enum
    public enum VehicleType {
         CAR, TRUCK, VAN;
    }Example Bean Using The Enum
    public class VehicleBean {
         public VehicleType getType() {
              return type;
         public void setType(VehicleType type) {
              this.type = type;
         public List<SelectItem> getTypeOptions() {
              List<SelectItem> typeOptions = new ArrayList<SelectItem>();
              for (VehicleType vtype : VehicleType.values()) {
                   typeOptions.add(new SelectItem(vtype.ordinal(), vtype.toString()));
              return typeOptions;
    }Example JSF Page
    <h:selectOneMenu value="#{vehicleBean.type}">
         <f:selectItems value="#{vehicleBean.typeOptions}"/>
    </h:selectOneMenu>When I run my application, the select list gets populated okay, but on submit I get an error like follows:
    '0' must be convertible to an enum from the enum that contains the constant '0'I've played around with using different getTypeOptions methods, including one like shown that returns List<SelectItem>, and also alternate versions that returned Map<String, VehicleType> or Map<String, Integer>, but have yet to figure it out. My personal thought is that an EnumConverter would be best if it converted off of the ordinal value, but the above example does just (the actual rendered input field has a value set equal to the ordinal value of the enum), but still results in an error.
    What am I missing here? How does the JSF 1.2 EnumConverter work? It is automatic isn't it -- I don't have to explicitly specify the converter when an enum is used?
    PS: Is there any good JSF documentation online? I have yet to find any.

    Why doesn't the <f:selectItem> use the enum converter automatically? Why do I have to create a List<SelectItem> for every enum that I have? Why can't I do this?...
    <h:selectOneMenu
    value="#{commandsBean.uiCommand.command.timeoutUnit}"
    label="Time Unit for Timeout"
    >
    <f:selectItem itemLabel="seconds" itemValue="#{TimeUnit.SECONDS}"/>
    <f:selectItem itemLabel="minutes" itemValue="#{TimeUnit.MINUTES}"/>
    <f:selectItem itemLabel="hours" itemValue="#{TimeUnit.HOURS}"/>
    </h:selectOneMenu>
    ...where commandsBean.uiCommand.command.timeoutUnit is a java.util.concurrent.TimeUnit. Or better yet...
    <h:selectOneMenu
    value="#{commandsBean.uiCommand.command.timeoutUnit}"
    label="Time Unit for Timeout"
    >
    <f:selectItems value="#{TimeUnit}"/>
    </h:selectOneMenu>

  • JSF 1.2 DataTable management during view creation

    Hi all, I have a question on how JSF 1.2 manages DataTable exactly. Consider this table (suppose that tableList.persone has 3 items):
    <h:dataTable id="tablePersone" value="#{tableList.persone}" var="item">
    <h:column>
              <f:facet name="header">
              <h:outputText value="STATO" />
              </f:facet>
              <h:inputText value="#{item.stato}" />
         </h:column>
         <h:column>
              <f:facet name="header">
              <h:outputText value="CODICE" />
              </f:facet>
              <h:inputText value="#{item.codice}" />
         </h:column>
    </h:dataTable>
    I read that jsf iterates over the items of the list during the render response phase, in fact, "item" is not available when the view is built.
    Does it means that jsf does not duplicate the content of the table for each item in the list when creating the tree component?
    In the table above, each row has 2 inputText. If jsf does not create a couple of inputText objects for each row, how jsf handles all the 6 request parameters when the form is submitted (in particular during the apply request values phase).
    Thanks a lot,
    Nico

    I could be really mean right now in my answer.
    I did not even have to post anything, i choose to use MyFaces 1.2.1 and scraped JSF 1.2_06 SUN RI out of my projects lib folder.
    Sorry dude that's the reality, the exceptions the SUN RI threw does not help me in trying to work on real life applications.
    You know i have read that Sun RI implementation is probably best out there since work began on the 1.2 spec way before Apache MyFaces started, hence potentially less buggy.
    I picked up the latest code from SUN RI and encountered at least 3 exceptions that are very low level and hard to mitigate.
    While without any JSF pages modifications i plugged in MyFaces 1.2.1-Snapshot and not a single NullPointerException or a failure.
    I just want to reflect here on this situation because i have been always defending SUN and it's work against other packages
    but my situation with upgrading from 1.1 to JSF 1.2 really puts a dent in my conviction
    specially where UI is such a risky business for us developers in the Web industry.
    this Forum probably is taking me longer then if i just logged the issue against RI.
    But my point is that when such frameworks are being developed they should be tested against real large applications under many industry problems.
    I am after getting this point across, because right now i don't care if you these exceptions are being fixed i dumped your packages anyway.
    Now i know MyFaces have their own problems, but at this moment they are not my issues, my project works using their implementation and that's the story .

  • (CentOS5) huge display bugs with jdeveloper

    hello,
    I have CentOS5 (like RHEL5 but free) and I have installed compiz and emerald on it.
    I downloaded jdeveloper (file : jdevstudio11114install.bin) and the installation is a success, but when I launch it the menus, the toolbars and the visual JSF editor have some bugs : they are not displayed well, and when I hover on an element with the mouse , sometimes it appears.
    I can't use this program in this state.
    is it causes by compiz?
    can you help me?

    Hi,
    you should use the JAR installer for JDeveloper and ensure you have a decent Java SDK for your OS.
    Frank

  • Creator 2 update

    Finally some updates have been released. But there's one problem: where can find any info about those updates??? nothing appears when I download them in Creator, nothing on Sun pages! I only know that it is a fix for design and run-time modules...

    Hi
    Actually we have updates for both versions of creator. Here is the list of bugs that has been posted for Creator 2.0 up to the second release which should be posted to the website soon. The third release will be updated next week on the webpage.
    InSync Source Modeler
    Fixes bug 6377210 - DataProviders lose Rowset definition if defined on
    SessionBean. (Date 02/22/06)
    J2SE Project
    Fixes bug 6382465 - JDK version 1.5 could erroneously get set for a Java
    Library. (Date 02/22/06)
    JSF Loader Support
    Fixes bug 6379265 - Save as JSP page as Template was not working.
    (Date 02/22/06)
    Sun Web UI Components Runtime
    Fixes bug 6388424 portlet apps requires manual workaround for web apps.
    (Date 02/22/06)
    Fixes bug 6377769 - If a Validation error occurs, the values in a
    Table's TextField are cleared. (Date 02/22/06)
    Fixes bug 6378261 � Renderer emits onload and onunload JavaScript
    functions in body tag for focus even though focus property wasn't set.
    (Date 02/10/06)
    Sun Web UI Components Designtime
    Fixes bug 6371691 � Binding components to message bundle properties file
    fails at design time, making it difficult to create localized web
    applications. (Date 02/10/06)
    As for Creator 1.0 the following fix was provided:
    Fixes bug 6388710 - Deployment of Web Applications containing Page
    Fragments fails for 1.3 version Servers.
    Thanks
    Mario

  • Bug in JSF 1.2 RI using in JDev 11g

    Hi,
    We have found a bug in the JSF RI version used by JDev 11g TP2:
    In com.sun.faces.application.ApplicationImpl.createValidator, a MessageFormat is created using an erroneous pattern : created validator of type ''{0''}. This method is called by oracle.adfinternal.view.faces.util.rich.ConverterValidatorRegistrationUtils.addValidatorById. So, when the logging level is set to FINE, this crashes our application.
    FYI, this seems to be corrected in the last version (1.2_06) of the JSF RI.
    We tried replacing the jsf-api.jar and jsf-ri.jar files in lib\java\shared\oracle.jsf\1.2 with that new version but we are getting compilation errors in our JSPs.
    Before we spend time trying to do that, can you please tell me if that sounds like the right thing to do (or if there is another solution). Also, can you please confirm that the subsequent versions of JDev will include a corrected version of the JSF RI.
    Thanks.
    Olivier

    Hi,
    the right place is JDeveloper/jsf-ri for JDeveloper. I'll file a bug
    Frank

  • BUG - JSF InputText boxes not populating properly

    Okay,
    Here's the situation:
    I have an edit page (JSF Web) that allows the user to pick an item to edit from a SelectOneMenu tag. When they pick the item the page rerenders and shows the object associated with the selected item allowing the user to edit the object in various InputText controls.
    First of all the ValueChangeListener event doesn't work for the SelectOneMenu tag - the event is not recognized in the backing bean (with or without immediate set, the event code is never accessed.) - and so I had to tie the change to the pressing of a command button.
    Upon pressing the command button, in the action event, I find the object from the selected item. Now I want to set the input text boxes in the screen to the various values of the object. There are two ways to do this. I either set the value property of the bound (using the binding property) backing bean to the objects property - the code looks like this:
    <h:inputText binding="#{EditCalendarBean.name}"
    value="#{EditCalendarBean.name.value}"/>
    This results in a fatal error that halts the OC4J.
    Alternatively; I added various properties to the backing bean one for each property of the object and bound the object's properties to these and then bound the user interface's value properties to the bean properties. For example, imagine a user interface control InputText tag called "name" has it's value property bound to a property on the bean called Name which returns String. This configuration runs but the InputText control when the page is re-rendered (after the submit), is empty even though I've set the value property. However, if I add an OutputText control to the page and bind it's value property to the same String property of the bean, the outputText control correctly shows the value of the object.
    The code looks like this:
    <!-- code in the page -->
    <h:inputText id="name" binding="#{EditCalendarBean.name}"
    value="#{EditCalendarBean.nameValue}"/>
    // Code in the Backing bean:
    // Find the Bean from the submitted id from the SelectMenuTag.
    CalendarData data = manager.getCalendarById(calendarID) ;
    // Set value of the UITextInput components on the page.
    this.getName().setValue(data.getName());
    this.getDescription().setValue(this.getDescription());
    // This results in a fatal error that halts the OC4J
    // Method 2: declare two String properties on the bean and set them
    // Then, in the page use the Value property of the InputText control.
    // This runs but doesn't populate the controls. It does populate them if
    // the contols are OutputText controls though!!!
    this.setNameValue(data.getName());
    this.setDescriptionValue(data.getDescription());
    Best regards,
    Nigel

    Yes - this really is a bug. Any changes to make to the selectItems tag through the properties dialog rewrites the tag source code to seperate the selectOne tag and the selectItems tag. For example, before you use the dialog, you tag code could look like this:
    <h:selectOneMenu binding="#{backing_showFactory.selectOneMenu1}"
    id="selectOneMenu1">
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems2}"
    id="selectItems2"/>
    </h:selectOneMenu>
    After the use of the dialog the code will be rewritten as:
    <h:selectOneMenu binding="#{backing_showFactory.selectOneMenu1}"
    id="selectOneMenu1"/>
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems2}"
    id="selectItems2"/>
    Notice, the tags are now seperated instead of the selectItems tag being encased in the selectOneMenu tag.

  • Bug in JSF 2?

    I'm creating a fairly simple application using Weld and JSF2, running on Glassfish v3. However I have run into a problem which I can't get my head around. On one page I have a search field, which the result populates a h:selectOneMenu. From the h:selectOneMenu it should then be possible to select one of the results. This is were I get an error (or lack thereof, so to speak). The second request never reaches my RequestScoped bean, which I find odd.
    I have created a very simple example to illustrate. The behavior I would expect, is the search field to be populated in the h:selectOneMenu, and then the value selected here shown in the bottom line.
    If I change the bean to return a populated list for #{imTheBean.searchResult} on the first render, I'm able to submit just fine. Which is the behavior I was expecting from my example, but doesn't seem to work because I'm dynamically populating the searchResult..
    <h:messages /> outputs: "searchform:searchResult: Validation Error: Value is not valid". Nothing shows in the glassfish log..
    Am I doing something wrong, or is this a bug somewhere?
    JSF page:
    <?xml version="1.0" encoding="UTF-8"?>
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:h="http://java.sun.com/jsf/html">
        <h:messages/>
        <h:form id="searchform" styleClass="as_form">
            <h:inputText id="search" value="#{imTheBean.searchString}"/>
            <h:commandButton id="searchbutton" value="Search" action="#{imTheBean.doSearch}"/>
            <br/>
            <br/>
            <h:selectOneMenu id="searchResult" value="#{imTheBean.selectResult}">
                <f:selectItems value="#{imTheBean.searchResult}"/>
            </h:selectOneMenu>
            <h:commandButton id="selectButton" value="Select" action="#{imTheBean.doSelectResult}"/>
        </h:form>
        <br/>
        <br/>
        You selected #{imTheBean.selectedResult}
    </ui:composition>Bean:
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.List;
    import javax.enterprise.context.RequestScoped;
    import javax.inject.Named;
    * ImTheBean.
    @RequestScoped
    @Named
    public class ImTheBean implements Serializable {
        private static final long serialVersionUID = -6412703392546135760L;
        private String searchString;
        private List<String> searchResult;
        private String selectResult;
        private String selectedResult;
        public void doSearch() {
            searchResult = new ArrayList<String>();
            searchResult.add(searchString);
        public void doSelectResult() {
            selectedResult = selectResult;
        public String getSearchString() {
            return searchString;
        public void setSearchString(String searchString) {
            this.searchString = searchString;
        public List<String> getSearchResult() {
            return searchResult;
        public void setSearchResult(List<String> searchResult) {
            this.searchResult = searchResult;
        public String getSelectedResult() {
            return selectedResult;
        public void setSelectedResult(String selectedResult) {
            this.selectedResult = selectedResult;
        public String getSelectResult() {
            return selectResult;
        public void setSelectResult(String selectResult) {
            this.selectResult = selectResult;
    }

    This is a vague error that has existed for a long time, also in JSF 1.x. If you search on that specific error in google you'll get many cries for help, with solutions.
    Among other possibilities, it can happen when the list you use to fill the oneSelectMenu has different values on the postback; if the value that was selected in the menu does not exist in the backing list on the post back, you'll get this error.
    Also check BalusC's reply in this thread:
    [http://forums.sun.com/thread.jspa?forumID=427&threadID=5305443|http://forums.sun.com/thread.jspa?forumID=427&threadID=5305443]

  • BUG JSF h:dataTable with JDBC ResultSet - only last column is updated

    I tried to create updatable h:dataTable tag with three h:inputText columns with JDBC ResultSet as data source. But what ever I did I have seceded to update only the last column in h:dataTable tag.
    My JSF page is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1250"/>
    <title>Stevan</title>
    </head>
    <body><h:form>
    <p>
    <h:messages/>
    </p>
    <p>
    <h:dataTable value="#{tabela.people}" var = "record">
    <h:column>
    <f:facet name="header">
    <h:outputText value="PIN"/>
    </f:facet>
    <h:inputText value="#{record.PIN}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Surname"/>
    </f:facet>
    <h:inputText value="#{record.SURNAME}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:inputText value="#{record.NAME}"/>
    </h:column>
    </h:dataTable>
    </p>
    <h:commandButton value="Submit"/>
    </h:form></body>
    </html>
    </f:view>
    My java been is:
    package com.steva;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class tabela {
    private Connection conn;
    private ResultSet resultSet;
    public tabela() throws SQLException, ClassNotFoundException {
    Statement stmt;
    Class.forName("oracle.jdbc.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "hr", "hr");
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    resultSet = stmt.executeQuery("SELECT PIN, SURNAME, NAME FROM PERSON");
    public ResultSet getPeople() {
    return resultSet;
    I have instaled “Oracle Database 10g Express Edition Release 10.2.0.1.0” – product on my PC localy. I have enabled HR schema and I have instaled and pupulated with sample data folloving table:
    CREATE TABLE "PERSON"
    (     "PIN" VARCHAR2(20) NOT NULL ENABLE,
         "SURNAME" VARCHAR2(30),
         "NAME" VARCHAR2(30),
         CONSTRAINT "PERSON_PK" PRIMARY KEY ("PIN") ENABLE
    I have:
    Windows XP SP2
    Oracle JDeveloper Studio Edition Version 10.1.3.1.0.3894
    I am not shure why this works in that way, but I think that this is a BUG
    Thanks in advance.

    Hi,
    I am sorry because of formatting but while I am entering text looks fine but in preview it is all scrambled. I was looking on the Web for similar problems and I did not find anything similar. Its very simple sample and I could not believe that the problem is in SUN JSF library. I was thinking that problem is in some ResultSet parameter or in some specific Oracle implementation of JDBC thin driver. I did not try this sample on any other platform, database or programming tool. I am new in Java and JSF and I have some experience only with JDeveloper.
    Java been(session scope):
    package com.steva;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class tabela {
    private Connection conn;
    private ResultSet resultSet;
    public tabela() throws SQLException, ClassNotFoundException {
    Statement stmt;
    Class.forName("oracle.jdbc.OracleDriver");
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:xe", "hr", "hr");
    stmt = conn.createStatement
    (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    resultSet = stmt.executeQuery("SELECT PIN, SURNAME, NAME FROM PERSON");
    public ResultSet getZaposleni() {
    return resultSet;
    JSF Page:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1250"/>
    <title>Stevan</title>
    </head>
    <body><h:form>
    <p>
    <h:messages/>
    </p>
    <p>
    <h:dataTable value="#{tabela.zaposleni}" var = "record">
    <h:column>
    <f:facet name="header">
    <h:outputText value="PIN"/>
    </f:facet>
    <h:inputText value="#{record.PIN}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Surname"/>
    </f:facet>
    <h:inputText value="#{record.SURNAME}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:inputText value="#{record.NAME}"/>
    </h:column>
    </h:dataTable>
    </p>
    <h:commandButton value="Submit"/>
    </h:form></body>
    </html>
    </f:view>

  • BUG JSF Select Item not binding properly

    Dear Oracle,
    I'm running JDeveloper 10g version 10.1.3.0.3.3412 early access 1. If you create a HTMLMenu1 select list in a JSF Page and use the properties dialog to bind the values to a backing bean, the binding get's lost and the page doesn't call the value binding. What's more, if you try to rebind the values using the dialog, JDeveloper repeatedly inserts a new SelectItems tag for the menu.
    For example, if you create the SelectMenu1 and then use the dialog to bind the selectItems to a backing bean property, you will end up with code something like this:
    <h:selectOneMenu binding="#{backing_showFactory.selectOneMenu1}"
    id="selectOneMenu1"
    valueChangeListener="#{backing_showFactory.selectFactoryEvent}"/>
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems1}"
    id="selectItems1"/>
    Now, click on the newly created menu item in the design window of the JSP editor and bring up the properties dialog. You will see that the value binding is blank. If you reenter the value binding information, JDeveloper creates a new tag so you end up with the following:
    <h:selectOneMenu binding="#{backing_showFactory.selectOneMenu1}"
    id="selectOneMenu1"
    valueChangeListener="#{backing_showFactory.selectFactoryEvent}"/>
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems2}"
    id="selectItems2"/>
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems1}"
    id="selectItems1"/>
    Each time you repeat the process, JDeveloper creates another tag:
    <h:selectOneMenu binding="#{backing_showFactory.selectOneMenu1}"
    id="selectOneMenu1"
    valueChangeListener="#{backing_showFactory.selectFactoryEvent}"/>
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems3}"
    id="selectItems3"/>
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems2}"
    id="selectItems2"/>
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems1}"
    id="selectItems1"/>
    Either way, if you clean up the JSF page with the spurious tags, the value binding (in the example above backing_showFactory.allFactories), is never called.

    Yes - this really is a bug. Any changes to make to the selectItems tag through the properties dialog rewrites the tag source code to seperate the selectOne tag and the selectItems tag. For example, before you use the dialog, you tag code could look like this:
    <h:selectOneMenu binding="#{backing_showFactory.selectOneMenu1}"
    id="selectOneMenu1">
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems2}"
    id="selectItems2"/>
    </h:selectOneMenu>
    After the use of the dialog the code will be rewritten as:
    <h:selectOneMenu binding="#{backing_showFactory.selectOneMenu1}"
    id="selectOneMenu1"/>
    <f:selectItems value="#{backing_showFactory.allFactories}"
    binding="#{backing_showFactory.selectItems2}"
    id="selectItems2"/>
    Notice, the tags are now seperated instead of the selectItems tag being encased in the selectOneMenu tag.

  • JSF editor Bug ?

    Hi everybody i'm trying the new jdeveloper 10.1.3 with jsf support , and after use it sometime, i realize that the jsf editor is not synchronizing very well the components on the backing code with the jsp document , when the backing code class isn't compiling (and it's saved in this state). This is a terrible source of error when you don't know it ...
    the question is , this is a normal behaviour or horrible bug ?

    Thanks, but that's not what i mean, you modify the components in the property inspector, but you don't write the methods code on the property inspector.The problem is when that code isn't compiling, if you keep using the jsp design view, the backing bean stops being updated ... if you dont realize of this bug you got desync the view with the backing ... :S

  • BUG: JDeveloper 10.1.3.0.3 EA - Exception in switch using enum

    Hi,
    I was encountered runtime exception in switch statement, if I use enum.
    In the next example the exception:
    Exception in thread "main" java.lang.ClassFormatError: Invalid field attribute index 0 in class file com/crcdata/enumtest/client/EnumTest$1
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at com.crcdata.enumtest.client.EnumTest.main(EnumTest.java:13)
    is thrown on line "switch (season)".
    package com.crcdata.enumtest.client;
    public class EnumTest {
      public enum Season { WINTER, SPRING, SUMMER, FALL }
      public EnumTest() {
      public static void main(String[] args) {
        EnumTest enumTest = new EnumTest();
        Season  season = Season.WINTER;
        switch (season) {
          case WINTER:
            System.out.println("Season: " + season.name());
            break;
          default:
            System.out.println("Another season");
            break;
    }This exception occur only if use ojc compiler. The javac compiler is OK.
    Versions:
    JDeveloper 10.1.3.0.3 EA
    J2EE 1.5.0_05
    Regards,
    Petr

    Thanks for reporting this. I filed bug 4720493 on this.

  • Bug in JSF 2.0?

    I was using JSF 2.0 + DI + Bean Validation in a app to test the new functionalities. In the end, a got a bug. When the data validation failed in a form, the entire page was redisplayed again, with the appropriate error messages but without some html components, like outputLabels and outputText. I thought that it was my mistake, but i opened the Scrum Toys netBeans example and got the same problem. Anyone here already noticed this?
    Edited by: 1234teste on Jun 5, 2010 10:12 AM
    Edited by: 1234teste on Jun 5, 2010 10:12 AM

    if you think it is a bug, file a bug report.
    I'd find it hard to believe that the Netbeans example displays the same problem and that it has gone unnoticed though. Perhaps you should first try it on a fresh installation of Glassfish V3 to see if the problem remains.

Maybe you are looking for

  • Iphoto not available after upgrading to Mavericks

    I recently upgrades my iMac to Mavericks. I also upgrades my iPhoto to 9.5.1. However when I click on the icon it gives the following caution: "The iPhoto library is on a locked volume. Reopen iPhoto when you have read/write access, or reopen iPhoto

  • How can I change the default  driver to OracleXADataSource in JDeveloper

    Hello, How can I change the default oracle driver: oracle.jdbc.OracleDriver to oracle.jdbc.xa.client.OracleXADataSource in JDeveloper Studio Edition Version 11.1.1.0.2, Build JDEVADF_MAIN.BOXER_GENERIC_090328.0229.5205. If I modify the file connectio

  • Excise capture in customer return

    HI, For customer return we are useing J1IEX Transaction for capturing excise invoice, without purchase order document type. But in J1IEX,there is a field for Vendor. I want to know that in above case, who will be the Vendor? Regards Prabudh

  • Tracking of Components with multiple make and multiple suppliers

    Hi, We have some purchased components in assembly, for which the make options are provided by design. Then purchasing decides which make component should be bought from which supplier / dealer. We need to track the assembly for this component and its

  • Need help with this error

    Hi, I keep getting this error when running my application. Classes compile correctly. I have two classes, one is the main GUI, the other the main functionality. I get the error below when I try and create an Object of the GUI within the other class.