Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8012701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:24:22+00:00 2026-06-04T19:24:22+00:00

i wish to use cascading dropdown in primefaces 3.2 but its not working. below

  • 0

i wish to use cascading dropdown in primefaces 3.2 but its not working. below is my xhtml code:

<p:selectOneMenu style="width: 150px" value="#{watchBean.exchange}">
                    <f:selectItem itemLabel="NSE" itemValue="nse"/>
                    <f:selectItem itemLabel="BSE" itemValue="bse"/> 
                    <p:ajax event="change" update="sym" listener="#{watchBean.wow}" />
                </p:selectOneMenu> 
            <p:selectOneMenu style="width: 150px" id="sym" value="#{watchBean.sl}" var="scrip">
                <f:selectItems  itemLabel="#{scrip.scripSymbol}" itemValue="#{scrip.scripSymbol}"/>
            </p:selectOneMenu> 

bean code:

import java.util.List;
import javax.annotation.ManagedBean;
import javax.inject.Named;
import javax.enterprise.context.RequestScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.xml.ws.WebServiceRef;
import service.MasterScrip;
import service.StatelessWebService_Service;

/**
 *
 * @author root
 */
@javax.faces.bean.ManagedBean
@javax.faces.bean.RequestScoped
public class watchBean {
    @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8080/StatelessWebService/StatelessWebService.wsdl")
    private StatelessWebService_Service service;

    /** Creates a new instance of watchBean */
    public watchBean() {
    }
    String uname,scripSym,exchange;
    Integer scripID;
    List<UserTrack> ut;
List<MasterScrip> sl;
    public List<MasterScrip> getSl() {
        return sl;
    }

    public void setSl(List<MasterScrip> sl) {
        this.sl = sl;
    }


    public String getExchange() {

        return exchange;
    }

    public void setExchange(String exchange) {
        sl=getAllScripByExchange(exchange);
        setSl(sl);
        this.exchange = exchange;
    }
public void wow(ValueChangeEvent e)
{    
    sl=getAllScripByExchange((String)e.getNewValue());
   // setSl(sl);
    //FacesContext.getCurrentInstance().renderResponse();

    // sl=getAllScripByExchange(exchange);
} ....

i get the following error:

javax.el.MethodNotFoundException: Method not found: beans.watchBean@2e1b13.wow(javax.faces.event.AjaxBehaviorEvent)

i referred to How do I get PrimeFaces <p:selectOneMenu> to call valueChangeListener? and removed the listener from my code, kept only the value attribute for 1st dropdown,still it doesnt work, then it gives no error and the 2nd dropdown isnt filled dynamically.
i am stuck in this, what is the cause of this error and how can it be solved?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:24:24+00:00Added an answer on June 4, 2026 at 7:24 pm

    1) Remove parameter from method wow(). the ajax listener takes no parameter; when the method is executed, the attribute “exchange” contains the new value.
    2) the selectOneMenus should be surrounded by h:form
    3) The second selectOneMenu is wrong. the value attribute of the selectOneMenu should reference the selected item of the combo; not the list of items. the var attribute goes in the f:selectItems tag. the f:selectItems tag is missing the value attribute, which references the list of items. it should look like this:

    <p:selectOneMenu style="width: 150px" id="sym" value="#{watchBean.selectedItem}" >
              <f:selectItems value="#{watchBean.sl}" var="scrip"
                             itemLabel="#{scrip.scripSymbol}"
                             itemValue="#{scrip.scripSymbol}"/>
    </p:selectOneMenu> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wish use a uisegmentedcontrol in my app with 3 segments but not with
I wish to use the Translator classes of Zend framework in my app, but
I have two stored procedures I wish to use in my stored procedure, but
I'm developing an app and I wish use the UIImagePickerController but I wish let
I wish to use a join across some tables but am having some difficulty
I wish to use QtWebKit to load a url for display, but, that's the
I wish to use the following regex for validating a file-upload: /^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(ext)$/ But
I wish to use the jQuery.post class to return (not alert) the response within
I have an HTML code: <div id=first></div> I wish to use javascript (document.findElementById) to
I wish to use Entity Framework Code-first for a new project. So i decided

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.