Fundamental JSF Lifecyle Problem

This is more concise description of a prior refresh problem. The goal is to change detail information when a menu selection is made on the form.
When the menu is changed the form is submitted and the value-change event handler makes calls to the managed session bean to change the details to reflect the new selection.
To faclitate this "refresh" operation the menu is marked as "immediate" and the event handler calls renderResponse on the context to skip the model update phase of the requestion.
This strategy works perfectly when the details are displayed with read-only components � including setting the read-only property on an input textbox. If read-write components are used to display details, changing the menu has no effect on the display! My code still executes. The data models definitely do change when the menu selection changes.
I am stumped on this one.

Hi again!
I aked Craig about this and he reminded me of a trick he had to use in AppModel to handle this issue - my previous response over-simplified things.
Yes, it's JSF lifecycle related... in particular with how input components deal with this lifecycle with immediate set to true. Here's his email message that might help explain.... we are working on articulating this in a tutorial with some kind of "best practice" recommendation...
============
Let's look inside, say, a Text Field component to see what actually happens in each phase:
* Reconstitute View -- The previous state of the component (as of when it was rendered)
is restored.
* Apply Request Values -- The decode() method is called, which extracts the appropriate
request parameter (as a string), and calls setSubmittedValue() to save the input in its raw form.
* Process Validations -- (See note [1]) convert the submittedValue into the appropriate data
type, then call any validators. If conversion was successful and no validation errors were
encountered, call setValue() to save the converted value, and fire a value change event
if appropriate.
* Update Model Values -- If there is a value binding expression on the value property,
use it to push the converted and validated value into the model tier. Set submittedValue
to null since we don't need it any more.
* Invoke Application -- Nothing special.
* Render Response -- (See note [2]) If submittedValue is not null, redisplay that. Otherwise, call getValue(),
do any necessary conversion, and render that.
[1] If immediate="true", the processing that normally happens in Process Validations is moved up to happen in Apply Request Values instead.
[2] This is the behavior that causes the symptom reported by the forum poster. The reason JSF behaves this way is that users expect, after a validation error, that whatever you typed will be redisplayed so you can fix it -- even if it's semantically invalid. For example, assume you have a Text Field that is bound to an int field (so there's an integer converter in the picture). If you type in "1a3", the converter will fail, and you expect to see an error message with "1a3" redisplayed. It is the special test for submitted values in Render Response that actually meets this requirement.
In terms of lifecycle, then, we need to figure out how to describe the following best practice:
* IF you set immediate=true on an input field,
* AND you intend to perform some processing
in a value change listener, then redisplay
the current page,
* AND you modify the value property of this
component, or any other input component
on the page in your event listener code,
* THEN you must call setSubmittedValue(null)
on that input component before returning from
the value change listener.
You don't have problems like this in the non-immediate scenario, because setSubmittedValue(null) is called for you in Update Model Values.
==========
So to help with this, we added the erase method on the FacesBean class to clear all the submitted values on the page- see the jsfcl doc:
http://developers.sun.com/prodtech/javatools/jscreator/reference/apis/index.html
... and you can see this "in action" in the AppModel example on the Single.java page bean... search for the "erase" method (we needed to use it for AppModel because the dropdown is an input component and has auto-submit=true which sets immediate):
http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
Hope that helps....
v

