When I click the button nothing happens, please see my code and help?

Mr President.

My worm jdev is 12 c

I'm building an adf application to run the report jasper with a managed bean button but nothing happens on the click, is my link code and application

https://www.dropbox.com/sh/15ru03k0w0192i5/AAA5oLu_3hkwdV-5nOPN5J8Ea?DL=0

package view;


import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.sql.Connection;
import java.util.HashMap;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.servlet.ServletContext;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.type.WhenNoDataTypeEnum;
import net.sf.jasperreports.engine.util.JRLoader;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.binding.BindingContainer;




public class JasperBean {
    public JasperBean() {
    }


    public String runReportAction() {
        DCIteratorBinding empIter = (DCIteratorBinding) getBindings().get("EmployeesView1Iterator");
            String empId = empIter.getCurrentRow().getAttribute("EmployeeId").toString();
            Map m = new HashMap();
            m.put("employeeId", empId);
            try
            {
              runReport("empReport.jasper", m);
            }
            catch (Exception e)
            {
            }
            return null;
    }
    
    public BindingContainer getBindings()
      {
        return BindingContext.getCurrent().getCurrentBindingsEntry();
      }
      
      public Connection getDataSourceConnection(String dataSourceName)
          throws Exception
        {
          Context ctx = new InitialContext();
          DataSource ds = (DataSource)ctx.lookup(dataSourceName);
          return ds.getConnection();
        }
      
      private Connection getConnection() throws Exception
      {
        return getDataSourceConnection("hrDS");
      }
      
      public  ServletContext getContext()
        {
          return (ServletContext)getFacesContext().getExternalContext().getContext();
        }
      public  HttpServletResponse getResponse()
        {
          return (HttpServletResponse)getFacesContext().getExternalContext().getResponse();
        }
      public static FacesContext getFacesContext()
        {
          return FacesContext.getCurrentInstance();
        }
      public void runReport(String repPath, java.util.Map param) throws Exception
      {
        Connection conn = null;
        try
        {
          HttpServletResponse response = getResponse();
          ServletOutputStream out = response.getOutputStream();
          response.setHeader("Cache-Control", "max-age=0");
          response.setContentType("application/pdf");
          ServletContext context = getContext();
          InputStream fs = context.getResourceAsStream("/reports/" + repPath);
          JasperReport template = (JasperReport) JRLoader.loadObject(fs);
          template.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);
          conn = getConnection();
          JasperPrint print = JasperFillManager.fillReport(template, param, conn);
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          JasperExportManager.exportReportToPdfStream(print, baos);
          out.write(baos.toByteArray());
          out.flush();
          out.close();
          FacesContext.getCurrentInstance().responseComplete();
        }
        catch (Exception jex)
        {
          jex.printStackTrace();
        }
        finally
        {    
          close(conn);
        }
      }
      
      public void close(Connection con)
       {
         if (con != null)
         {
           try
           {
             con.close();
           }
           catch (Exception e)
           {
           }
         }
       }
}

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html>
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="JasperTester.jsf" id="d1">
        <af:messages id="m1"/>
        <af:form id="f1">
            <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx" id="pt1">
                <f:facet name="center">
                    <af:button text="Run Report" id="b1" action="#{ABC.runReportAction}"/>
                    <af:table value="#{bindings.EmployeesView1.collectionModel}" var="row"
                              rows="#{bindings.EmployeesView1.rangeSize}"
                              emptyText="#{bindings.EmployeesView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                              rowBandingInterval="0"
                              selectedRowKeys="#{bindings.EmployeesView1.collectionModel.selectedRow}"
                              selectionListener="#{bindings.EmployeesView1.collectionModel.makeCurrent}"
                              rowSelection="single" fetchSize="#{bindings.EmployeesView1.rangeSize}" id="t1">
                        <af:column headerText="#{bindings.EmployeesView1.hints.EmployeeId.label}" id="c1">
                            <af:outputText value="#{row.EmployeeId}"
                                           shortDesc="#{bindings.EmployeesView1.hints.EmployeeId.tooltip}" id="ot1">
                                <af:convertNumber groupingUsed="false"
                                                  pattern="#{bindings.EmployeesView1.hints.EmployeeId.format}"/>
                            </af:outputText>
                        </af:column>
                        <af:column headerText="#{bindings.EmployeesView1.hints.FirstName.label}" id="c2">
                            <af:outputText value="#{row.FirstName}"
                                           shortDesc="#{bindings.EmployeesView1.hints.FirstName.tooltip}" id="ot2"/>
                        </af:column>
                        <af:column headerText="#{bindings.EmployeesView1.hints.LastName.label}" id="c3">
                            <af:outputText value="#{row.LastName}"
                                           shortDesc="#{bindings.EmployeesView1.hints.LastName.tooltip}" id="ot3"/>
                        </af:column>
                    </af:table>
                </f:facet>
                <f:facet name="header"/>
                <f:facet name="end"/>
                <f:facet name="start"/>
                <f:facet name="branding"/>
                <f:facet name="copyright"/>
                <f:facet name="status"/>
            </af:pageTemplate>
        </af:form>
    </af:document>
    <!--oracle-jdev-comment:preferred-managed-bean-name:ABC-->
