Strange behavior: action method not called when button submitted

Hello,
My JSF app is diplaying a strange behavior: when the submit button is pressed the action method of my managed bean is not called.
Here is my managed bean:
package arcoiris;
import java.util.ArrayList;
import java.util.List;
import javax.faces.model.SelectItem;
public class SearchManagedBean {
    //Collected from search form
    private String keyword;
    private String country;
    private int[] postcode;
    private boolean commentExists;
    private int rating;
    private boolean websiteExists;
    //Used to populate form
    private List<SelectItem> availableCountries;
    private List<SelectItem> availablePostcodes;
    private List<SelectItem> availableRatings;
    //Retrieved from ejb tier
    private List<EstablishmentLocal> retrievedEstablishments;
    //Service locator
    private arcoiris.ServiceLocator serviceLocator;
    //Constructor
    public SearchManagedBean() {
        System.out.println("within constructor SearchManagedBean");
        System.out.println("rating "+this.rating);
    //Getters and setters
    public String getKeyword() {
        return keyword;
    public void setKeyword(String keyword) {
        this.keyword = keyword;
    public String getCountry() {
        return country;
    public void setCountry(String country) {
        this.country = country;
    public boolean isCommentExists() {
        return commentExists;
    public void setCommentExists(boolean commentExists) {
        this.commentExists = commentExists;
    public int getRating() {
        return rating;
    public void setRating(int rating) {
        this.rating = rating;
    public boolean isWebsiteExists() {
        return websiteExists;
    public void setWebsiteExists(boolean websiteExists) {
        this.websiteExists = websiteExists;
    public List<SelectItem> getAvailableCountries() {
        List<SelectItem> countries = new ArrayList<SelectItem>();
        SelectItem si_1 = new SelectItem();
        SelectItem si_2 = new SelectItem();
        SelectItem si_3 = new SelectItem();
        si_1.setValue("2");
        si_1.setLabel("ecuador");
        si_2.setValue("1");
        si_2.setLabel("colombia");
        si_3.setValue("3");
        si_3.setLabel("peru");
        countries.add(si_1);
        countries.add(si_2);
        countries.add(si_3);
        return countries;
    public void setAvailableCountries(List<SelectItem> countries) {
        this.availableCountries = availableCountries;
    public List<SelectItem> getAvailablePostcodes() {
        List<SelectItem> postcodes = new ArrayList<SelectItem>();
        SelectItem si_1 = new SelectItem();
        SelectItem si_2 = new SelectItem();
        SelectItem si_3 = new SelectItem();
        si_1.setValue(75001);
        si_1.setLabel("75001");
        si_2.setValue(75002);
        si_2.setLabel("75002");
        si_3.setValue(75003);
        si_3.setLabel("75003");
        postcodes.add(si_1);
        postcodes.add(si_2);
        postcodes.add(si_3);
        return postcodes;
    public void setAvailablePostcodes(List<SelectItem> availablePostcodes) {
        this.availablePostcodes = availablePostcodes;
    public List<SelectItem> getAvailableRatings() {
        List<SelectItem> ratings = new ArrayList<SelectItem>();
        SelectItem si_1 = new SelectItem();
        SelectItem si_2 = new SelectItem();
        SelectItem si_3 = new SelectItem();
        si_1.setValue(1);
        si_1.setLabel("1");
        si_2.setValue(2);
        si_2.setLabel("2");
        si_3.setValue(3);
        si_3.setLabel("3");
        ratings.add(si_1);
        ratings.add(si_2);
        ratings.add(si_3);
        return ratings;
    public void setAvailableRatings(List<SelectItem> availableRatings) {
        this.availableRatings = availableRatings;
    public int[] getPostcode() {
        return postcode;
    public void setPostcode(int[] postcode) {
        this.postcode = postcode;
    public List<EstablishmentLocal> getRetrievedEstablishments() {
        return retrievedEstablishments;
    public void setRetrievedEstablishments(List<EstablishmentLocal> retrievedEstablishments) {
        this.retrievedEstablishments = retrievedEstablishments;
    //Business methods
    public String performSearch(){
        System.out.println("performSearchManagedBean begin");
        SearchRequestDTO searchRequestDto = new SearchRequestDTO(this.keyword,this.country,this.postcode,this.commentExists,this.rating, this.websiteExists);
        SearchSessionLocal searchSession = lookupSearchSessionBean();
        List<EstablishmentLocal> retrievedEstablishments = searchSession.performSearch(searchRequestDto);
        this.setRetrievedEstablishments(retrievedEstablishments);
        System.out.println("performSearchManagedBean end");
        return "success";
    private arcoiris.ServiceLocator getServiceLocator() {
        if (serviceLocator == null) {
            serviceLocator = new arcoiris.ServiceLocator();
        return serviceLocator;
    private arcoiris.SearchSessionLocal lookupSearchSessionBean() {
        try {
            return ((arcoiris.SearchSessionLocalHome) getServiceLocator().getLocalHome("java:comp/env/ejb/SearchSessionBean")).create();
        } catch(javax.naming.NamingException ne) {
            java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
            throw new RuntimeException(ne);
        } catch(javax.ejb.CreateException ce) {
            java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ce);
            throw new RuntimeException(ce);
}Here is my jsp page:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
         <html>
             <head>
                 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                 <META HTTP-EQUIV="pragma" CONTENT="no-cache">
                 <title>JSP Page</title>
             </head>
             <body>
                 <f:view>
                     <h:panelGroup id="body">
                         <h:form id="searchForm">
                             <h:panelGrid columns="2">
                                 <h:outputText id="keywordLabel" value="enter keyword"/>   
                                 <h:inputText id="keywordField" value="#{SearchManagedBean.keyword}"/>
                                 <h:outputText id="countryLabel" value="choose country"/>   
                                 <h:selectOneListbox id="countryField" value="#{SearchManagedBean.country}">
                                     <f:selectItems id="availableCountries" value="#{SearchManagedBean.availableCountries}"/>
                                 </h:selectOneListbox>
                                 <h:outputText id="postcodeLabel" value="choose postcode(s)"/>   
                                 <h:selectManyListbox id="postcodeField" value="#{SearchManagedBean.postcode}">
                                     <f:selectItems id="availablePostcodes" value="#{SearchManagedBean.availablePostcodes}"/>
                                 </h:selectManyListbox>
                                 <h:outputText id="commentExistsLabel" value="with comment"/>
                                 <h:selectBooleanCheckbox id="commentExistsField" value="#{SearchManagedBean.commentExists}" />
                                 <h:outputText id="ratingLabel" value="rating"/>
                                 <h:selectOneListbox id="ratingField" value="#{SearchManagedBean.rating}">
                                     <f:selectItems id="availableRatings" value="#{SearchManagedBean.availableRatings}"/>
                                 </h:selectOneListbox>
                                 <h:outputText id="websiteExistsLabel" value="with website"/>
                                 <h:selectBooleanCheckbox id="websiteExistsField" value="#{SearchManagedBean.websiteExists}" />
                                 <h:commandButton value="search" action="#{SearchManagedBean.performSearch}"/>
                             </h:panelGrid>
                         </h:form>
                     </h:panelGroup>
                 </f:view>
             </body>
         </html>
     here is my faces config file:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
    <managed-bean>
        <managed-bean-name>SearchManagedBean</managed-bean-name>
        <managed-bean-class>arcoiris.SearchManagedBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
       <description></description>
        <from-view-id>/welcomeJSF.jsp</from-view-id>
        <navigation-case>
        <from-outcome>success</from-outcome>
        <to-view-id>index.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
</faces-config>The problem occurs when the field ratingField is left blank (which amounts to it being set at 0 since it is an int).
Can anyone help please?
Thanks in advance,
Julien.

Hello,
Thanks for the suggestion. I added the tag and it now says:
java.lang.IllegalArgumentException
I got that from the log:
2006-08-17 15:29:16,859 DEBUG [com.sun.faces.el.ValueBindingImpl] setValue Evaluation threw exception:
java.lang.IllegalArgumentException
     at sun.reflect.GeneratedMethodAccessor118.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at com.sun.faces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:178)
     at com.sun.faces.el.impl.ArraySuffix.setValue(ArraySuffix.java:192)
     at com.sun.faces.el.impl.ComplexValue.setValue(ComplexValue.java:171)
     at com.sun.faces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:234)
     at javax.faces.component.UIInput.updateModel(UIInput.java:544)
     at javax.faces.component.UIInput.processUpdates(UIInput.java:442)
     at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:935)
     at javax.faces.component.UIForm.processUpdates(UIForm.java:196)
     at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:935)
     at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:935)
     at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:363)
     at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:81)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
     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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
     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:856)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
     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)
2006-08-17 15:29:16,875 DEBUG [com.sun.faces.context.FacesContextImpl] Adding Message[sourceId=searchForm:ratingField,summary=java.lang.IllegalArgumentException)Do you see where the problem comes from??
Julien.

Similar Messages

  • Action method not called in Backing Bean

    I am using <x:inputFileUpload> tag inside my jsp page. I am trying to call action method when clicking button, but action method not called.
    My jsp page:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
    <html>
         <head>
              <title>File upload Test</title>
         </head>
         <body>
              <f:view>
                   <h:form id="form1" enctype="multipart/form-data">
                        <h:messages id="asdghsda"/>          
                        <h:outputText value="This is file upload page functionlaity POC" />                                   
                        <h:inputText value="#{fileUploadBean.textField}" />
                        <x:inputFileUpload id="myFileId" value="#{fileUploadBean.myFile}" storage="file" required="true"/>                    
                        <h:commandButton action="#{fileUploadBean.storeFile}" value="Enter here" />                    
                        <h:commandLink value="Clicl Here!!" action="#{fileUploadBean.storeFile}"></h:commandLink>
                   </h:form>               
              </f:view>
         </body>     
    </html>
    My backing bean:
    package com.beans;
    import java.io.BufferedInputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import org.apache.log4j.Logger;
    import org.apache.myfaces.custom.fileupload.UploadedFile;
    public class FileUploadBean {     
         private static Logger logger = Logger.getLogger(FileUploadBean.class.getName());
         private String textField;
         private UploadedFile myFile;
         public UploadedFile getMyFile() {
              logger.info("inside get method");
         return myFile;
         public void setMyFile(UploadedFile myFile) {
              logger.info("inside set method");
              this.myFile = myFile;
         public void storeFile(){          
              logger.info("Inside the storeFile method");
              logger.info("The text field value: " + getTextField());
              try {
                   InputStream in = new BufferedInputStream(myFile.getInputStream());
                   logger.info("The string is: " + in.read());
                   System.out.println(in.read());
                   File f = new File("D:\\share\\sample.txt");               
                   OutputStream out = new FileOutputStream(f);
                   out.write(in.read());
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              logger.info("Exit from the storeFile method");
         public String getTextField() {
              return textField;
         public void setTextField(String textField) {
              this.textField = textField;
    My web.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>MyJSFProject</display-name>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    <filter>
    <filter-name>ExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
    <init-param>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>10m</param-value>
    </init-param>
    <init-param>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ExtensionsFilter</filter-name>
    <servlet-name>FacesServlet</servlet-name>
    </filter-mapping>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    </web-app>
    Can someone help me on this? I need urgently.

    One straight and simple answer which i can give you method associated to action attributes always returns a java.lang.String Object.
    REF :
    action:
    =====
    If specified as a string: Directly specifies an outcome used by the navigation handler to determine the JSF page to load next as a result of activating the button or link If specified as a method binding: The method has this signature: String methodName(); the string represents the outcome
    source : http://horstmann.com/corejsf/jsf-tags.html#Table4_15
    therefore
    change
    public void storeFile(){
    logger.info("Inside the storeFile method");
    logger.info("The text field value: " + getTextField());
    try {
    InputStream in = new BufferedInputStream(myFile.getInputStream());
    logger.info("The string is: " + in.read());
    System.out.println(in.read());
    File f = new File("D:\\share\\sample.txt");
    OutputStream out = new FileOutputStream(f);
    out.write(in.read());
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    logger.info("Exit from the storeFile method");
    }to
    public String storeFile(){
    logger.info("Inside the storeFile method");
    logger.info("The text field value: " + getTextField());
    try {
    InputStream in = new BufferedInputStream(myFile.getInputStream());
    logger.info("The string is: " + in.read());
    System.out.println(in.read());
    File f = new File("D:\\share\\sample.txt");
    OutputStream out = new FileOutputStream(f);
    out.write(in.read());
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    logger.info("Exit from the storeFile method");
    return "success";
    }else where you can make use of actionlistener property in the following senario.
    but the method signature has to be void storeFile(ActionEvent ae)
    and could be use like
    <h:commandButton actionlistener="#{fileUploadBean.storeFile}" action="success" value="SUBMIT" /> Hope that might help :)
    REGARDS,
    RaHuL

  • Unwanted behavior: Action method being called several times

    Hello,
    I have a managed bean that calls a session ejb which itself does a search. The problem is that it is supposed to retrieve a resultset ONCE and the displayed behavior is that it never stop doing so. It fetches the resultset N TIMES.
    Here is the managed bean and the method to look at is the performSearch method:
    package arcoiris;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.model.SelectItem;
    public class SearchManagedBean {
        //Collected from search form
        private String keyword;
        private String country;
        private Integer[] postcode;
        private boolean commentExists;
        private Integer rating;
        private boolean websiteExists;
        //Used to populate form
        private List<SelectItem> availableCountries;
        private List<SelectItem> availablePostcodes;
        private List<SelectItem> availableRatings;
        //Retrieved from ejb tier
        private List<EstablishmentLocal> retrievedEstablishments;
        //Service locator
        private arcoiris.ServiceLocator serviceLocator;
        //Constructor
        public SearchManagedBean() {
            System.out.println("within constructor SearchManagedBean");
        //Getters and setters
        public String getKeyword() {
            return keyword;
        public void setKeyword(String keyword) {
            this.keyword = keyword;
        public String getCountry() {
            return country;
        public void setCountry(String country) {
            this.country = country;
        public boolean isCommentExists() {
            return commentExists;
        public void setCommentExists(boolean commentExists) {
            this.commentExists = commentExists;
        public Integer getRating() {
            return rating;
        public void setRating(Integer rating) {
            this.rating = rating;
        public boolean isWebsiteExists() {
            return websiteExists;
        public void setWebsiteExists(boolean websiteExists) {
            this.websiteExists = websiteExists;
        public List<SelectItem> getAvailableCountries() {
            List<SelectItem> countries = new ArrayList<SelectItem>();
            SelectItem si_1 = new SelectItem();
            SelectItem si_2 = new SelectItem();
            SelectItem si_3 = new SelectItem();
            si_1.setValue("2");
            si_1.setLabel("ecuador");
            si_2.setValue("1");
            si_2.setLabel("colombia");
            si_3.setValue("3");
            si_3.setLabel("peru");
            countries.add(si_1);
            countries.add(si_2);
            countries.add(si_3);
            return countries;
        public void setAvailableCountries(List<SelectItem> countries) {
            this.availableCountries = availableCountries;
        public List<SelectItem> getAvailablePostcodes() {
            List<SelectItem> postcodes = new ArrayList<SelectItem>();
            SelectItem si_1 = new SelectItem();
            SelectItem si_2 = new SelectItem();
            SelectItem si_3 = new SelectItem();
            si_1.setValue(new Integer(75001));
            si_1.setLabel("75001");
            si_2.setValue(new Integer(75002));
            si_2.setLabel("75002");
            si_3.setValue(new Integer(75003));
            si_3.setLabel("75003");
            postcodes.add(si_1);
            postcodes.add(si_2);
            postcodes.add(si_3);
            return postcodes;
        public void setAvailablePostcodes(List<SelectItem> availablePostcodes) {
            this.availablePostcodes = availablePostcodes;
        public List<SelectItem> getAvailableRatings() {
            List<SelectItem> ratings = new ArrayList<SelectItem>();
            SelectItem si_1 = new SelectItem();
            SelectItem si_2 = new SelectItem();
            SelectItem si_3 = new SelectItem();
            si_1.setValue(new Integer(1));
            si_1.setLabel("1");
            si_2.setValue(new Integer(2));
            si_2.setLabel("2");
            si_3.setValue(new Integer(3));
            si_3.setLabel("3");
            ratings.add(si_1);
            ratings.add(si_2);
            ratings.add(si_3);
            return ratings;
        public void setAvailableRatings(List<SelectItem> availableRatings) {
            this.availableRatings = availableRatings;
        public Integer[] getPostcode() {
            return postcode;
        public void setPostcode(Integer[] postcode) {
            this.postcode = postcode;
        public List<EstablishmentLocal> getRetrievedEstablishments() {
            return retrievedEstablishments;
        public void setRetrievedEstablishments(List<EstablishmentLocal> retrievedEstablishments) {
            this.retrievedEstablishments = retrievedEstablishments;
        //Business methods
        public String performSearch(){
            System.out.println("performSearchManagedBean begin");
            SearchRequestDTO searchRequestDto = new SearchRequestDTO(this.keyword,this.country,this.postcode,this.commentExists,this.rating, this.websiteExists);
            System.out.println("java bean "+this.keyword+" "+this.country+" "+this.postcode+" "+this.commentExists+" "+this.rating+" "+this.websiteExists);
            SearchSessionLocal searchSession = lookupSearchSessionBean();
            List<EstablishmentLocal> retrievedEstablishments = searchSession.performSearch(searchRequestDto);
            this.setRetrievedEstablishments(retrievedEstablishments);
            System.out.println("performSearchManagedBean end");
            return "success";
        private arcoiris.ServiceLocator getServiceLocator() {
            if (serviceLocator == null) {
                serviceLocator = new arcoiris.ServiceLocator();
            return serviceLocator;
        private arcoiris.SearchSessionLocal lookupSearchSessionBean() {
            try {
                return ((arcoiris.SearchSessionLocalHome) getServiceLocator().getLocalHome("java:comp/env/ejb/SearchSessionBean")).create();
            } catch(javax.naming.NamingException ne) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
                throw new RuntimeException(ne);
            } catch(javax.ejb.CreateException ce) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ce);
                throw new RuntimeException(ce);
    }Here is the object request passed:
    package arcoiris;
    import java.io.Serializable;
    public class SearchRequestDTO implements Serializable {
        private String keyword;
        private String country;
        private Integer[] postcode;
        private boolean commentExists;
        private Integer rating;
        private boolean websiteExists;
        public SearchRequestDTO() {
        public SearchRequestDTO(String keyword, String country, Integer[] postcode, boolean commmentExists, Integer rating, boolean websiteExists){
            this.keyword=keyword;
            this.country= country;
            this.postcode = postcode;
            this.commentExists = commentExists;
            this.rating = rating;
            this.websiteExists = websiteExists;
        public String getKeyword() {
            return keyword;
        public void setKeyword(String keyword) {
            this.keyword = keyword;
        public String getCountry() {
            return country;
        public void setCountry(String country) {
            this.country = country;
        public Integer[] getPostcode() {
            return postcode;
        public void setPostcode(Integer[] postcode) {
            this.postcode = postcode;
        public boolean isCommentExists() {
            return commentExists;
        public void setCommentExists(boolean commmentExists) {
            this.commentExists = commmentExists;
        public Integer getRating() {
            return rating;
        public void setRating(Integer rating) {
            this.rating = rating;
        public boolean isWebsiteExists() {
            return websiteExists;
        public void setWebsiteExists(boolean websiteExists) {
            this.websiteExists = websiteExists;
    }and here is the session ejb:
    package arcoiris;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    import javax.ejb.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.sql.DataSource;
    public class SearchSessionBean implements SessionBean, SearchSessionLocalBusiness {
        private SessionContext context;
        private arcoiris.ServiceLocator serviceLocator;
        // <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click the + sign on the left to edit the code.">
        // TODO Add code to acquire and use other enterprise resources (DataSource, JMS, enterprise bean, Web services)
        // TODO Add business methods or web service operations
         * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
        public void setSessionContext(SessionContext aContext) {
            context = aContext;
         * @see javax.ejb.SessionBean#ejbActivate()
        public void ejbActivate() {
         * @see javax.ejb.SessionBean#ejbPassivate()
        public void ejbPassivate() {
         * @see javax.ejb.SessionBean#ejbRemove()
        public void ejbRemove() {
        // </editor-fold>
         * See section 7.10.3 of the EJB 2.0 specification
         * See section 7.11.3 of the EJB 2.1 specification
        public void ejbCreate() {
            // TODO implement ejbCreate if necessary, acquire resources
            // This method has access to the JNDI context so resource aquisition
            // spanning all methods can be performed here such as home interfaces
            // and data sources.
        // Add business logic below. (Right-click in editor and choose
        // "EJB Methods > Add Business Method" or "Web Service > Add Operation")
        public List<EstablishmentLocal> performSearch(SearchRequestDTO searchRequestDto) {
            System.out.println("within performSearch");
            List<EstablishmentLocal> establishments = new ArrayList<EstablishmentLocal>();
            try {
                Context ctx = new InitialContext();
                DataSource ds = (DataSource)ctx.lookup("java:/guia");
                Connection con = ds.getConnection();
                Statement stm = con.createStatement();
                String query = buildQueryFromSearchRequestDTO(searchRequestDto);
                ResultSet rs = stm.executeQuery(query);
                int rowCount = 0;
                while(rs.next()){
                    rowCount = rowCount + 1;
                    System.out.println("while");
                    try {
                        EstablishmentLocal establishment = lookupEstablishmentBean().findByEstablishmentId(rs.getInt("establishment_id"));
                        establishments.add(establishment);
                        System.out.println("est name "+establishment.getEstablishmentName());
                    } catch (FinderException ex) {
                        ex.printStackTrace();
                    } catch (SQLException ex) {
                        ex.printStackTrace();
                System.out.println("rowCount = "+rowCount);
                rs.close();
                stm.close();
                con.close();
            catch (SearchRequestMalformedException ex){
                ex.printStackTrace();
            }catch (NamingException ex) {
                ex.printStackTrace();
            }catch (SQLException ex){
                ex.printStackTrace();
            //TODO implement performSearch
            return null;
        private String buildQueryFromSearchRequestDTO(SearchRequestDTO searchRequestDto) throws SearchRequestMalformedException {
            StringBuffer sb = new StringBuffer();
            //Head of the query
            sb.append("SELECT ");
            sb.append("e.establishment_id, ");
            sb.append("e.establishment_name, ");
            sb.append("avg(r.rating) as avg_rating ");
            sb.append("FROM ");
            sb.append("establishment e, ");
            sb.append("rating r, ");
            sb.append("comment com, ");
            sb.append("establishment_country ec, ");
            sb.append("country_ref cou ");
            sb.append("where ");
            sb.append("e.establishment_id=ec.establishment_id and ");
            sb.append("ec.country_id=cou.country_id and ");
            sb.append("e.establishment_id=com.establishment_id and ");
            sb.append("r.establishment_id=e.establishment_id and ");
            //Conditional parts of the query
            //If user wants comment to be present
            if(searchRequestDto.isCommentExists()){
                sb.append("e.establishment_id=com.establishment_id and ");
            //If user has typed in a keyword
            if(!searchRequestDto.getKeyword().equals("") && !searchRequestDto.getKeyword().equals(" ")&& searchRequestDto.getKeyword()!=null){
                sb.append("e.establishment_name like '%"+ searchRequestDto.getKeyword() +"%' and ");
            //If user has choosen a country
            if(searchRequestDto.getCountry()!=null && !searchRequestDto.getCountry().equals("") && !searchRequestDto.getCountry().equals(" ")&& searchRequestDto.getCountry()!=null){
                sb.append("ec.country_id = " + searchRequestDto.getCountry() + " and ");
            //If user wants website to be present
            if(searchRequestDto.isWebsiteExists()){
                sb.append("e.establishment_website is not null and ");
    /* conditions
    si utilisateur a renseign� un premier code postal "e.establishment_postcode = 'postcode_one' --si racine
            si autre code postal "or e.establishment_postcode = 'postcode_two'
            ainsi de suite
    and--vient de si racine
            //Tail of the query
            sb.append("0=0 ");
            sb.append("group by e.establishment_id ");
            //If the user wants a minimum rating
            if(searchRequestDto.getRating() != null && searchRequestDto.getRating().intValue()!=0){
                sb.append("having avg(r.rating) >= " + searchRequestDto.getRating());
            sb.append(" ");
            sb.append("order by e.establishment_id ");
            System.out.println("****************************");
            System.out.println(sb);
            System.out.println("****************************");
            return sb.toString();
        private arcoiris.ServiceLocator getServiceLocator() {
            if (serviceLocator == null) {
                serviceLocator = new arcoiris.ServiceLocator();
            return serviceLocator;
        private EstablishmentLocalHome lookupEstablishmentBean() {
            try {
                return (arcoiris.EstablishmentLocalHome) getServiceLocator().getLocalHome("java:comp/env/ejb/EstablishmentBean");
            } catch(javax.naming.NamingException ne) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
                throw new RuntimeException(ne);
    }I just don't understand why it does so. The peformSearch should be executed ONCE only.
    Here is my face config file:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
        <managed-bean>
            <managed-bean-name>SearchManagedBean</managed-bean-name>
            <managed-bean-class>arcoiris.SearchManagedBean</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
        <navigation-rule>
           <description></description>
            <from-view-id>/welcomeJSF.jsp</from-view-id>
            <navigation-case>
            <from-outcome>success</from-outcome>
            <to-view-id>index.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
    </faces-config>Can anyone help?
    Thanks in advance,
    Julien.

    Just reactivating my thread hoping someone will reply to it....
    Julien.

  • Button action is not calling

    Hi,
    I am new to JSF.
    Here is my problem.
    I have a select one menu and command button on a page
    When ever the page loads for the first time the select one menu is loaded with the data and the button should be disabled.
    When an item is selected from the menu the button should be enabled.
    Upto this part I finished.
    Now the problem is with button.When I click the button the corresponding action method is not calling.
    If the button is enabled during page load then the action method is calling when ever I click the button.
    But I need to make the button disabled until I select an item from the
    select one menu.In this case the action method is not calling when I click the button.
    Please help me.
    Thanks in advance

    Thanks for fast response.
    Here is my jsp code:
    <script>
         function enableLoad(){
         if(document.getElementById("form1:menu1").selectedIndex==0){
         document.getElementById("form1:loadTable").value = 'true';
         else{
         document.getElementById("form1:loadTable").value = 'false';
         document.getElementById("form1").submit();
         </script>
              <h:form styleClass="form" id="form1">
              <TABLE class="tableBorder" cellspacing="10" cellpadding="10">
              <TR>
              <TD width="230" align="right">
              <SPAN class="outputtext">Select The Table To Manage:</SPAN>
              </TD>
              <TD>
              <h:selectOneMenu styleClass="selectOneMenu" id="menu1" value="#{manageReferenceTablesMB.tableValue}"
    onchange="enableLoad()">
                                  <f:selectItems value="#{manageReferenceTablesMB.tableNames}" />
                        </h:selectOneMenu>
              </TD>
              </TR>
              <TR>
              <h:inputHidden id="loadTable" value="#{manageReferenceTablesMB.loadTable}"/>
              <TD colspan="2" align="right">
              <hx:commandExButton type="submit" value="Load Table"
                                  styleClass="commandExButton" id="button1" disabled="#{manageReferenceTablesMB.loadTable}"
                                  action="#{manageReferenceTablesMB.refTable}"></hx:commandExButton>
              </TD>
              </TR>
              </TABLE>
              </h:form>
    This is the backing bean code:
    public class ManageReferenceTablesMB extends BaseMB{
         public SelectItem[] tableNames;
         public String tableValue = "-1";
    public boolean loadTable ;
         public ManageReferenceTablesMB(){
              super(SessionConstants.MANAGE_REFERENCE_TABLES);
              if (this.getFromPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES) == null){
              System.out.println("in constructor");
              Hashtable results = new Hashtable();
              SwqmisFrontController controller = this.getFrontController();
              results = controller.getRefTableNames();
              tableNames = buildMenu((Vector) results.get("REF_TABLE_NAMES"));
              System.out.println("added data");
              System.out.println("........."+tableValue+"..........");
              this.addToPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES,this);
              }else{
                   this.tableNames = ((ManageReferenceTablesMB)this.getFromPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES)).tableNames;
                   this.tableValue = ((ManageReferenceTablesMB)this.getFromPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES)).tableValue;
                   this.loadTable = ((ManageReferenceTablesMB)this.getFromPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES)).loadTable;
         public String refTable(){
              System.out.println("IN REF TABLE");
              System.out.println("....."+tableValue+".......");
              Hashtable results = new Hashtable();
              SwqmisFrontController controller = this.getFrontController();
              results = controller.getRefTable(getDisplayText(tableNames,tableValue));
              if(results!=null && results.size()>1)
              System.out.println("success");
              else
              System.out.println("failure");
              return "success";
         * @return Returns the tableNames.
         public SelectItem[] getTableNames() {
              return tableNames;
         * @param tableNames The tableNames to set.
         public void setTableNames(SelectItem[] tableNames) {
              this.tableNames = tableNames;
         * @return Returns the tableValue.
         public String getTableValue() {
              return tableValue;
         * @param tableValue The tableValue to set.
         public void setTableValue(String tableValue) {
              this.tableValue = tableValue;
         * @return Returns the loadTable.
         public boolean isLoadTable() {
              return loadTable;
         * @param loadTable The loadTable to set.
         public void setLoadTable(boolean loadTable) {
              this.loadTable = loadTable;
    In the above backing bean code the loadTable value is false.
    So under this condition the action method is calling.B'cause the button is in enable state even there is no section in the menu.
    If I make loadTable=true then the action button is in disabled state until the menu item is selected. But the action method is not executing in this case.
    Thanks.

  • Command button action not calling when in subview

    i have a page that is fine when it's in it's own view...
    the command button calls a managed bean's method..
    <af:commandButton text="Call Method"
    action="#{backing_myPage.CallMethod}"
    binding="#{backing_myPage.commandButton1}"
    id="commandButton1"/>
    but when i remove the view tags and include it in a main index.jspx page
    that has a main view and a tabbed panel with showdetailitems and
    for each showdetaileditem i have a subview
    and then an include
    <f:subview id="discovered_subview" rendered="true"
    binding="#{backing_index.mypage_subview}">
    <jsp:include page="/mypage.jspx" />
    </f:subview>
    Mypage renders but the commandbutton's action is not called..
    but is called when run as a standalone page
    tia

    I also have the same problem as above. Changing the dropDown values to String does not fix it.
    I am using Netbeans Visual Web Pack.
    I drag a drop down box onto a brand new page.
    I double click the drop down box and in the processValueChange action i put System.out.println("Hello World");
    In the init() method i add 2 options to the drop down box:
    "option 1", "1"
    "option 2", "2"
    values are Strings
    I press F6 to run
    I notice that the drop down box is correctly populated.
    I change the drop down box selection
    Nothing is printed.

  • Region Monitoring iOS 7 : didEnterRegion method is not calling when app is killed by user or by OS in iOS 7 only. It is working fine when it is in background. and the same code is working fine with iOS 6 for both app in suspended mode and background mode.

    Region Monitoring iOS 7 : didEnterRegion method is not calling when app is killed by user or by OS in iOS 7 only. It is working fine when it is in background. and the same code is working fine with iOS 6 for both app in suspended mode and background mode. What changes I have to made to work great in iOS 7 also.

    I rewrote code for debugging purpose and tried to catch error using GetLastError();  method,
    but it only printed 0. Below is code snippet; I think Create() throw an exception
    and code goes to catch block. 
    LONG ConnectTS(CString strIP, UINT n_Port)
    try{
              ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
              if(!Create())
    // Exception Line
    n_Err = GetLastError();
    return NET_INIT;
    catch(...)
                       DWORD errorCode = GetLastError();
                       CString errorMessage
                       errorMessage.Format("%lu",errorCode);
                       ErrorLog (0, 0, "Image
    System", (LPTSTR)(LPCTSTR)errorMessage);
                       return  IS_ERR_WINDOWS;
    Output: -
    ConnectTS is calling Create [is going to call]
    Image System
    0

  • ADF VO Row Fetch Range Issue: Action is not called after 10th row

    Hi People!
    I am working with an Application here in which one page has a table based on a view object. This table has range navigation, and the VO configuration for Tuning is to fetch rows in batches of 1000, all in one fetch. Now, i have a single selection configured in this table, and also a button on the <tableActions> facet which calls a method on the backing bean.
    The problem is, for the first 10 rows of this table, the method is called (seen through the debugger), but when we move the selection to the 11th row or further, the page only refreshes but does not call the method.
    This is not a problem with the data, because we tried two other approaches:
    1) removed the range navigation and shown all the records in the same page: the error persists for the 11th row ahead
    2) changed the VO query to return only the 11th row from the previous test using its ID: the action is called, now that the row is the first on the rowset.
    Have you experienced similar behavior? Why the Action is not executed when the selected row comes after the tenth row?
    Any help is greatly appreciated!
    Regards
    Thiago Souza

    Hi Frank, thanks for the reply.
    I have assembled a step-by-step based on the HR schema. For this example, i have created an EmployeesVO based on the EMPLOYEES table, and an App Module to provide a data control. From then on:
    1) Create a JSF JSP to list the Employees VO
    1.1) Bind the JSF Page to a Backing bean
    1.2) Create an af:page element on the page
    2) Drag the EmployeesVO from the Data Control Palette to the af:page
    2.1) Read-Only Table, Selection Enabled
    2.2) Do not include table navigation.
    3) Double-Click the automatically created submit button on the TableSelectOne section
    3.1) Bind it to a method on the Backing Bean
    3.2) Add some code to it, in my case i tested:
         FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Teste"));
    4) Run the example and try two approaches:
    4.1) select one of the first ten rows and click on the button: The action is fired.
    4.2) select the eleventh row and click on the button: The action is not fired.
    4.3) select one of the first ten rows again and click on the button: The action is fired.
    This example didn't even include range navigation, but if you want to test you will see the result is the same.
    Please let me know if you want further info.
    Thanks a lot!
    Thiago Souza

  • Strange behavior of flex4 service call

    Hi Techies, I am stuck with strange behavior of flex4 service call. Our is a dashboard application where i have four modules(separae file for each) in a page. when page renders all these modules makes separate service call through remote objects. Though destination file is same but methods are separate for each modules. db+java takes 5 second for 1 and 3 module, 9 seconds for third module and 15 seconds for 4th module. Sinch LCDS calls are asynchronous ideally after 5 seconds module 1 and 2 should display data. similarly for 3rd module after 9seconds. For my wonder it doesnt go this way. data for all the modules appears simultaneously after 15-16 seconds.  It behaves like when data for all the modules is available then only it populates charts and grids. Looks like call is being made in sequence and once maximum taking method is done then control returns back to flex. Any pointer will be helpful to improvise this.
    Thanks,
    Rohit

    Hi Techies, I am stuck with strange behavior of flex4 service call. Our is a dashboard application where i have four modules(separae file for each) in a page. when page renders all these modules makes separate service call through remote objects. Though destination file is same but methods are separate for each modules. db+java takes 5 second for 1 and 3 module, 9 seconds for third module and 15 seconds for 4th module. Sinch LCDS calls are asynchronous ideally after 5 seconds module 1 and 2 should display data. similarly for 3rd module after 9seconds. For my wonder it doesnt go this way. data for all the modules appears simultaneously after 15-16 seconds.  It behaves like when data for all the modules is available then only it populates charts and grids. Looks like call is being made in sequence and once maximum taking method is done then control returns back to flex. Any pointer will be helpful to improvise this.
    Thanks,
    Rohit

  • ADF disclosure action listener not triggered when set disclosed directly

    ADF disclosure action listener not triggered when set disclosed directly in code.
    Is this expected behaviour?
    Thanks

    This should be the expected behaviour as there is no client side event fired.
    You would need to queue a Disclosure Event programmatically if you need to call the disclosureListener through code,

  • Strange behavior in Contacts 'Note' field

    I am getting strange behavior in the 'Note' fields of my contacts. I am sending out my Christmas cards and, in the process, making a lot of comments in the 'Note' field. Here is what has been happening.
    Notes disapper from one or many contacts.
    Text from one note gets inserted into the note of several other contacts, replacing whatever content was previously in that contact.
    The common thread here seems to be that the changes are being applied across all the notes in a Smart Group (I use a number of keywords to create Smart Groups).
    A few questions.
    Is my contact database corrupted in some way? If so, can how can I clean it up?
    Are other people experience erratic behavior in the 'Note' field?
    Is there any way that I can use the 'Note' field reliably?
    As it is, the 'Note' field is essentially useless to me … and the address book is increasingly frustrating.
    Many thanks,
    Heather

    Others are seeing this problem. I posted a reply to another link and was told to submit feedback to Apple.
    https://discussions.apple.com/message/20537471#20537471

  • NW2004s SP12, action not called when Save button pressed

    Hi Experts,
    I have a strange behaviour in my Interactive form SAVE functionality. If its a large form, the SAVE button does not call corresponding action method in the implementation.
    However it does when the form size is small eg 1.5Mb or so.
    Please advise. This is quite urgent.
    Thanks in advance
    Mona

    Hi!
    If you commit the form and insert data after that,
    that data will not being commited to the database and got lost until you use
    something like forms_ddl ( 'commit' ); after the insert.
    :system.last_query, which is the very last query of a block in your form,
    will never show an insert in any trigger.
    May a commit-trigger is not a good place for an insert.
    But anyway, hope this help you.
    Regard
    Stauder

  • Action method not being called

    Using jdev 10.1.3.4 with jsf/adf bc. I have two af:table components on a jsf page. I'll call them table A and table B. In table B, I have an input text with autosubmit=true and hooked up to a valuechangelistener. One of the columns in table B is a command button. Initially, I was having problems when the user changed the input value in table B and then immediately clicked the button in table B. Sometimes when the button was clicked, the backing bean method associated with it was not executing. Thanks to Didier's advice in this forum (Re: PPR and submit I was able to get this functionality working consistently.
    I still have a problem though. Table A has a command LINK as one of the columns, which executes a method in the backing bean when clicked. However, as in the scenario above, if the user changes a value in the input text in table B and in this case immediately clicks the LINK in table A, it seems that the action method behind the button in table A executes the first time but if user repeats steps (changes value of input in table B and immediately clicks LINK in table A) the action method is not called after the first time. For testing, there is no real code in the backing bean method. The only code in the action method is an sop so I can tell if the method was executed. Likewise, the value change listener method, for testing purposes, has a sop so I can tell if/when it is executed and the thread.sleep(400) code needed per Didier's workaround. I'll include the code from jspx:
    In the jspx -
    <afh:body firstClickPassed="true">
    <h:form>
    <!-- table A -->
    <af:table value="#{bindings.Summary.collectionModel}" var="row"
    rows="#{bindings.Summary.rangeSize}"
    first="#{bindings.Summary.rangeStart}">
    <af:column headerText="#{bindings.Summary.labels.PositionNbr}">
    <af:inputText value="#{row.PositionNbr}"/>
    </af:column>
    <af:column>
    <af:commandLink text="Click" action="#{backing_levelone_untitled2.buttonClicked}"/>
    </af:column>
    </af:table>
    <!-- Table B -->
    <af:table value="#{bindings.BdCommentsView.collectionModel}" var="row"
    rows="#{bindings.BdCommentsView.rangeSize}"
    first="#{bindings.BdCommentsView.rangeStart}">
    <af:column headerText="#{bindings.BdCommentsView.labels.CommentId}">
    <af:inputText value="#{row.CommentId}"
    required="false" />
    </af:column>
    <af:column headerText="#{bindings.BdCommentsView.labels.Comments}">
    <af:inputText value="#{row.Comments}"
    required="false" autoSubmit="true" valueChangeListener="#{backing_levelone_untitled2.isValid}"/>
    </af:column>
    <af:column>
    <af:commandButton text="Click" action="#{backing_levelone_untitled2.buttonClicked}"/>
    </af:column>
    </af:table>
    </h:form>
    </afh:body>
    I need the backing bean method behind the LINK in table A to be fired consistently, every time user makes a change to input of table B and immediately clicks LINK in table A. It works the first time, but all subsequent attempts will not result in the action method being executed. Hope someone can help.
    Edited by: user12341229 on Dec 11, 2009 3:24 PM

    I'm not sure if this is considered a bug, but I found that if I use a commandLink in table A, my code doesn't work as expected. However, I found that by using a commandButton in table A the functionality works as expected. I still would like to hear some feedback on this if anyone is interested in recreating the scenario. Thanks.

  • Button action event not call in dataprovider

    hi,
    i have JSF table and it's bound to Mysql database table. when i bound the table and run it's working properly but it's button action event is not call action. when i use static jsf table then it's table action event work properly.
    my jsp code is
    <ui:table binding="#{search.search_table}" id="search_table" lite="true" selectMultipleButton="true" sortPanelToggleButton="true"
                                style="height: 70px; left: 240px; top: 240px; position: absolute; width: 600px" title="Search Text :" visible="true" width="600">
                                <ui:tableRowGroup binding="#{search.tableRowGroup1}" id="tableRowGroup1" rows="5" sourceData="#{search.srch_tablevalDataProvider1}" sourceVar="currentRow">
                                    <!--    <ui:tableColumn headerText="Script" id="tableColumn2" width="700">
                                        <ui:staticText id="staticText4" text="#{currentRow.value['search_script']}"/>
                                    </ui:tableColumn>-->
                                    <ui:tableColumn binding="#{search.tableColumn13}" headerText="Search Word" id="tableColumn13" style="#{search.columnStyle}">
                                        <ui:staticText binding="#{search.search_word1}" id="search_word1" text="#{search.search_word1}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{search.tableColumn4}" headerText="#{search_lang['search.contentName']}" height="39" id="tableColumn4"
                                        style="#{search.columnStyle}" width="100">
                                        <ui:staticText id="staticText1" onMouseOver="play_video(this);" text="#{currentRow.value['name']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{search.tableColumn6}" headerText="#{search_lang['search.srchTag']}" id="tableColumn6"
                                        sort="search_tags" style="#{search.columnStyle}">
                                        <ui:staticText id="staticText3" text="#{currentRow.value['search_tags']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{search.tableColumn5}" headerText="#{search_lang['search.tpDetail']}" id="tableColumn5" style="#{search.columnStyle}">
                                        <ui:imageHyperlink action="#{search.action}" id="imageHyperlink1" text="#{currentRow.value['details']}"/>
                                        <ui:button action="#{search.button2_action}" id="button2" text="Button"/>
                                    </ui:tableColumn>
                                </ui:tableRowGroup>
                             </ui:table>and back bean code is
    public String button2_action() {
            // TODO: Process the button click action. Return value is a navigation
            // case name where null will return to the same page.
            System.out.println("Invoke");
            return null;
        }i don't know what is problem there if found any solution, help me.

    You need to make sure that the getter of the datatable value returns exactly the same list in the apply request values phase of the form submit as it did during the render response phase of the initial display. Only this way JSF can find out which action which row was been invoked. Alternatively you can also place the data bean in session scope (which may have more impact), or use for example Tomahawk's t:dataTable with preserveDataModel attribute set to "true".

  • How to call javascript function & action method on clicking jsf  button?

    I have one jsf custom button. I am checking client side validations in mail by calling javascript function & also sending mail by calling action method of a bean which will execute at server side for onclick event of that button. Because of this when I click on that button its calling both javascript function and action method. So even though validations failed its sending mail. How can I overcome this problem?? Please help me....

    I am asking regarding commanLinks in jsf. I have the following code block in jsf. Even though mailSentMessage('true'); returns false, its calling action="#{emailObjectAction.sendEmail}" method. thats why I got that doubt. try the following code.
    <h:commandLink id="mailBtn123Send"      onclick="return mailSentMessage('true');" value="send mail"     action="#{emailObjectAction.sendEmail}">          
    </h:commandLink>

  • "405 - Method Not Allowed" when calling my Web Service

    Hi Guys,
    In APEX.ORACLE.COM I am trying to call some PL/SQL via a Web Service with the following setup:
    URI Template: TestPOST
    Method          : POST
    Source Type : PL/SQL
    Requires Secure Access : No
    Source:
    begin
      delete from ora_log;
      insert into ora_log values (1, 2, 3, null, sysdate);
      commit;
    end;
    The call is:
    https://apex.oracle.com/pls/apex/orange/TestPOST
    But Firefox returns Error: 405 - Method Not Allowed
    Does anyone know how to resolve this?
    Access to my Workspace is:
    Workspace: ORANGE
    User     : guest
    Password : 01range
    My email : [email protected]
    Cheers
    Jeroen

    There a number of standard verbs defined in HTTP:
    GET- Retrieve a resource
    POST- Submit new resource
    PUT - update resource
    DELETE - delete resource
    When you enter a URL in a web browser it always uses the GET method, the method to retrieve the resource.
    In your example Firefox is attempting to a do a GET on https://apex.oracle.com/pls/apex/orange/TestPOST
    but you have not defined a GET handler for this resource, only a POST handler. ORDS then tells you that the GET method is not supported on the resource, which is the correct behaviour.
    If you want to test the POST method from within a browser then you need to use JavaScript and perform an XMLHttpRequest and configure it to use the 'POST' method, for an example see the ORDS Developer guide:
    REST Data Services Developers Guide

Maybe you are looking for

  • How do I get my apps and music from my phone to itunes.

    How do I get my apps and music from my phone to itunes.

  • How to get the page FUNCTION NAME?

    Hi All, How can I get the page Function Name? I tried below codes but it returns null value. <i>pageContext.getPageLayoutBean().getAttributeValue(FUNCTION_NAME)</i> Please help. Thanks!

  • Archiving-FI SARI

    Hi All、 I have request in hand, related to Archiving. I don’t have any idea about Archiving. All that I know about the request is : There is some Program with vague name ‘GP47A7X4VH809QXJNXP6Y6DG7XQD’ on its Selection Screen we give Company Code, Doc

  • Console/MBeans Slow In Clustered Environment

    Environemt is RH Linux 7.3 where we have a cluster consisting of one admin and two managed servers. Monitoring the cluster is difficult because the console response time is very poor, it seems to take forever to bring up the active JMS destinations f

  • Retain Items and item history on feature re-deployment

    Using SharePoint feature/solution I have created a list instance with 4 fields and is currently in production. I got a request to add another 3 fields to existing list instance so making it 7 fields now. While deploying the updated package the data a