JSF Phase listeners

What is a phase listener? Will every request goes through these phase listeners?

With a PhaseListener you can hook on one or more phases of the JSF lifecycle. Useful if you want to do some handlings before or after a certain phase. Only a request which is been passed through the FacesServlet will go through the PhaseListener.
You can see them like as a javax.servlet.Filter specific for JSF.

Similar Messages

  • Exceptions swallowed in Phase Listeners

    To frame this question.. we have implemented phase listeners at our company to perform "framework-type" tasks within all of our applications. These phase listeners perform critical tasks.
    We just received a JSF fixpack from IBM and suddenly, all of the exceptions that occur in the phase listeners are eaten/ignored.
    When we questioned what was going on, they pointed us to this part of the 1.2 JSF Spec:
    Section 11.3. PhaseListener
    The beforePhase() method is called before the standard processing for a particular phase is performed, while the afterPhase() method is called after the standard processing has been completed. The JSF implementation must guarantee that, if beforePhase() has been called on a particular instance, then afterPhase() will also be called, regardless of any Exceptions that may have been thrown during the actual execution of the lifecycle phase. For example, let�s say there are three PhaseListeners attached to the lifecycle: A, B, and C, in that order. A.beforePhase() is called, and executes successfully. B.beforePhase() is called and throws an exception. Any exceptions thrown during the beforePhase() listeners must be caught, logged, and swallowed. In this example, C.beforePhase() must not be called. hen the actual lifecycle phase executes. Any exceptions thrown during the execution of the actual phase must not be swallowed. When the lifecycle phase exits, due to an exeception or normal termination, he afterPhase() listeners must be called in reverse order from the beforePhase() listeners in the following manner. C.afterPhase() must not be called, since C.beforePhase() was not called. B.afterPhase() must not be called, since B.beforePhase() did not execute successfully. A.afterPhase() must be called. Any exceptions thrown during the afterPhase() liseteners must be caught, logged, and swallowed.
    So now even if an exception occurs in the phase listsners, we never know about it and they Faces LIfecycle continues.
    Can someone on the Spec team address this? We have critical code in our phase listeners, and if an exception occurs, the app shouldn't continue. Help!!

    What I really am looking for from someone on the expert group is an explanation of this part of the spec, as well as how we as developers should deal with critical exceptions that occur in phase listeners.
    Right now we have implemented Servlet container-level exception handling that catches the exceptions today, logs them and routes the user to an error page. With the 1.2 spec, the error will occur, but the app continues on as if nothing went wrong. What are the alternatives?
    It boggles my mind that exceptions should ever be swallowed. If that's the case, then I think what the spec is saying is that you shouldn't put any code in the phase listeners since JSF will continue on regardless of what occurs.
    Since no developers have replied to this, I assume that nobody else has code in phase listsners? Maybe I'm the only one who's alarmed by this?
    Dave

  • How to get the current JSF phase in backing bean?

    How to get the current JSF phase in backing bean?
    Edited by: jimmy6 on Nov 27, 2007 7:27 AM

    I am using phasetracker to trace it also.I want to know whether it is it render response phase. I know FacesContext.getCurrentInstance().getRenderResponse() work for normal jsf component but it will not work for qiupukit datatable. FacesContext.getCurrentInstance().getRenderResponse() will not return true in the following phase. Why?
    [ INFO] 27-11-07 16:20:21 : BEFORE RENDER_RESPONSE(6) (http-80-Processor23)
    I want the 'get' method of datatable being called in response phase to reduce the number of calling because i put the query in 'get' method there. Actually i still straggling with the best practice to code the datatable...

  • Obtaining the current JSF Phase

    Hi all,
    One of the ways to obtain the current JSF phase is by implementing a phase listener. However, I would like to know if there are any simpler ways to obtain the current JSF phase that my code is executing in. For example, I would like to know what phases my getters for my beans is executed in. So, every time when my getters for my beans are executed, I would like to know what phase it gets executed in.
    Thanks,
    Mun Wai

    I am using phasetracker to trace it also.I want to know whether it is it render response phase. I know FacesContext.getCurrentInstance().getRenderResponse() work for normal jsf component but it will not work for qiupukit datatable. FacesContext.getCurrentInstance().getRenderResponse() will not return true in the following phase. Why?
    [ INFO] 27-11-07 16:20:21 : BEFORE RENDER_RESPONSE(6) (http-80-Processor23)
    I want the 'get' method of datatable being called in response phase to reduce the number of calling because i put the query in 'get' method there. Actually i still straggling with the best practice to code the datatable...

  • Doubts abour JSF proccesing lifecycle and JSF phases

    Hi,
    I have doubts about the processing lifecycle of a JSF application if there are two different requests from the same user. For example, suppose an application with two buttons:
    Button 1 --> A load button connected to a actionListener method that load a lot of data from data base that will be showed in a table.
    Button 2 --> A Cancel button with immediate=true and connected to a action method that force a navigation to the same page when is pressed.
    Suppose the following sequence:
    1 -. User press button 1, I think that the following phases are executed:
    Request View --> Apply Request Values --> Proccess Validation --> Update model Values --> Invoke Application (in this phase the actionListener method is executed to load the data from database) --> Render Response (take long time)
    2-. Due to a big quantity of data the Render Response take long time and when the lifecycle is in that phase the user press the button 2. I suppose that the following sequence of phases are executed:
    Request View --> Apply Request Values -->Invoke Application (Action method that return a navigation case) --> Render Response (Render the page to the user)
    My question is, if the first request is in the Render Response phase, what happens with this phase when the second request generated by the Button 2 arrive to the server??? When the second request arrive to the server, JFS automatically cancel or stop the proccesing of the Render Response of the first request ?
    Thank you for your knowledge.

    It's always helpful to configure a "debugging" lifecycle listener that just prints out each lifecycle phase, so you can tell which phases are being executed, and in which phase some breakpoint is hit.
    This is as simple as:
    package tabpanelbug;
    import javax.faces.event.PhaseEvent;
    import javax.faces.event.PhaseId;
    import javax.faces.event.PhaseListener;
    public class LifeCycleListener implements PhaseListener
        public void beforePhase(PhaseEvent event)
        { System.out.println("BeforePhase: " + event.getPhaseId()); }
        public void afterPhase(PhaseEvent event)
        { System.out.println("AfterPhase: " + event.getPhaseId()); }
        public PhaseId getPhaseId()
        { return PhaseId.ANY_PHASE; }
    }and
    <lifecycle>
        <phase-listener>tabpanelbug.LifeCycleListener</phase-listener>
    </lifecycle>

  • Use of JSF Phase Listener?

    There are many many examples of how to 'access' the six phases of the JSF Life Cycle.
    I have a simple page that has two input text fields and one command button.
    I would like to be able to access the contents of the text fields on the page in Phase 2 (APPLY REQUEST VALUES), or other phases. After quite a bit of time I am posting this in the hopes that someone could point me in the correct direction to do this or perhaps someone has a simple example.
    Thanks - Casey

    Code for phase listener, backing bean and output are at the bottom of this note.
    The text field has a Id property of lname. I assume you are referring about using findComponent() against the backing bean that has a corresponding property (RichInputText) for the text field?
    When I run the app I am getting a null for the objReference for the backing bean (line 16 in the output) - see output which then causes a NullPointerException.
    Suggestions on how to get the reference to the backing bean, or the component that will contain the data for the input text field?
    Thanks again - Casey
    The code I am using in the Phase Listener class is:*
    +public class MyPhaseListener implements PhaseListener {+
    +public MyPhaseListener() {+
    +}+
    +public void beforePhase(PhaseEvent pe) {+
    if (pe.getPhaseId() == PhaseId.RESTORE_VIEW)
    System.out.println("Processing new  Request!");
    System.out.println("before - " pe.getPhaseId().toString());+
    +if (pe.getPhaseId().toString().equals("APPLY_REQUEST_VALUES 2")) {+
    System.out.println("lkjhlkjhlkjhlkjh");
    +}+
    +if (pe.getPhaseId().toString().equals("APPLY_REQUEST_VALUES 2")) {+
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ELContext elContext = facesContext.getELContext();
    ExpressionFactory expressionFactory =
    facesContext.getApplication().getExpressionFactory();
    ValueExpression exp =
    expressionFactory.createValueExpression(elContext,
    +"#{BackingBean}",+
    BackingBean.class);
    BackingBean nameData = (BackingBean)exp.getValue(elContext);
    System.out.println(nameData);
    System.out.println(nameData.getLname().findComponent("lname"));
    +}+
    +}+
    +public void afterPhase(PhaseEvent pe) {+
    System.out.println("after - " pe.getPhaseId().toString());+
    if (pe.getPhaseId() == PhaseId.RENDER_RESPONSE)
    System.out.println("Done with Request!\n");
    +}+
    +public PhaseId getPhaseId() {+
    return PhaseId.ANY_PHASE;
    +}+
    +}+
    The code for the backing bean is:*
    package view;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    +public class BackingBean {+
    private RichInputText lname;
    +public BackingBean() {+
    +}+
    +public void setLname(RichInputText lname) {+
    System.out.println("In setLName");
    this.lname = lname;
    +}+
    +public RichInputText getLname() {+
    System.out.println("In getLName");
    return lname;
    +}+
    +}+
    Output from System.out.println statements:*
    Processing new  Request!
    before - RESTORE_VIEW 1
    after - RESTORE_VIEW 1
    before - RENDER_RESPONSE 6
    In getLName
    In setLName
    after - RENDER_RESPONSE 6
    Done with Request!
    Processing new  Request!
    before - RESTORE_VIEW 1
    In setLName
    after - RESTORE_VIEW 1
    before - APPLY_REQUEST_VALUES 2
    lkjhlkjhlkjhlkjh
    null
    after - APPLY_REQUEST_VALUES 2
    +<Jul 13, 2009 8:27:14 AM CDT> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@857c75 - appName: 'Application8', name: 'Application8-ViewController-context-root', context-path: '/Application8-ViewController-context-root', spec-version: '2.5', request: weblogic.servlet.internal.ServletRequestImpl@1c70722[+
    +POST /Application8-ViewController-context-root/faces/untitled1.jspx?_adf.ctrl-state=793257214_3 HTTP/1.1+
    +Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/x-shockwave-flash, */*+
    +Referer: http://127.0.0.1:7101/Application8-ViewController-context-root/faces/untitled1.jspx?_adf.ctrl-state=793257214_3+
    +Accept-Language: en-us,de;q=0.5+
    +Content-Type: application/x-www-form-urlencoded+
    +UA-CPU: x86+
    +Accept-Encoding: gzip, deflate+
    +User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)+
    +Content-Length: 269+
    +Connection: Keep-Alive+
    +Cache-Control: no-cache+
    +Cookie: JSESSIONID=wBr1Kb2GrCDpnhkNNgQyTvJvSjlnWHyvnq9gNWT92kvsFYlGC1Jl!1059440035+
    +]] Root cause of ServletException.+
    java.lang.NullPointerException
    +     at view.MyPhaseListener.beforePhase(MyPhaseListener.java:42)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:228)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)+
    +     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)+
    +     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)+
    +     Truncated. see log file for complete stacktrace+

  • Strange behaviour concerning JSF phases

    Hi all,
    I have a JSF page that displays two custom JSF tables, ‘A’ and ‘B’ with his correspondent’s pagers.
    <mycustom:table id="A" ... pager="#{tableA.pager}">
    <mycustom:table id="B" ... pager="#{tableB.pager}">I experiment a strange behaviour when I hit ‘tableA.next’ link.
    This is the flow (summarized):
    First-Page-Load (START)
    encodeA
    encodeB
    First-Page-Load (END)
    <User hits TableA.nextPage pager link>
    decodeA
         pagerA.setNext(true)
    decodeB
    encodeA
         pagerA.getNext() returns ‘false’ ¿? (here is the problem! should return ‘true’)
    encodeB
         pagerB.getNext() returns ‘true’ ¿? (should return ‘false’)Any help will be appreciated...

    Self-solved:
    Inside the ‘decode’ method I must get the ‘pager’:
    pager = getPager(table); //This line is essential!!
    String pLink = (String)requestMap.get("pLink" + clientId);
    if ((pLink != null) && (!pLink.equals(""))) {
         if (pLink.equals("next")) { //Siguientes                                         
              pager.setNext(true);
         } else if (pLink.equals("previous")) { //Anteriores
              pager.setPrevious(true);
    }

  • Web application JSF

    Hi, i'm new at JSF and i want to know which package distribution i should use for my web application. When i made desktop applications i had different packages (in order to use MVC pattern) like a
    beanPackage where i stored my POJOS,
    a businessPackage where i stored the logic of the business,
    a viewPackage where i stored the gui,
    and the daoPackage for my data access objects.
    Now in a web application using JSF what package shoud i use? there are backing Beans, where do i put them? do they keep (business logic) what kind of package distribution should i use for my web application?.

    When i have a 3 tier application my packages are structured mostly like this:
    com.mycompany -> root
    com.mycompany.ejb -> EJB Jar stuff (i used to have .facade and other packages but with JBOSS SEam it seems uncecessary)
    com.mycompany.ejb.session -> EJB session beans (with subpackages reflecting business domain)
    com.mycompany.ejb.message-> EJB MDB beans
    com.mycompany.ejb.entity-> EJB entity beans
    com.mycompany.jsf -> JSF stuff
    com.mycompany.jsf.bean -> backing beans - add subpackages if necessary
    com.mycompany.jsf.listener -> jsf phase listeners
    com.mycompany.jsf.validator -> jsf validators
    com.mycompany.servlet -> servlet stuff
    com.mycompany.servlet.filter -> servlet filter stuff
    com.mycompany.servlet.listener -> servlet listener stuff
    com.mycompany.tag-> taglib stuff
    com.mycompany.util-> global utils stuff
    com.mycompany.exception-> exceptions

  • Slow performance during Apply Request Values Phase of JSF lifecycle

    Dear all,
    I found that my application is sucked at the Apply Request Values Phase of JSF lifecycle when I submit the page. (Totally spend 1 min to pass this phase)
    In the application, there is around 300 input fields in the page. Who know how can I ehance the performace?
    Thanks.

    Thanks a lot for your help. Maybe I explain more about my current structure
    I need to develop a input form for course instructor to input students' assignment / examination result (max 9 assignments and 1 examination).
    so that I have below coding:
    *1. bean to store marks of a student*
    public class Mark {
    private String studentID = "";
    private String mark1 = "";
    private String mark9 = "";
    private String markExam = "";
    //getter & setter of above properties
    public void setMark1(String mark1) {
    this.mark1 = mark1;
    public String getMark1() {
    return this.mark1;
    *2. backing bean*
    public class markHandler {
    ArrayList<Mark> marks = new ArrayList<Mark>();
    //getter & setter of above property
    //method to retrieve list of student (this will be the action before go in mark input page)
    public void getStudentList() {
    //get student list from database
    for(int i = 0 ; i < studentCount; i++){
    //initial mark of student
    Mark mark = new Mark();
    mark.setStudentID(studentID);
    mark.setMark1("");
    mark.setMarkExam("");
    //put into arraylist
    marks.add(mark);
    *3. mark input page*
    <html>
    <h:dataTable value="#{markHandler.marks}" var="e">
    <column>
    <h:output value="#{e.studentID}" />
    </column>
    <column>
    <h:input id="mark1" value="#{e.mark1}" />
    </column>
    <column>
    <h:input id="mark1" value="#{e.markExam}" />
    </column>
    </h:dataTable>
    <h:commandButton action="#{markHandler.save} />
    </html>
    When I submit the page, It seems that there is a long time spent at the input field of datatable at Apply Request Values Phase. (I use Phase Listeners to test the time difference before & after phase)
    Pls help. Thanks.
    Edited by: Daniel_problem on Aug 15, 2008 10:34 AM
    Edited by: Daniel_problem on Aug 15, 2008 10:36 AM

  • Hi how to use phase listener in jsf

    hi
    i have a scenariao were the data have to fetched form database before the page gets loaded . so i came abt phase listeners . so can anybody give some example for phase listener.....
    thanks

    This is just basic Java knowledge, but anyway ..public class SomeClass {
        static {
            // static initialization block, this is executed only once per runtime, before the first instantiation.
            // Initialization block, this is executed before the constructor on every instantiation.
        public SomeClass() {
            // the constructor, this is executed on every instantiation.
    }

  • Dynamic creation of Controls in JSF ??????

    i just started on JSF...I've good experience with ASP.NET....
    I have liked what I've seen so far in JSF.....It's pretty straight forward ...neat clean and simple...
    What I am looking for in JSF is a way to create controls in a page dynamically.... A simple thing like UIRootView.....parent control...add(controltype).. something like that.....
    Is it possible ? ie, can we have a staright forward access to the control tree at some stage of life cycle of a request without having to write view handlers or Phase listeners ?
    Pardon my ignorance....I am just a new guy who is getting sold on the JSF idea ....

    Thanks... but I am not sure if I understand you correctly. can you elaborate on it ?
    also, what's stopping me from accessing the API to do that same thing as ASP.net ? Tree,TreeFactory etc. might be the answer. There's got to be some API which does the management of control tree in the first place.
    Now the quest is to find it and use it.
    Any clues on this front ? Also, maybe this thread will catch the attentoin of someone who can add to the "wishlist" for JSF...It is an useful feature
    for the dynamic world we live in....DON'T YOU THINK ?

  • JSF 1.2 + Facelets = ClassNotFoundException

    I have a pure Facelets application (no JSP) working just fine with JSF 1.1 on Tomcat 5.5.17. From what I understand, since I am not using any JSPs I should be able to just swap in JSF 1.2.
    However, when I switch to JSF 1.2 I get ClassNotFoundExceptions on startup for my phase listeners and custom renders. Essentially, I get a class not found exception for any class in my faces-config.xml file.
    Any thoughts? Anyone else have this issue?
    Caused by: java.lang.ClassNotFoundException: com.myapp.web.faces.event.PartialRendererPhaseListener
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
         at com.sun.faces.util.Util.loadClass(Util.java:406)
         at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:710)
         at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:398)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:328)
    Thanks,
    Randy

    Actually, I am just a bit of an idiot. Turns out I had a compile error that eclipse wasn't showing so it should not be surprising that I get class not found exceptions. :-)
    Thanks.

  • Phase Listener buries exceptions

    This is a JSF question sort of...
    Can anybody hazard a guess why my JSF Phase Listener does not show exceptions when one gets thrown in a method within this PhaseListener?
    I am using ADF/BC and JSF/ADF Faces within JDeveloper 10.1.3.4 and deploying to iAS 10.1.3.4.
    I have not tried the same thing in an ADFPhaseListener...chiefly because I wanted a beforePhase() and an afterPhase() method to override, and Source-->Override Methods did not show these methods as being overrideable...so I just used the normal JSF Phase Listener.
    My theory is that PhaseListener is perhaps accessed by many sessions?? So it has no way to know to where its stack traces should be directed. So I guess I should use logging with some sort of general catch clause for each method...any ideas will be entertained.
    Thanks in advance.

    Here's exactly what it says:
    The beforePhase() method is called before the standard processing for a particular phase is
    performed, while the afterPhase() method is called after the standard processing has been
    completed. The JSF implementation must guarantee that, if beforePhase() has been
    called on a particular instance, then afterPhase() will also be called, regardless of any
    Exceptions that may have been thrown during the actual execution of the lifecycle phase. For
    example, let’s say there are three PhaseListeners attached to the lifecycle: A, B, and C, in
    that order. A.beforePhase() is called, and executes successfully. B.beforePhase()
    is called and throws an exception. Any exceptions thrown during the beforePhase()
    listeners must be caught, logged, and swallowed. In this example, C.beforePhase()
    must not be called. Then the actual lifecycle phase executes. Any exceptions thrown during
    the execution of the actual phase must not be swallowed. When the lifecycle phase exits, due
    to an exeception or normal termination, the afterPhase() listeners must be called in
    reverse order from the beforePhase() listeners in the following manner.
    C.afterPhase() must not be called, since C.beforePhase() was not called.
    B.afterPhase() must not be called, since B.beforePhase() did not execute
    successfully. A.afterPhase() must be called. Any exceptions thrown during the afterPhase()
    listeners must be caught, logged, and swallowedJohn

  • Same JSF page is being displayed after submitting form

    I have a situation where some of my JSF pages occassionally misbehave. For example, sometimes when I click a <h:commandButton/> (which is located within a <h:form> tag) the action which the button is wired to is not executed. Instead the same page is displayed.
    Please note that this glitch happens intermittently with no fixed pattern.
    It is also interesting to note that the data which the user enters (prior to clicking the button) on the JSF form is also lost and has to be re-entered again by the user.
    Functionally, this is only a minor problem however from a usability perspective this is a major major problem!
    I have tried:
    Adding <h:messages /> components to jsp pages in order to see if there are any errors.
    Verified the spelling of the outcomes ("success", "cancel") in my navigation rules and in the action methods.
    Verified the spelling of my bean in the definition as a managed bean in the faces-config.xml file and in the jsp page.
    Verified the name of my action method, in the jsp and in the backing bean.
    Checked by logging if the action method is reached.
    Used the jsf phase tracker to print life cycles phases. However, when the page "misbehaves" this misses out all the application level phases i.e only phases restore view and render response are actually passed.
    Created getters and setters for all bean attributes
    I am desperate to fix this. Has anybody found a solution to this problem? Please let me know!
    Thank you.

    I am using JSF version 1.1 and the application server I am using is BEA WebLogic Server 9.1.
    The page is one in a series like a "bread crumb" trail or in the style of a wizard if you like. The user goes from one page to the next and can go back if he so wishes.
    I have a user form. One part of the form requests the user to enter an email address and then click an "Add" command button. However, sometimes instead of adding the email address to the data table the same JSF page is displayed when the button is clicked and all the data is lost, resulting in the user having to re-enter all the information on the form again!
    Hope this helps.

  • JSF problem on submit event

    Hi to everyone and sorry for my english,
    i've created a web form using jsf tecnology.
    This form contain 2 combo (selectOneMenu) one of this combo contain the region of Italy, so when an user select a region in this combo, on the second combo i'm load the city of this region, for make this i've an onChange event on the first combo this event meke a submit of form, i've also setted the property "immediate" = true.
    So when the first combo chenge value if i've in the form a inputText with property required = "true" the form show me the error message "field required", but i've set immediate = "true"?
    How i can bypass this problem.
    Thanxs a lot,
    Fabio.

    You should still use a value change listener. Putting db calls into your getters should be a last resort anyways. This is because JSF will call getters multiple times, thus causing you to make multiple DB calls.
    Plus, if you don't call renderResponse(), you're going to continue seeing your error message. Setting the immediate attribute doesn't necessarily skip the validation phase, rather, it processes validation in the Apply Request Values phase.
    Anyways, messing with the JSF phases can be a tricky concept for a newer person to understand. However, you should learn what you can about the standard JSF lifecycle.
    Getting to your problem at hand... The quick version is that you need to create a value change listener, attach it to the first combo box (region1), configure the value change listener to retrieve the appropriate values from DB, then set the second combo box (city1) options, and then call renderResponse().
    Here's some code to get you started.
    In your jsp:
    <h:selectOneMenu id="region1" value="#{userBean.selectedRegion1}"
        onchange="submit" immediate="true"
        valueChangeListener="#{userBean.regionSelected}">
    </h:selectOneMenu >In your UserBean class, create the following method:
         public void regionSelected(ValueChangeEvent event)
              throws AbortProcessingException {
              //Get the selected region from the event
              String region = (String)event.getNewValue();
              //Set the selected region in your bean
              setSelectedRegion(region);
              //Call DB to retrieve the city list for the selected region
              //Build Select Items list from record set
              //Set the city list with the new select items
              setCityList(newCityList);
              //Force to render response phase so that any error messages DO NOT get
              //displayed. i.e. Skip update model phase. Use immediate="true" on the
              //component that calls this valueChangeListener so that it does not
              //run any validation.
              FacesContext.getCurrentInstance().renderResponse();
         }That should get you good and started.
    CowKing

Maybe you are looking for

  • NVision monthly report daily ledger

    Hello, We are currently utilizing a daily ledger, with PER timespan corresponding to a daily calendar ( PER 1 - PER 365 for non-leap and PER 1 - PER 366 for leap years). We also have monthly timespans set up for leap and non-leap years ( PER1_L - PER

  • Cisco UCM with Third Party Contact Center Solution

    Hi all, hope everyone is well. Anyone out there running Cisco UCM with a third party contact center solution ? would love to hear your experience on this subject. Thanks in advance !! Danny

  • Importing Wav Files in Soundtrack 4

    How do I import wav files to Soundtrack 4? Thank You!

  • Going from Windows to Mac - Upgrade for Elements?

    I have Elements 10 for Windows and am upgrading to an iMac. Can I get upgrade pricing even though I am installing on a new (different) machine?

  • ITunes 10.4 constantly crashing.

    Hello, I have a PowerBook G4 DLSD and use Itunes for all my music related stuff. Just a few days ago iTunes upon running just crashes. in other words, it crashes upon opening up. What could the problem be?