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]

Similar Messages

  • Thread bottleneck due to bug in JSF 1.1 : please help

    Hi. We are using JSF 1.1 on a J2EE 1.4 server and have identified a critical a bottleneck because methods of class com.sun.faces.application.ApplicationAssociate are synchronized. This is a bug in JSF 1.1 identified by Sun (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6223295) that has apparently been fixed in JSF 1.2.
    However, JSF 1.2 requires Servlet 2.5 and JSP 2.1support, and our server is only J2EE 1.4 compatible.
    So what can we do ? If you have any ideas, please post.
    Thanks.
    Fabien Coppens

    Actually, I have just tried JSF 1.1_02 and it does seem to solve the thread bottleneck problem. I'll need verification once we get into performance testing, I'll keep you guys posted.

  • 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 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.

  • Bug in JSF maybe

    Hi I am using MyFaces 1.1.3 and i noticed the following strange behaviour.
    I have the following code:
    class Bean extends HashTable<String,Element> {
    class Bean2 extends Bean {
    private String hello = "hello";
    public String getHello() {
    return hello;
    now in the jsp page I use the following line:
    <h:outputText value=""#{mappedBean.text}"
    So the strange thing is that this binding diplay nothing!
    If I remove the extend to HashTable everything is allright and on the screen is displayed "hello" but when it extends it for some reason it does not display anything. I think it is a bug.

    It's working as designed. The spec says that for an expression "value-a.value-b", if value-a implements Map, then it uses value-a.get( value-b ) to get the value. Look at the JSF 1.1 spec section 5.1.3, which points you to JSP 2.0 section 2.3.4.

  • Another subfolder bug (or JSF flow?)...

    1. Create new project
    2. On the Page1 place any image from the Samples directory such as navbar.jpg
    3. Create subfolder
    4. Create a new page Test.jsp in the subfolder
    5. Place a button on Page1 to point to test/Test.jsp
    6. Place a button on Test.jsp to point back to Page1
    7. Create two navigation cases: from Page1to Test and back from Test to Page1
    8. Create action handlers for the both buttons
    9. Start project and click the button to go to Test page then click the button to go back to Page1
    See how the IMAGE on Page1 is NOT displayed (path is broken - address bar still points to the test/Test.jsp)
    Please fix it in the upcoming subfolder/jspf patch if possible.
    The current workaround I have to use is calling getExternalContext().redirect("../Page1.jsp");
    in the action handler for the Test page button

    We don't support subfolders very well. We recently fixed a bunch of bugs in this area, so I was hoping that this would be fixed, but when I tried on the current bits it I get the same problem.
    Note that the URL being "wrong" is unrelated to this, and that this is actually how JSF works (yeah, it's a bit counter intuitive. This might be a good blog topic.) You can google around for some information about this, but in essence you get this problem when the navigation decision is made on the server -after- the user has submitted the request on the browser and the url bar is updated.
    Back to the bug:
    You can work around this by manually changing the "value" attribute of the image to be context relative; e.g. instead of having a value of "resources/navbar.jpg", make that "/resources/navbar.jpg" (e.g. just add a / at the beginning). Now it will work fine at deployment.
    Unfortunately, until you get the next patch (which should be very soon; it left development a while ago and is being tested) this won't work well at design time. In the patch the designer was fixed to handle context relative paths right in most scenarios. This means that the image won't show up at designtime (you'll just see a box with the url in it instead.)
    I'm not sure why the page relative path doesn't work; I'll forward that to somebody more familiar with JSF internals.
    -- Tor
    http://blogs.sun.com/tor

  • Another JSP Fragment bug (or JSF flaw?)

    My application has a search box and go button in a JSPF fragment. But data content is rendered in a JSP. To demonstrate the problem I am going to slightly modify the Person/Trip tutorial sample:
    1. Create a new project
    2. Add Trip rowset to page1
    3. Set criteria perseonid = ?
    4. Add data table and bind it to trip rowset
    5. Add Integer PersonID property to the session bean
    6. Add PersonID initialization code:
    personID = new Integer(1);
    5. Add Page1 initialization:
    try {
    dataTable1Model.setObject(1, getSessionBean1().getPersonID());
    dataTable1Model.execute();
    } catch (Exception e) {
    throw new FacesException(e);
    5. Add a new JSP Fragment above the table and name it Test.jspf
    6. Place an edit field (Search) and a button to submit the search
    7. Add process value change event to the edit box:
    getSessionBean1().setPersonID(new Integer((String)vce.getNewValue()));
    8. Add action handler to the button but keep it empty for now since we do not have inter-page navigation here really
    Now start project and enter 2 into search field click on the button and see the table did not update. Enter 3 and see that the table now shows the records for the person id 2.
    So why do tutorial samples work and this JSPF does not? The problem is that JSPF fragment does not have any knowledge about the table data model on the Page1.jsp so it cannot synchronize it in the value change event!!! However, tutorial samples do update data model because value change event is in the same Java class. In this case JSPF is a completely different class.
    Now please tell me what am I supposed to do? Don't suggest me to access Page1.tableDataModel from the Test.jspf since my JSPF can be included in different pages.
    My current workaround again is using this call in the button action event:
    try { getExternalContext().redirect("Page1.jsp"); } catch (Exception e) {};
    Now, you have to pay me something for all that hard QA work I have to do for your entire QA department. ;-)
    Here is the codes: (just in case)
    Page1.java:
    * Page1.java
    * Created on December 19, 2004, 10:59 AM
    * Copyright ybaykshtis
    package test9;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.sql.rowset.*;
    import com.sun.jsfcl.data.*;
    import javax.faces.component.*;
    public class Page1 extends AbstractPageBean {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
    private int __placeholder;
    private HtmlForm form1 = new HtmlForm();
    public HtmlForm getForm1() {
    return form1;
    public void setForm1(HtmlForm hf) {
    this.form1 = hf;
    private JdbcRowSetXImpl tripRowSet = new JdbcRowSetXImpl();
    public JdbcRowSetXImpl getTripRowSet() {
    return tripRowSet;
    public void setTripRowSet(JdbcRowSetXImpl jrsxi) {
    this.tripRowSet = jrsxi;
    private HtmlDataTable dataTable1 = new HtmlDataTable();
    public HtmlDataTable getDataTable1() {
    return dataTable1;
    public void setDataTable1(HtmlDataTable hdt) {
    this.dataTable1 = hdt;
    private UIColumn column1 = new UIColumn();
    public UIColumn getColumn1() {
    return column1;
    public void setColumn1(UIColumn uic) {
    this.column1 = uic;
    private HtmlOutputText outputText1 = new HtmlOutputText();
    public HtmlOutputText getOutputText1() {
    return outputText1;
    public void setOutputText1(HtmlOutputText hot) {
    this.outputText1 = hot;
    private HtmlOutputText outputText2 = new HtmlOutputText();
    public HtmlOutputText getOutputText2() {
    return outputText2;
    public void setOutputText2(HtmlOutputText hot) {
    this.outputText2 = hot;
    private UIColumn column2 = new UIColumn();
    public UIColumn getColumn2() {
    return column2;
    public void setColumn2(UIColumn uic) {
    this.column2 = uic;
    private HtmlOutputText outputText3 = new HtmlOutputText();
    public HtmlOutputText getOutputText3() {
    return outputText3;
    public void setOutputText3(HtmlOutputText hot) {
    this.outputText3 = hot;
    private HtmlOutputText outputText4 = new HtmlOutputText();
    public HtmlOutputText getOutputText4() {
    return outputText4;
    public void setOutputText4(HtmlOutputText hot) {
    this.outputText4 = hot;
    private UIColumn column3 = new UIColumn();
    public UIColumn getColumn3() {
    return column3;
    public void setColumn3(UIColumn uic) {
    this.column3 = uic;
    private HtmlOutputText outputText5 = new HtmlOutputText();
    public HtmlOutputText getOutputText5() {
    return outputText5;
    public void setOutputText5(HtmlOutputText hot) {
    this.outputText5 = hot;
    private HtmlOutputText outputText6 = new HtmlOutputText();
    public HtmlOutputText getOutputText6() {
    return outputText6;
    public void setOutputText6(HtmlOutputText hot) {
    this.outputText6 = hot;
    private UIColumn column4 = new UIColumn();
    public UIColumn getColumn4() {
    return column4;
    public void setColumn4(UIColumn uic) {
    this.column4 = uic;
    private HtmlOutputText outputText7 = new HtmlOutputText();
    public HtmlOutputText getOutputText7() {
    return outputText7;
    public void setOutputText7(HtmlOutputText hot) {
    this.outputText7 = hot;
    private HtmlOutputText outputText8 = new HtmlOutputText();
    public HtmlOutputText getOutputText8() {
    return outputText8;
    public void setOutputText8(HtmlOutputText hot) {
    this.outputText8 = hot;
    private UIColumn column5 = new UIColumn();
    public UIColumn getColumn5() {
    return column5;
    public void setColumn5(UIColumn uic) {
    this.column5 = uic;
    private HtmlOutputText outputText9 = new HtmlOutputText();
    public HtmlOutputText getOutputText9() {
    return outputText9;
    public void setOutputText9(HtmlOutputText hot) {
    this.outputText9 = hot;
    private HtmlOutputText outputText10 = new HtmlOutputText();
    public HtmlOutputText getOutputText10() {
    return outputText10;
    public void setOutputText10(HtmlOutputText hot) {
    this.outputText10 = hot;
    private UIColumn column6 = new UIColumn();
    public UIColumn getColumn6() {
    return column6;
    public void setColumn6(UIColumn uic) {
    this.column6 = uic;
    private HtmlOutputText outputText11 = new HtmlOutputText();
    public HtmlOutputText getOutputText11() {
    return outputText11;
    public void setOutputText11(HtmlOutputText hot) {
    this.outputText11 = hot;
    private HtmlOutputText outputText12 = new HtmlOutputText();
    public HtmlOutputText getOutputText12() {
    return outputText12;
    public void setOutputText12(HtmlOutputText hot) {
    this.outputText12 = hot;
    private RowSetDataModel dataTable1Model = new RowSetDataModel();
    public RowSetDataModel getDataTable1Model() {
    return dataTable1Model;
    public void setDataTable1Model(RowSetDataModel rsdm) {
    this.dataTable1Model = rsdm;
    // </editor-fold>
    public Page1() {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
    try {
    tripRowSet.setDataSourceName("java:comp/env/jdbc/Travel");
    tripRowSet.setCommand("SELECT ALL TRAVEL.TRIP.TRIPID, TRAVEL.TRIP.PERSONID, TRAVEL.TRIP.DEPDATE, TRAVEL.TRIP.DEPCITY, TRAVEL.TRIP.DESTCITY, TRAVEL.TRIP.TRIPTYPEID FROM TRAVEL.TRIP WHERE TRAVEL.TRIP.PERSONID=?");
    dataTable1Model.setDataCacheKey("com.sun.datacache.Page1.tripRowSet");
    dataTable1Model.setRowSet(tripRowSet);
    dataTable1Model.setSchemaName("TRAVEL");
    dataTable1Model.setTableName("TRIP");
    } catch (Exception e) {
    log("Page1 Initialization Failure", e);
    throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
    // </editor-fold>
    // Additional user provided initialization code
    try {
    dataTable1Model.setObject(1, getSessionBean1().getPersonID());
    dataTable1Model.execute();
    } catch (Exception e) {
    throw new FacesException(e);
    protected test9.ApplicationBean1 getApplicationBean1() {
    return (test9.ApplicationBean1)getBean("ApplicationBean1");
    protected test9.SessionBean1 getSessionBean1() {
    return (test9.SessionBean1)getBean("SessionBean1");
    * Bean cleanup.
    protected void afterRenderResponse() {
    tripRowSet.close();
    Page1.jsp
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view><![CDATA[
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]><html
    lang="en-US" xml:lang="en-US">
    <head>
    <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <title>Page1 Title</title>
    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
    </head>
    <body style="-rave-layout: grid">
    <h:form binding="#{Page1.form1}" id="form1">
    <h:dataTable binding="#{Page1.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd"
    style="left: 24px; top: 168px; position: absolute" value="#{Page1.dataTable1Model}" var="currentRow">
    <h:column binding="#{Page1.column1}" id="column1">
    <h:outputText binding="#{Page1.outputText1}" id="outputText1" value="#{currentRow['TRIPID']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText2}" id="outputText2" value="TRIPID"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column2}" id="column2">
    <h:outputText binding="#{Page1.outputText3}" id="outputText3" value="#{currentRow['PERSONID']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText4}" id="outputText4" value="PERSONID"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column3}" id="column3">
    <h:outputText binding="#{Page1.outputText5}" id="outputText5" value="#{currentRow['DEPDATE']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText6}" id="outputText6" value="DEPDATE"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column4}" id="column4">
    <h:outputText binding="#{Page1.outputText7}" id="outputText7" value="#{currentRow['DEPCITY']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText8}" id="outputText8" value="DEPCITY"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column5}" id="column5">
    <h:outputText binding="#{Page1.outputText9}" id="outputText9" value="#{currentRow['DESTCITY']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText10}" id="outputText10" value="DESTCITY"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column6}" id="column6">
    <h:outputText binding="#{Page1.outputText11}" id="outputText11" value="#{currentRow['TRIPTYPEID']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText12}" id="outputText12" value="TRIPTYPEID"/>
    </f:facet>
    </h:column>
    </h:dataTable>
    <div style="left: 48px; top: 72px; position: absolute">
    <jsp:directive.include file="Test.jspf"/>
    </div>
    </h:form>
    </body>
    </html>
    </f:view>
    </jsp:root>
    Test.java
    * Test.java
    * Created on December 19, 2004, 11:01 AM
    * Copyright ybaykshtis
    package test9;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.jsfcl.data.*;
    import javax.faces.component.*;
    import com.sun.sql.rowset.*;
    import javax.faces.convert.*;
    import javax.faces.event.*;
    public class Test extends AbstractPageBean {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
    private int __placeholder;
    private JdbcRowSetXImpl personRowSet = new JdbcRowSetXImpl();
    public JdbcRowSetXImpl getPersonRowSet() {
    return personRowSet;
    public void setPersonRowSet(JdbcRowSetXImpl jrsxi) {
    this.personRowSet = jrsxi;
    private HtmlInputText textField1 = new HtmlInputText();
    public HtmlInputText getTextField1() {
    return textField1;
    public void setTextField1(HtmlInputText hit) {
    this.textField1 = hit;
    private HtmlCommandButton button1 = new HtmlCommandButton();
    public HtmlCommandButton getButton1() {
    return button1;
    public void setButton1(HtmlCommandButton hcb) {
    this.button1 = hcb;
    // </editor-fold>
    public Test() {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
    try {
    personRowSet.setDataSourceName("java:comp/env/jdbc/Travel");
    personRowSet.setCommand("SELECT * FROM TRAVEL.PERSON");
    } catch (Exception e) {
    log("Test Initialization Failure", e);
    throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
    // </editor-fold>
    // Additional user provided initialization code
    protected test9.ApplicationBean1 getApplicationBean1() {
    return (test9.ApplicationBean1)getBean("ApplicationBean1");
    protected test9.SessionBean1 getSessionBean1() {
    return (test9.SessionBean1)getBean("SessionBean1");
    * Bean cleanup.
    protected void afterRenderResponse() {
    personRowSet.close();
    public String button1_action() {
    // User event code here...
    //try { getExternalContext().redirect("Page1.jsp"); } catch (Exception e) {};
    return null;
    public void textField1_processValueChange(ValueChangeEvent vce) {
    // User event code here...
    getSessionBean1().setPersonID(new Integer((String)vce.getNewValue()));
    Test.jspf
    <?xml version="1.0" encoding="UTF-8"?>
    <div style="-rave-layout: grid" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
    <p>Included Content Here</p>
    <h:inputText binding="#{Test.textField1}" id="textField1" style="left: 48px; top: 48px; position: absolute" valueChangeListener="#{Test.textField1_processValueChange}"/>
    <h:commandButton action="#{Test.button1_action}" binding="#{Test.button1}" id="button1" style="left: 240px; top: 48px; position: absolute" value="Submit"/>
    </div>

    Hi ,
    Thanks for your valuable observations and feedback. I could observe that the workaround seems to be working fine. Thanks for providing the workaround.
    The problem you are facing without the workaround is a known issue and our engineers are currently working on it.
    Regards.
    Creator Team.

  • Some deathful bugs of JSF EA3 !!through test strictly!!

    bug1--about Input components ( like Input_text ) , test course : I put a input_text in form1,if user modify the value of the input_text from 'xxxx' to null then submit the form,and the new null value of the input_text is not submitted,and the value submmited of the input_text is 'xxxx' yet .
    bug2--about selectboolean_checkbox , test course : I put a selectboolean_checkbox in form1,and the page has form2 alse,when i submit form2,the value of selectboolean_checkbox is submitted too,and the value submmited is not the value of selectboolean_checkbox in form1,but it's always false;
    bug3--about selectboolean_checkbox also,test course : if I call context.renderResponse() in Apply Request Values Phase,and I found
    the selectboolean_checkbox not get value from it's model,the model corresponding getXXX() method not executed.
    another suggestion : in JSF,how to forward the current page a to another page b using this format : b#someWhereOfPageb ,to go to some where in Page b?

    >
    bug1--about Input components ( like Input_text ) ,
    test course : I put a input_text in form1,if user
    modify the value of the input_text from 'xxxx' to null
    then submit the form,and the new null value of the
    input_text is not submitted,and the value submmited of
    the input_text is 'xxxx' yet .
    Can you demonstrate an example of this happening to you? The reason I ask is that basically all of the JavaServer Faces applications I'm familiar with rely on this sort of behavior, and do not have the problem you are describing -- so there must be something interesting about your particular approach that is causing this.
    One thing to keep in mind is that there is no such thing as "submitting a null value" for a text field. At best, you can erase all the contents and get a zero-length string.
    bug2--about selectboolean_checkbox , test course : I
    put a selectboolean_checkbox in form1,and the page has
    form2 alse,when i submit form2,the value of
    selectboolean_checkbox is submitted too,and the value
    submmited is not the value of selectboolean_checkbox
    in form1,but it's always false;
    Same issue .. this works fine in the sample apps included with JavaServer Faces, so we'll need to explore why it doesn't work for your app.
    One thing to keep in mind that if your page has two different forms (A and B) on it, submitting to form A has no effect on the components in form B (and vice versa).
    bug3--about selectboolean_checkbox also,test course :
    if I call context.renderResponse() in Apply Request
    Values Phase,and I found
    the selectboolean_checkbox not get value from it's
    model,the model corresponding getXXX() method not
    executed.
    Probably the same sort of issue ... please supply a test case that fails for you.
    another suggestion : in JSF,how to forward the current
    page a to another page b using this format :
    b#someWhereOfPageb ,to go to some where in Page bOne way would be to use an <h:command_hyperlink> control that uses an "href" element to specify the destination.
    Craig

  • Bug of JSF spec?

    I am not good at English. But but... please hear my JSF Problem.
    <h:form>
        <h:inputText id="input1" required="#{true}"/>
        <h:message for="input1"/>
        <h:inputText id="input2" value="#{testBean.value}">
            <f:convertNumber integerOnly="true"/>
        </h:inputText>
        <h:message for="input2"/>
        <h:commandButton/>
    </h:form>From browser:
    1.Input empty string at input1. (this cause validation error.)
    2.Input empty string at input2. (convet to null.)
    3.Click commandButton.
    I hope:
    Display value at input2 is empty string. (My input value is keeped.)
    But result is:
    Display value at input2 is "#{testBean.value}". (My input value is forgotten...)
    In my research:
    1.converter converts empty string to null.
    2."local value" is set to null.
    3.Go to Rnder Response Phase By Input1 validation error.
    4.getValue ignore "local value" if it is null and see VE.
    Uhh... Why getValue method doesn't see isLocalValueSet?
    I can't understand... Please Help me...

    Unfortunately I've had no luck with this solution. In my case I am performing a search using a session scope bean. My results are listed in a dataTable and I have an actionListener on a request scoped bean. All of that works fine.
    faces-config.xml
    <managed-bean>
         <managed-bean-name>searchBean</managed-bean-name>
         <managed-bean-class>com.package.SearchBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
         <managed-bean-name>detailBean</managed-bean-name>
         <managed-bean-class>com.package.DetailBean</managed-bean-class>
         <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    public class DetailBean
         private String field1;
         private String field2;
         //Bind the dataTable component to the controller
         protected transient UIData dataTable;
         //The object used to populate the row in the table that was selected
         protected transient Object row;
         public DetailBean()
              super();
              FacesContext facesContext = FacesContext.getCurrentInstance();
              Boolean isPostback = facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext);
              if(!isPostback) //always seems to be true
                   if(dataTable != null)
                        row = dataTable.getRowData();
         public void detail(ActionEvent event)
              row = dataTable.getRowData();
              if(row != null)
                   Map<String,String> record = (Map<String,String>)row;
                   setField1(record.get("field1"));
                   setField2(record.get("field2"));
         public String edit()
              //do the edit
              return "success";
    <h:inputText id="field1" value="#{detailBean.field1}" required="true"/>
    <h:inputText id="field2Input" value="#{detailBean.field2}"/>
    <h:outputText id="field2Text" value="#{detailBean.field2}"/>
    <h:inputText id="field2Hidden" value="#{detailBean.field2}"/>
    <h:commandLink id="edit" action="#{detailBean.edit}" value="edit"/>
    <h:messages errorStyle="color:red" showSummary="true"/>     The values from the table are successfully populated and the page is shown with the values:
    field1=test1
    field2Input=test2
    field2Text=test2
    field2Hidden=test2when I clear field1 (required) and submit I have the following:
    field1=
    field2Input=test2
    field2Text=
    field2Hidden=test2
    message about field1 being requiredI would expect field2Text to still retain the value.
    Furthermore if I set the field2Text to readonly="true", it, too, does not retain its value. However in both cases once the required field has a value and is submitted, all values show as expected.
    My only workaround for this is to set my detailBean session scope, but that avoids the problem.

  • Verbatim bug with JSF (SUN RI) 1.1 ?

    Hi,
    Could someone explain me why this example doesn't work :
    <html>
    <head>
    </head>
    <body style="background-color:#E0E0E0">
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <h:form id="frm1">
    <f:verbatim> <p> A simple text </p> </f:verbatim>
    <h:inputText id="inp1"/>
    <h:inputText id="inp2" required="true" /><h:message for="inp2" showSummary="false" showDetail="true" />
    <h:commandButton id="cmd" value="valider"/>
    </h:form>
    </f:view>
    </body>
    </html>
    When i submit the form, a ClassCastException is thrown during restoreState.
    If i remove the verbatim tag that works perfectly well...
    Nicolas Lenoire
    Sunopsis

    You would better to take option 2, I believe. I don't know when the next release will be issued. You can get 1.1 source code and patch by yourself or just try weekly build. Good luck!

  • A graveness bug of jsf!!! to jsf developer!!!!!

    i write a jsp constituted by jsf components,i not specified id of some components,such as a output_text ,and debug found that jsf not create id for
    this UIoutput component,the getComponentId() of this UIoutput return null!!
    this result in some oddness thing..

    i think it would be more logical that the id attribute is required for all components.

  • Command_link bug in JSF 1.1

    When I click some hyperlink, (generated by Command_link component), It pops out a javascript error message, indicates that field *:idcl is null or null object, namely the field *:idcl is missing.
    I have a close look at html code, I found that most Command_link generate a hidden field name *:idcl, but some of them not. However, all Command_link generate a javascript onclick event: *[*:idcl ].value = *.value. it gets error here!

    Can you please provide your jsp page, and any other information (faces-config.xml, managed beans, etc...)?
    It will help us isolate the probem.
    Thanks, Roger (EG member)

  • Struts-faces & JSF commandLink bug in RI 1.1

    Hello,
    There was a bug with JSF, multiple forms and commandLink as discussed in thread: http://forum.java.sun.com/thread.jsp?thread=526788&forum=427.
    This bug is now fixed for JSF h:form form type.
    I personnally use Struts and JSF with the struts-faces JAR and this issue is still not fixed when you create a form using the s:form tag, in fact as long as there is a s:form on the page the commandLinks do not work the same way as first reported for pure JSF apps.
    Will this be fixed anytime soon in the struts-faces library? I hope so because I do need it.
    Thanks
    Xav

    hi,
    i guess [email protected]
    or
    http://issues.apache.org/bugzilla/enter_bug.cgi?product=Struts
    might be a better place for that.
    regards.

  • [BUG] javascript error on mozilla when click()

    Hello I use javascript to simulate button click and send a postback to the server. Here is the java script:
    document.getElementById('myId').click();
    the button defenition in JSF id classic :
    <h:commandButton id="myId" actionListener="#{myListener}">
    When used with Internet Explorer this code works, when used in Firefox it complaines that it cannot find the javascript for the submit operation.!!!!!
    Please give me a workaround, or some way to go ahead thank you.

    Which Mozilla version are you using? This just works here in FF 1.5 and 2.0. And even IE 6.0 and 7.0.
    JSF<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <f:view>
    <html>
        <head>
        </head>
        <body>
        <h:form id="formId">
            <h:commandButton id="commandButtonId" value="button" action="#{myBean.action1}" />
            <h:commandLink id="commandLinkId" value="link" action="#{myBean.action2}" />
        </h:form>
        <a href="#" onclick="document.getElementById('formId:commandButtonId').click();">invoke button</a>
        <a href="#" onclick="document.getElementById('formId:commandLinkId').onclick();">invoke link</a>
        </body>
    </html>
    </f:view>MyBeanpackage mypackage;
    public class MyBean {
        public void action1() {
            System.out.println("action1");
        public void action2() {
            System.out.println("action2");
    }By the way .. This is definitely not a bug in JSF.

  • JSF 1.2 in Weblogic 10

    Hi JSF 1.2 is bundled with weblogic 10 and out of interest I tried to use it to see if it was suitable for our new development. The application works with both JSF-RI1.1 and myfaces 1.1, so I was hoping to see if 1.2 would bring any benefits.
              I have set up my weblogic.xml to deploy the 1.2 version, but when I start my app I get an exception (see below) . Do I have to undeploy the other versions? Is there anything missing from the faces-config.xml, I changed it ti use the new XML schema, but this made no difference.
              Is JSF1.2 useable in portal 10?
              <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
              http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
              version="1.2">
              <application>
              <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>
              </application>
              <application>
              <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
              </application>
              </faces-config>
              Log extracts::
              Oct 15, 2007 6:48:46 PM com.sun.faces.config.ConfigureListener contextInitialized
              INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/nop_portal'
              Oct 15, 2007 6:48:48 PM com.sun.faces.spi.InjectionProviderFactory createInstance
              WARNING: JSF1033: Resource injection is DISABLED.
              Oct 15, 2007 6:48:49 PM com.sun.faces.config.ConfigureListener contextInitialized
              INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/nop_portal'
              <Oct 15, 2007 6:48:49 PM CEST> <Warning> <HTTP> <BEA-101162> <User defined listener com.sun.faces.config.ConfigureListener failed: j
              ava.lang.AssertionError.
              ####<Oct 15, 2007 6:48:50 PM CEST> <Error> <Deployer> <FHD3076G> <AdminServer> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1192466930114> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1192466874504' for task '1'. Error is: 'weblogic.application.ModuleException: '
              weblogic.application.ModuleException:
                   at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:950)
                   at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:353)
                   at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
                   at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
                   at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
                   at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
                   at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
                   at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
                   at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
                   at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
                   at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:566)
                   at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:136)
                   at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:104)
                   at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:139)
                   at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:320)
                   at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:816)
                   at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1223)
                   at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:434)
                   at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:161)
                   at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
                   at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
                   at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
                   at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
                   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
              java.lang.AssertionError
                   at com.sun.faces.application.ConverterPropertyEditorFactory$ClassTemplateInfo.loadTemplateBytes(ConverterPropertyEditorFactory.java:281)
                   at com.sun.faces.application.ConverterPropertyEditorFactory$ClassTemplateInfo.<init>(ConverterPropertyEditorFactory.java:172)
                   at com.sun.faces.application.ConverterPropertyEditorFactory$ClassTemplateInfo.<init>(ConverterPropertyEditorFactory.java:154)
                   at com.sun.faces.application.ConverterPropertyEditorFactory.<init>(ConverterPropertyEditorFactory.java:524)
                   at com.sun.faces.application.ConverterPropertyEditorFactory.getDefaultInstance(ConverterPropertyEditorFactory.java:544)
                   at com.sun.faces.application.ApplicationImpl.addPropertyEditorIfNecessary(ApplicationImpl.java:718)
                   at com.sun.faces.application.ApplicationImpl.addConverter(ApplicationImpl.java:675)
                   at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:795)
                   at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:538)
                   at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:435)
                   at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:458)
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                   at weblogic.security.service.SecurityManager.runAs(Unknown Source)
                   at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:168)
                   at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1721)
                   at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2890)
                   at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:948)
                   at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:353)
                   at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
                   at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
                   at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
                   at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
                   at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
                   at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
                   at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
                   at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
                   at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:566)
                   at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:136)
                   at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:104)
                   at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:139)
                   at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:320)
                   at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:816)
                   at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1223)
                   at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:434)
                   at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:161)
                   at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
                   at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
                   at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
                   at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
                   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

    It seems like you are running weblogic server 10 with assertion enabled.
              The issue is a bug in JSF 1.2 reference implementation. Please refer to
              https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=452+
              for detail. The bug has been fixed. However, the JSF1.2 library bundled weblogc 10 does not catch the fix.
              As a workaround, you can disable assertion to ignore the error. Please update if the workaround works.
              Thanks,
              -Fred.

Maybe you are looking for

  • Jabber for Windows 9.2.4 deskphone/softphone no connection

    I have an issue with what appears to be only my desktop.  If I am on VPN (anyconnect client) Jabber phone control and softphone works perfectly.  If I am hardwired to my ASA and coming across my L2L IPSEC tunnel IM and Presence withing Jabber works b

  • NEED HELP: Nokia N8 Software update

    Today I have the Nokia N8 updated operating system and then saw that there is no Slovenian language, which really bothers me. Maybe someone knows how to make the phone back in the Slovenian language with an updated operating system. Please help. Than

  • Streaming to samsung tv dlna

    I have my Samsung tv networked. I can view and stream through my Sony laptop with no issues but my tablet s cannot see the television using the built in video/audio apps or mediashare. What could be the issue? The samsung is dlna certified.

  • ListItem problem in JEditorPane

    I'm trying to insert an item correctly before a line of text. I tried a lot of thing but the result is always quite bad. Please help

  • My iPad2 froze and I don't know what to do

    My iPad 2 froze and I can't turn it off or anything.  What do I do?