</f:view>

<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
  <managed-bean id="__2">
    <managed-bean-name>ABC</managed-bean-name>
    <managed-bean-class>view.JasperBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
  </managed-bean>
</adfc-config>

<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         version="3.0">
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>BIGRAPHSERVLET</servlet-name>
    <servlet-class>oracle.adf.view.faces.bi.webapp.GraphServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>BIGAUGESERVLET</servlet-name>
    <servlet-class>oracle.adf.view.faces.bi.webapp.GaugeServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>MapProxyServlet</servlet-name>
    <servlet-class>oracle.adf.view.faces.bi.webapp.MapProxyServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>adflibResources</servlet-name>
    <servlet-class>oracle.adf.library.webapp.ResourceServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/afr/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>BIGRAPHSERVLET</servlet-name>
    <url-pattern>/servlet/GraphServlet/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>BIGAUGESERVLET</servlet-name>
    <url-pattern>/servlet/GaugeServlet/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>MapProxyServlet</servlet-name>
    <url-pattern>/mapproxy/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/bi/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>adflibResources</servlet-name>
    <url-pattern>/adflib/*</url-pattern>
  </servlet-mapping>
  <filter>
    <filter-name>trinidad</filter-name>
    <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
  </filter>
  <filter>
    <filter-name>ADFLibraryFilter</filter-name>
    <filter-class>oracle.adf.library.webapp.LibraryFilter</filter-class>
  </filter>
  <filter>
    <filter-name>adfBindings</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>trinidad</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>
  <filter-mapping>
    <filter-name>ADFLibraryFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>
  <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>
  <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
    <param-value>false</param-value>
  </context-param>
  <context-param>
    <description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
    <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
    <param-value>false</param-value>
  </context-param>
  <context-param>
    <description>Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information.</description>
    <param-name>oracle.adf.view.rich.versionString.HIDDEN</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <description>Security precaution to prevent clickjacking: bust frames if the ancestor window domain(protocol, host, and port) and the frame domain are different. Another options for this parameter are always and never.</description>
    <param-name>org.apache.myfaces.trinidad.security.FRAME_BUSTING</param-name>
    <param-value>differentOrigin</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>oracle.adf.view.rich.geometry.DEFAULT_DIMENSIONS</param-name>
    <param-value>auto</param-value>
  </context-param>
  <context-param>
    <param-name>oracle.adf.view.rich.SYNCROWS</param-name>
    <param-value>enable</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.FACELETS_DECORATORS</param-name>
    <param-value>oracle.adfinternal.view.faces.facelets.rich.AdfTagDecorator</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.FACELETS_RESOURCE_RESOLVER</param-name>
    <param-value>oracle.adfinternal.view.faces.facelets.rich.AdfFaceletsResourceResolver</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name>
    <param-value>*.jsf;*.xhtml</param-value>
  </context-param>
  <mime-mapping>
    <extension>swf</extension>
    <mime-type>application/x-shockwave-flash</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>amf</extension>
    <mime-type>application/x-amf</mime-type>
  </mime-mapping>
  <listener>
    <listener-class>oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack</listener-class>
  </listener>
  <listener>
    <listener-class>oracle.adf.mbean.share.connection.ADFConnectionLifeCycleCallBack</listener-class>
  </listener>
  <listener>
    <listener-class>oracle.bc4j.mbean.BC4JConfigLifeCycleCallBack</listener-class>
  </listener>
</web-app>

Concerning

Tender Hello,

Can you try to set the property "partialSubmit" to your 'false' button and restart weblogic server and try again and see if that makes a difference?

See you soon

AJ

Tags: Java

Similar Questions

Maybe you are looking for

  • I lost two Toshiba programs for my Satellite U300

    Hello I lost the program that for example, I changed the memory card reader and fan RPM settings.For example, memory card reader only works when laptop being charged. And you can set the rpm of different fan between the use of the battery and load (p

  • Satellite A660-10W doesn't have a resolver.

    I have the A660-10W, which announces resolution +, explanation HERE:QuoteUsing Toshiba's resolution + technology unique, images from standard-definition DVD image quality can be improved to a level close to HD, convert the 480 p signal on standard DV

  • HP Officejet 150 mobile, HP scan doesn't work (cannot find scanner)

    Hello I just bought a HP Officejet all-in-one 150 Mobile. I installed the complete software package (downloaded on the HP Site) bluetooth on a laptop Acer Aspire S5 for windows 7. Printing seems to work fine, but when you start HP Scan, I get the fol

  • change the screen resolution

    I have a laptop HP G72 - some time between when I went to bed and now the resolution on my built-in display has changed.  Currently, it indicates a maximum resolution of 1600 X 900.  The icons seem to be at least 50% larger than the last time I used

  • Opening of WLM 2011 not always work_issue "Server error".

    I see other people having problems with the opening of WLM and after reading some of the answers I think I should try to uninstall the version upgrade and 2011 to 2012.  The program, on every other time I try to open it... Freezes.  I see information