Similar Messages

  • Fundamental JSF problem

    I'm using GlassFish 3 (not sure about the release level - where can I see it?), NetBeans 7.1.1, Firefox 3.5.16. I am developing a very simple application using JSF; I have a working sample app (PetCatalog, which comes with NetBeans). As far as I can see my app is almost identical to the sample; but it does not work. This is the general idea: I create a list of users ('listusers') from a database - this works. Each user ID is a commandLink to an edit page ('useredit'). I have created a simple phase listener, from which I get this output:
    Entering phase: RESTORE_VIEW 1. <--- /faces
    Exiting phase: RESTORE_VIEW 1
    Entering phase: RENDER_RESPONSE 6
    Exiting phase: RENDER_RESPONSE 6--->/index.xhtml
    ==================================
    Entering phase: RESTORE_VIEW 1. <--- /faces
    Exiting phase: RESTORE_VIEW 1
    Entering phase: RENDER_RESPONSE 6
    initialise
    Exiting phase: RENDER_RESPONSE 6--->/listusers.xhtml
    ==================================
    Entering phase: RESTORE_VIEW 1. <--- /faces
    Exiting phase: RESTORE_VIEW 1
    Entering phase: RENDER_RESPONSE 6
    initialise
    Exiting phase: RENDER_RESPONSE 6--->/listusers.xhtml
    ==================================
    Entering phase: RESTORE_VIEW 1. <--- /faces
    Exiting phase: RESTORE_VIEW 1
    Entering phase: RENDER_RESPONSE 6
    initialise
    Exiting phase: RENDER_RESPONSE 6--->/listusers.xhtml
    ==================================
    The first entry (until '======') is from the index.xhtml; the second is from when I navigate to listusers. The last two are from clicking on a user ID - they should have called a method that would navigate to useredit, but clearly it just re-initialises listusers (the line with 'initialise' comes from a @PostContruct method).
    I realise that I must have committed some fundamental error somewhere, but I have been over the files again and again, comparing to the PetCatalog app, and I can't spot any significant difference. I would have inserted some code, but there doesn't seem to be a good way of displaying it in this forum - or uploading files.
    Does anybody have any idea what might be the cause of this problem?
    Edited by: janpla on Jun 7, 2012 12:25 AM

    Hi gimbal2,
    Thanks for answering - I hope you are right.
    This is listusers.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core">
        <h:head>
            <title>STAF User List</title>
        </h:head>
        <h:body>
            <h:outputStylesheet library="css" name="liststyle.css"  />
            <div id="header">
                <h1>STAF Users</h1>
            </div>"
            <div id="content">
                <h:form id="userform">
                    <h:dataTable id="users" value="#{userlist.userList()}" var="ul">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="[ ]"/>
                            </f:facet>
                            <h:selectBooleanCheckbox id="usercheck" value="#{ul.checked}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="UID"/>
                            </f:facet>
                            <h:commandLink action="#{userlist.edituser(ul)}" value="#{ul.uid}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Name"/>
                            </f:facet>
                            <h:outputText value="#{ul.name}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Trust"/>
                            </f:facet>
                            <h:outputText value="#{ul.trust}"/>
                        </h:column>
                    </h:dataTable>
                </h:form>
            </div>
        </h:body>
    </html>
    {code}
    And userlist.java:
    {code}
    package userface;
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import javax.annotation.PostConstruct;
    import javax.ejb.EJB;
    import javax.enterprise.context.SessionScoped;
    import javax.faces.bean.ManagedBean;
    import userdb.Users;
    import userejb.UserList;
    * @author Jan
    @ManagedBean
    @SessionScoped
    public class userlist implements Serializable{
        private List<ctlruser> ulist=new ArrayList<ctlruser>();
        private String tracer;
        @EJB UserList ul;
        private Integer seluid;
        private useredit ue;
        private String debugstr;
        @PostConstruct
        void initialise(){
            System.out.printf("initialise\n");
            seluid=-1;
            Integer i=0;
            for (Iterator<Users> it = ul.getUlist().iterator(); it.hasNext();) {
                ulist.add(i++,new ctlruser(it.next()));
        public String edituser(ctlruser u){
    //        ue=new useredit(u.getUid());
            System.out.printf("edituser\n");
            return "edituser.xhtml";
        public String getTrace(){
            return tracer;
        public String getDebugstr() {
            return debugstr;
        public List<ctlruser> userList(){
            return ulist;
    {code}
    As you can see, I have commented out the first statement in edituser(), so if it gets called at all, it will print "edituser" - which it doesn't. And, of course, the output from the phase listener confirms this. I can't see where I have done anything wrong - and it's not for want of trying.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Facelets and jsf-extensions problem.

    I'm fairly certain I've run into a problem between facelets and jsf-extensions. I'm working with JSF 1.2 RI, Woodstock, Facelets 1.1.13, on Tomcat 6.
    When trying to get Woodstock autoValidation to work I get a javascript error the "I has no properties". The error occurs in the com_sun_faces_ajax.js file in the jsf-extensions-dynamic-faces-0.1.jar (I've used both the RC4 and a build today ,10/18/07 from source with the same results). Here is the code snippet where it happens (with my comment).
    var I = G.getElementsByTagName("components")[0];
    var C = I.getElementsByTagName("render");
    for(var F = 0; F < C.length; F++) {
    In the second line there it looks like the variable I is null, but based on the post response below I don't know why.
    The response from the post looks like this:
    <partial-response><components><render id="PayableForm:vendorGci"><markup><![CDATA[{"valid":true,"id":"PayableForm:vendorGci"}]]></markup></render></components>
    However the server side code (validation method) never gets executed. I'm willing to do some digging and debug work, but I'd need to be pointed in the right direction.
    The following is more potentially useful code snippets.
    Here is the textField code:
    <w:form id="PayableForm">
    <w:textField style="display:none;" />
    <w:message for="vendorGci" />
    <w:label id="vendorGciLabel" for="vendorGci" text="Vendor: " />
    <w:textField id="vendorGci" autoValidate="true"
    text="${vendorBean.searchGci}" maxlength="8" required="true"
    validatorExpression="#{ vendorBean.validateVendor}" />
    Here is the javascript in the page (the init function is called from the body: onLoad="setTimeout('init();', 0);" , this does happen):
    <w:script type="text/javascript">
    function VendorListener(){
    function VendorNotify(props){
    alert("VendorNotify called!"); <--------------- I never see this alert message
    if ( props.id != "PayableForm:vendorGci") { return; }
    var field = document.getElementById("PayableForm:vendorGciLabel");
    field.setProps({
    valid: props.valid
    VendorListener.prototype.notify = VendorNotify;
    function initAccountRows(){
    var table = document.getElementById("PayableForm:vendorAccountTable");
    table.initAllRows();
    function init(){
    initAccountRows();
    var listener = new VendorListener();
    dojo.subscribe(
    webui.suntheme.widget.textField.event.validation.endTopic ,
    listener, listener.notify);
    Here is the validator method. It currently doesn't do anything, just trying to get something to work. I never see the output, and I never hit the breakpoint in the method.
    public void validateVendor(FacesContext context, UIComponent comp, Object value){
    System.out.println("**********************************");
    System.out.println("validateVendor called");
    System.out.println(value);
    System.out.println("**********************************");
    }

    Actually I don't need a global variable. I need to refer in my included template the actual backing bean used in the current page. As all my backing bean extends a abstract class I could bind my component to a property of the current backing bean, no matters which one. Just like a polymorphic call but without the parameter. Let's imagine I could get this object of the facesContext object I would be able to do:
    <rich:datascroller renderIfSinglePage="false" align="right" for="listagem" maxPages="12" fastStep="10"
    pageIndexVar="pageIndex" pagesVar="pages" stepControls="show" fastControls="hide" boundaryControls="show"
    inactiveStyleClass="paginacaoInativa" selectedStyleClass="paginacaoSelecionada"
    styleClass="paginacao" tableStyleClass="paginacaoTabela"
    binding="#{facesContext.currentBackingbean.formDataScroller}" id="paginacao">
    Instead of pass the backing bean to the ui:param of this template... Dou you get the point?

  • MAC OS/X JSF "hang" problem in 10.1.3 preview

    I'm experiencing some really odd delays in JDev 10.1.3 on my Mac:
    Machine Name:     PowerBook G4 15"
    Machine Model:     PowerBook5,6
    CPU Type:     PowerPC G4 (1.2)
    Number Of CPUs:     1
    CPU Speed:     1.5 GHz
    L2 Cache (per CPU):     512 KB
    Memory:     1 GB
    Bus Speed:     167 MHz
    Boot ROM Version:     4.9.1f1
    State:     Enabled
    Version:     1.0
    System Version:     Mac OS X 10.4.2 (8C46)
    Kernel Version:     Darwin 8.2.0
    The problem only seems to occur with JSF projects. When I switch from a JSF-JSP document "code" tab to a "design" tab in a project, it takes 60+ seconds... always. The entire IDE freezes up at this point.
    I've also noticed the following start-up errors in JDev:
    /Users/rhayes/jdevhome/lib/ext/junit_addin.jar!/meta-inf/jdev-ext.xml
    Converting JDeveloper 10.1.2 extension manifest to 10.1.3
    /Users/rhayes/jdevhome/lib/ext/bc4j_junit_addin.jar!/meta-inf/jdev-ext.xml
    Converting JDeveloper 10.1.2 extension manifest to 10.1.3
    /Users/rhayes/jdevhome/lib/ext/jalopy-jdeveloper-1.1.4.jar!/META-INF/jdev-ext.xml
    Error: <Line 3, Column 21>: XML-24534: (Error) Element 'feature' not expected.
    Error: <Line 11, Column 14>: XML-24521: (Error) Element not completed: 'extensions'
    I have JDev 10.1.2 and 10.1.3 installed on the same Mac with different ".app" extensions. Is this a problem?
    I'm running 10.1.3 on WinXP Pro and I don't notice any of these problems...

    Doing what you mentioned improves the speed by about 50%.
    However, the JSF form then becomes a little more difficult to work with.
    Thanks.

  • JSF Rendering problems

    Hello
    I have encountered tow problems using JSF 1.0
    First:
    I have a site that has a css file asociated with it.
    In this css file i have a class for the option tag "<option>".
    My problem is that JSF dose not provide a way to pass and render the class attribute on the option tag.
    Is there a way to render this attribute on the option tag without extending the component or writing a renderer for it?
    Second:
    How can I pass the attributes colspan and rowspan of a <td> element rendered for a panelGrid tag without extending the component or writing a renderer for it?
    Thx.

    Hello again
    I forgot to mention this for th above problem.
    The problem with the option tag is that this jsf code
    <h:selectOneMenu id="someId" value="" styleClass="select">
    <f:selectItems value="#{Dummy.dummySelects}" />
    </h:selectOneMenu>
    generates this HTML code
    <span class="select">
    <select id="someId" name="someName" size="1">
    <option value="dummy select">dummy select</option>
    <option value="dummy select">dummy select</option>
    <option value="dummy select">dummy select</option>
    <option value="dummy select">dummy select</option>
    </select>
    </span>
    the class="select" attribute should be on the <select> tag but is on the <span> tag.
    Why is this and how can I fix it ?

  • JSF encoding problem with Russian

    Hi,
    I am new to JSF, trying to build prototype i18n JSF app with MyFaces 1.1.5
    Mostly care about IE6/7, do not officially support other browsers.
    I do have resource bundles, it is localized and internationalized.
    So user is supposed to work in either English or Russian.
    It all works except a few issues:
    1) When user enters something in Russian in inputText field on the first page,
    trying to pass it to the next page via managed bean.
    But instead of showing it in Russian, it shows some garbled text in outputText or outputLabel: Îëåã
    FF3 & Chrome show it as: &#1054;&#1083;&#1077;&#1075; [&#xxxx, where xxxx us a 4 digits]
    It does pick up labels from correct bundle on the next page, so locale is changed correctly.
    Actually, when I switch locale on the same first page, getting the same problem (after it's refreshed).
    Seems to work OK with Spanish
    Is that incorrect Cyrillic encoding, JSF encoding or broken Unicode or locale?
    How can we fix that ?
    Less important issues:
    2) When we switch locale (correct values in bundles), on the screen it can not change currencyCode, currencySymbol, TimeZone,
    it always shows the first one it picked, although dateTime and Number formatting changes correctly;
    3) In IE6 "alt" tag attribute produces garbled characters in Russian (black vertical squares), looks like IE6 bug; FF3 & Chrome work fine.
    Please help !
    TIA,
    Oleg.

    For 1, you are not passing the characters in the correct encoding from one page to the next when you pass the parameter (most likely).

  • JSF dataTables - Problem during retrieving data from bean

    Hi, Below is the Stack Trace got on displaying data using JSF datatables.
         This error occurs somtimes and is not very frequent.We are using jboss seam, jboss-4.0.5.GA server and Hibernate.
         Anyone knows about this problem and how it can be resolved?
         Thanks in advance
         javax.faces.el.EvaluationException: Cannot get value for expression '#{loc.companyName}'
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1075)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:508)
              at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:433)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
              at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
              at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
              at org.apache.myfaces.shared_impl.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:54)
              at org.apache.jsp.menu_jsp._jspx_meth_h_panelGrid_0(menu_jsp.java:225)
              at org.apache.jsp.menu_jsp._jspx_meth_f_subview_0(menu_jsp.java:118)
              at org.apache.jsp.menu_jsp._jspService(menu_jsp.java:87)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
              at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
              at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_h_form_0(finish_005fregistration_jsp.java:263)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_f_view_0(finish_005fregistration_jsp.java:139)
              at org.apache.jsp.finish_005fregistration_jsp._jspService(finish_005fregistration_jsp.java:93)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
              at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
              at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
              at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
              at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at com.kmedia.filter.RequestFilter.doFilter(RequestFilter.java:184)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)
         Caused by: java.lang.NullPointerException
              at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              at org.jboss.seam.jsf.SeamApplication11.getPropertyResolver(SeamApplication11.java:197)
              at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
              at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
              at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:154)
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
              ... 70 more
         10:23:55 Servlet.service() for servlet jsp threw exception
         Also check the JSF page, Backing bean, and VO
         JSF page
         <h:dataTable value="#{finishedRegistrationBean.list}" var = "loc" >
                        <h:column>
         <f:facet name="header">
                        <h:outputText value="#{displaymessages.registrationDate}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText value="#{loc.registrDate}" /> </span>
                                                                                                   </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.companyName}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.companyName}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                             <h:outputText value="#{displaymessages.Address}" />
                             </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.address}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.Action}" />
                        </f:facet>
                        <h:commandLink target="_blank"
                        action="#{finishedRegistrationBean.viewFinishedRegistrationPage(loc)}">
                        <h:graphicImage value="images/view_icon.gif"
                        alt="#{displaymessages.info_tooltip_view}"
                        width="17" height="17" style="border:0" />
                        </h:commandLink>
                        </h:column>
    </h:dataTable>
    Backing bean
                        @Name("finishedRegistrationBean")
                        public class FinishedRegistrationBean {
                             @In
                             private User user;
                             @In
                             private FacesMessages facesMessages;
                             private List<FinishedRegistrationVO> list;
                             public FinishedRegistrationBean() throws KMException {
                                  filterFinishedRegistration();
                             public void filterFinishedRegistration() throws KMException
                             list = new ArrayList<FinishedRegistrationVO>();
                             finished_list = userDAO.searchFinishedRegistrationDetails(country_code,uniqueID, companyName, user.getUserName());
                             public void setList(List<FinishedRegistrationVO> list) {
                                  this.list = list;
                             public List<FinishedRegistrationVO> getList() {
                             return list;
    FinishedRegistrationVO
         public class FinishedRegistrationVO {
              private String uniqId;
              private String companyName;
              private Date registrDate;
              private String address;
              public String getCompanyName() {
                   return companyName;
              public void setCompanyName(String companyName) {
                   this.companyName = companyName;
              public String getAddress() {
                   return address;
              public void setAddress(String address) {
                   this.address = address;
              public String getUniqId() {
                   return uniqId;
              public void setUniqId(String uniqId) {
                   this.uniqId = uniqId;
              public Date getRegistrDate() {
                   return registrDate;
              public void setRegistrDate(Date registrDate) {
                   this.registrDate = registrDate;
         }

    Could you please post your
    -HBM
    -faces-config.xml

  • ADF JSF URL problems...

    Hi All,
    I have the following requirement. Please could someone help me out?
    1) I have a dot net application into which I can log in with either the Canadian or US context. This is kind of multi-orging.
    2) Once logged in, the user needs to right click on a value in a panel inside this Windows dot net application and click a menu option.
    3) Once the option is clicked, a new JSF page will open. The URL for this JSF page will have the parameters such as the user country code plus the document number of the panel value.
    4) For this JSF page I am planning on an ADF JSF application. The application module for this application will have two database connections, basically two different schemas which are triggered based on the context information. These are already available in the bc4j.xcfg file.
    5) Based on the country parameter passed in the URL, I need to alternate the database connection information on the root application module created by the application between teh two database schemas using the bc4j.xcfg file in the Model project of the application. This needs to be done dynamically through the code.
    In order to fulfill the above requirement, I need to do the following:-
    1) As soon as the URL is triggered, the ADF application needs to read the URL parameters and set the context specific database schema of the application module without pressing a button or any other manual user trigger in hte JSF page. Basically I am looking at loading the JSF page dynamically after having set the database schema on the application module that was instantiated using the URL parameters
    2) After step 1, since the database schema is now set on the context I will be able to use the database schema to load data from the database objects.
    3) Each schema has a database trigger which runs when the database connection is initiated. This is used to set the multi-org context.
    Please could someone help me out with step 1 above on how to read URL parameters without any user triggers on the JSF page and setting the database schema on the application module being used by the application. Please remember that I am not using JDBC data sources but JDBC URL's to create m application.
    Any code samples to load the current application module instance and setting the database connection on the same from bc4j.xcfg would be very very helpful.
    Thanks a lot.
    Regards,
    Lester.

    Hi safir,
    thanks for your answer.
    With JSF also "normal" Links should be handled like Form-submit links
    ("Command buttons")
    (see in JSF manual "Using java server faces tech.", page 82 Handling Events: Application Events: #
    <i>Because app. events apply to the entire application, this kind of event is currently used for
    navigation between pages of the app.</i>)
    So it is a general Problem, you cannot copy the links from the browser.
    I understand, that is is not a bug,
    but is there maybe a solution for my problem?
    I want to use JSF, because of the good form validation
    operations.

  • JSF rendering problem in IE

    Hi,
    I am having a problem with the following JSF page:
    <f:view>
    <afh:html binding="#{backing_add_Sponsor.html1}" id="html1">
    <afh:body binding="#{backing_add_Sponsor.body1}" id="body1">
    <h:form binding="#{backing_add_Sponsor.form1}" id="form1">
    <af:panelPage title="Add - Sponsor"
    binding="#{backing_add_Sponsor.panelPage1}"
    id="panelPage1">
    <af:message binding="#{backing_add_Sponsor.message1}" id="message1"/>
    <h:panelGrid columns="3" binding="#{backing_add_Sponsor.panelGrid1}"
    id="panelGrid1">
    <af:outputText value="Sponsor Name"
    binding="#{backing_add_Sponsor.outputText2}"
    id="outputText2" inlineStyle="font-size:small;"/>
    <h:inputText binding="#{backing_add_Sponsor.inputText1}"
    id="inputText1" size="30" tabindex="1"/>
    <af:outputText value="Sponsor Address 1"
    binding="#{backing_add_Sponsor.outputText3}"
    id="outputText3" inlineStyle="font-size:small;"/>
    <h:inputText binding="#{backing_add_Sponsor.inputText2}"
    id="inputText2" size="30" tabindex="2"
    style="background-color:transparent;"/>
    Problem is that some fields in this form are displayed differently in Internet Explorer and Firefox. In IE some of them have yellow background, that disappears during the page refresh and is displayed again after the page is refreshed. For example, the "Sponsor Name" field has no background color, while "Sponsor Address 1" has. In Firefox all the fields are correctly displayed without the background color.
    Did anyone have similar problem?
    Thank you,
    Zrinka

    Hi,
    which version of IE do you use. If this occurs in IE7, please check with IE6. Also, make sure there is no browser setting causing this issue. Different behavior in color usually doesn't point to a rendering but a browser problem
    Frank

  • Studio 3.1 & Portal 9.2 - JSF portlet problem

    Hi, first time here.
    Let say I have create a simple jsf navigation application using Studio 3.1 like this:
    // inside faces-config.xml
    <navigation-rule>
    <from-view-id>/pages/inputname.jsp</from-view-id>
    <navigation-case>
    <from-outcome>greeting</from-outcome>
    <to-view-id>/pages/greeting.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    I have done all beans config and resources bundling. After all I run it successfully in server.My next step is to create a portlet, holding the first jsp page. Oh, well, Studio can't do it and I have to do it in Portal 9.2
    What should I do now? I have try many method to import my project into it and of course it is not working.
    To my knowledge, portal support PageFlow (Controller.java) but i dunno about MyFace (faces-config.xml).

    Hi Rene,
    When you found out that you misread the instrucition and you already ran the script, what did you do next? Did you restore the db and redo over? Or did you continue on? I have the same problem with you too but I'm not sure what to do next.
    Trina :)
    [email protected]

  • JSF Version problems

    I have a backing bean that extends com.sun.rave.web.ui.appbase.AbstractPageBean and I'm having some troubles with it. I put some output in some of the methods I overrode, for example the constructor, init(), destroy(), preprocess(), prerender(), and afterRenderResponse() and I'm noticing that when I use different versions of JSF, some of the methods don't get called. If I use the JSF 1.1_02 versions of jsf-api.jar and jsf-impl.jar, the afterRenderResponse() method gets called, but if I use the JSF 1.2_04 version of jsf-api.jar and jsf-impl.jar, the afterRenderResponse() method doesn't get called, but I need to be able to call that method. Does anyone know why it that method doesn't get called in the 1.2 version?

    I'd estimate the current number of facelets users to be a fraction of a percent of JSP users, maybe thousand or so.
    I'v used facelets since very early versions, and it does deliver it's promise. However, at the same time it introduces it's own layer of new problems.
    For the recent projects i'v went back to JSP. My crystal ball does not see wide adaptation of facelets in the fortune 500.
    You can see some discussion about GlassFish hosting here:
    http://forums.java.net/jive/thread.jspa?messageID=103589&tstart=0#103589
    Another thing worth considering is that if you start development now tomcat 6 will be probably out before you go public.
    -Henri

  • Jahia + JSC2 + jsf : Major problems with Navigation errors:

    Hi,
    I am trying to embed a JSC jsf app inside a Jahia cms container running opn tomcat4.1 and I get the following
    "Entity enclosing requests cannot be redirected without user intervention "
    For some reason the navigation aspcect of jsf does not work. I suspect it is the jahia redirection code that is causing this.
    Has anybody any experience of Jahai + JSF?
    Any help on this much appreciated.
    LOTI.

    Hi,
    you use in your navigation rules "success" and "failure". But your actions in your links refer to "success" and "fail".
    "fail" is not defined and this means the navigation leads back to same page.
    Yes, you can use multiple forms, but validation is applied to all components, also the ones that are not in the submitted form. They addressed this bug for next release.
    I believe they will support frames. Now it's not working because there is only one component tree.
    The back button bug is addressed. We have to wait for next release.
    Debugging is really difficult, JSF don't tell you much about problems. Hope this will be different in later releases.
    Greetings,
    Rene

  • Running JSF ToyStore problem

    Hi,
    I just download the JSF version of the ToyStore and then I create the two users.
    I right-click the index.jsp to run it but it shows the following error
    Request URI:/ADFToyStore/index.jsp
    Exception:
    OracleJSP:java.io.FileNotFoundException: C:\adf_example\ADFToyStoreJSF\ToyStoreModel\public_html\index.jsp (The system cannot find the file specified.
    Any suggestion ?
    Ivan

    thanks frank for ur reply
    i know that the problem is not with JSF it is the problem with OC4J server
    and another thing I was able to deploy it in a tomcat server but when I am trying 2 run it it gives some exception...but I am sure that I will be able to correct it as soon as possible
    basically I am working in solaris box so my thought is that there is a problem in "ojc.sh" file...anyways I am trying 2 sort it out
    keep in touch

  • TinyMCE / Mojarra Scales HtmlEditor +  JSF RI problems

    I am trying to add a Rich Text editor on my project, so far I've tried TinyMCE and Mojarra Scales HtmlEditor without complete success, both are being rendered but after that I have the following problems:
    TinyMCE:
    Is being displayed but when I click on the "Save" button to execute the action and go to the following page the tinyMCE editor on the second page is not being rendered, and if click on the "Back" button to go back to the first page then the tinyMCE editor on that page is not being rendered anymore.
    MojarraScales"
    The component is being rendered but when I click on the "Save" button to go to the next page all it does is reload the first page, so I'm not able to access the second page.
    Thanks in advance

    Hi Raymond, yes the "Save" button use to work with an ordinary textarea. I added the <h:messages/> tag and I'm not getting anything and Firebug is not reporting any error, here is the code on the first page:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:a4j="http://richfaces.org/a4j"
         xmlns:rich="http://richfaces.org/rich" version="2.0"
         xmlns:sc="http://java.sun.com/mojarra/scales">
         <ui:composition template="/templates/member_t.jspx">
              <f:loadBundle basename="resources/messages" var="msg" />
              <ui:define name="body">
                   <f:view contentType="text/html">
                   <head>
                        <sc:links />
                   </head>
                        <h:form id="descForm">
                             <h:panelGrid columns="1">
                                  <h:outputText value="#{msg.newCntTitle}" />
                                  <h:inputText size="68" />
                                  <h:outputText value="#{msg.newDescTitle}" />                              
                                  <sc:htmlEditor id="one" width="500px" height="300px" value="#{ArticleBean.description}" />   
                                  <h:panelGroup>
                                       <h:commandButton value="#{msg.newBtnBack}" disabled="true" />
                                       <h:commandButton value="#{msg.newBtnCont}"
                                            action="#{ArticleBean.saveNewArt}" />
                                  </h:panelGroup>
                             </h:panelGrid>
                        </h:form>     
    <h:messages/>          
                   </f:view>
              </ui:define>
         </ui:composition>
    </jsp:root>I followed the configuration on Mojarra's website, first I added this jsftemplating-base-1.2-SNAPSHOT.jar and the dependency to Maven, and then I added this code to my faces-config.xml
         <lifecycle>
              <phase-listener>
                   com.sun.jsftemplating.util.fileStreamer.FileStreamerPhaseListener
              </phase-listener>
         </lifecycle>If you have any suggestions please let me know

  • H:commandButton - jsf navigation problem

    Dear All,
    I changed the first page of my application from pageA.jsf to pageB.jsf in the index.jsp file:
    <jsp:forward page="/pages/pageB.jsf" />
    The pageB.jsp is a new page that I just created.
    (I have
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    in the web.xml )
    in the B.jsp I have two "h:commandButton" :
    <td><h:commandButton id="submitB1" value="Upload" action="submitB1"/></td>
    <td><h:commandButton id="submitB2" value="Search" action="submitB2"/></td>
    and in the face-config.xml I have
    <navigation-rule>
    <from-view-id>/pages/pageB.jsp</from-view-id>
    <navigation-case>
    <from-outcome>submitB1</from-outcome>
    <to-view-id>/pages/pageB1.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>submitB2</from-outcome>
    <to-view-id>/pages/pageB2.jsp</to-view-id>
    </navigation-case>
    I can load the pageB but cannot be navigated to pageB1 or B2. Before I changed pageA.jsf to pageB.jsf, the nevigation worked well.
    Anyone has any idea of what would be the cause please help me out.
    Thank you very much in advance for your help

    In the future, please use code tags to post code. This way they will be nicely formatted and (much) better readable, otherwise likely everyone will ignore it. Press the CODE button to get them and use Preview tab to preview.
    However on the new page it seems there is no view root. The bean for the new page is never accessed as it cannot be found.What does the appserver logs say?

Maybe you are looking for

  • GRC AC 10.0 Risk Terminator Bug

    Hello All, We have been experiencing a strange behavior while running Risk Terminator. It works well when we generate the role by calling the transaction PFCG in target development system  , however when we go to Roles tab from Su01 and go to pfcg sc

  • Why does TextEdit keep loosing what I typed?

    I just lost a whole hours worth of research. I was typing in text edit and then it started making me duplicate the file at every save and then I had to replace the orginal, and I did this several times until I finally decided to close it down (as it'

  • I Cant install Updates for PS Elements 9

    Hello, Im trying to install PS Elements 9.0.3 update, and Camera Raw 6.5. The response was simply "some updates failed to install", and the updates were listed. Any ideas? Thank You

  • Issue in opening client context - segmentation

    Hi, I am new to CQ5. I've created a new segment. To test that, I selected the segment and pressed Ctrl-Alt-C to open the client context. But the client context is not opening. Is there any other way to open it? Pl help. Thank you!!! Regards Dilip B S

  • Fix your email problem

    Use our Troubleshooting Tool to diagnose and fix common email problems. Troubleshoot Now Forgotten Telstra broadband username or password If you can’t remember your Telstra broadband username or password ([email protected], [email protected], user@bigp