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
-
I can't access the section of customize notification area. When I click the button nothing happens. It is also the same thing when I try to access it through the control panel.
Hi Mpnieland,
· Were you able to access the section Customize notification before?
You can try the following steps and check if it solves the problem.
Method 1: Try to boot in safe mode and check if you can access the section Customize. You can check the link below.
Start your computer in safe mode
Method 2: Try to start the clean boot and check if help. See the article in the link below to perform a clean boot.
http://support.Microsoft.com/kb/929135
Reset the computer to start as usual
When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
- Click Start, type msconfig.exe in the Start Search box and press ENTER.
- If you are prompted for an administrator password or for confirmation, type your password, or click on continue.
- On the general tab, click the Normal startup option, and then click OK.
- When you are prompted to restart the computer, click on restart.
Method 3: You can try to create a new user account and check if the problem is solved in it.
To create a user account follow the steps below:
- Open a user account by clicking on the Start button, select Control Panel, click user accounts and family safety, and then click user accounts.
- Click Manage another account. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
- Click create a new account.
- Type the name that you want to assign to the user account, click the account type, and then click create an account.
For more information, visit the below mentioned link:
http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account
If the problem is resolved in the new user account, you may have corrupted profile.
Here is the link for troubleshooting a corrupted profile, you can follow the steps mentioned in the link.
http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile
Hope this information helps.
-
More I can't pull up the Windows Media Player on this computer. When I click the icon, nothing happened, what / s wrong?
Hi Thomas,
1. you receive messages or error codes?
2. when the problem started?
3. did you of recent changes on the system?
Method 1:
You can run the Fixit from the following link and check if it can solve the problem.
Solve the problems of Windows Media Player video and other media or library
You can also read the following article and check if it helps.
Method 2:
If you still experience the problem, you can perform a clean boot and check.
A clean boot to check if startup item or services to third-party application is causing this issue.
You can read the following article to put the computer in a clean boot:
How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
After the troubleshooting steps, please clean the start link to put the computer to normal startup mode
Hope this information is useful.
-
help XP Activation
Accidentally, I used my xp professional on my computer which had xp family on it. my computer says I need to activate windows, but when I click the icon, nothing happens. I can't go back to xp home, he beginning to install on the partition. How to activate windows when I can't get to the prompt?http://www.Microsoft.com/genuine/diag/
Try this link for activation...
-
The sign + to add a new tab has suddenly stopped to work earlier. I tried uninstalling and reinstalling and it still does not work. What can happen and how to fix it?
Hello
The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
Note: This will make you lose all the Extensions, open Web sites and preferences.To reset Firefox, perform the following steps:
- Go to Firefox > help > troubleshooting information.
- Click on the button 'Reset Firefox'.
- Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
- Firefox opens with all the default settings applied.
Information can be found in the article Firefox Refresh - reset the settings and Add-ons .
This solve your problems? Please report to us!
Thank you.
-
CC of Lightroom installed but when I click the icon, nothing happens.
I installed the new CC Lightroom but when I click on the desktop icon, nothing happens. No idea why not?
Try to connect on the desktop CC app, and then sign in again.
-
I downloaded Windows 7 Pro and secure download manager. When I click the button start nothing happens. What do you think is the problem?
original title: failure to launchWhere did you downloaded it go?
Looks like it was not Ms.
-
I currently have installed Windows7 x 64. I had previously and unsuccessfully tried to install Windoes8 preview. Now, I try to install the full Windows 8. I went to the Microsoft site, clicked on the download Pro now [$39.95]. He appears in the downloads, but when I click on 'Open' nothing happens. I looked into the hidden folders and it does not appear anywhere. Great mystery! Where can it be? Can something be blocking the opening? Is there another way I can check if it is even downloaded to the PC? Thank you.
PS - what I get from the download page is the Upgrade Assistant that is what does not open on the PC.
Update - has managed to enter the program when I clicked on the Start button and then clicked on "Download Windows". I ended up finding a message that the download was unsuccessful due to an unspecified error. Just a matter worse. Some little problem with my system?Try to rename or delete the Web installation folder and try again.
C:\Users\
\AppData\Local\Microsoft\Web install Please let us know if you are able to continue after trying the above
-
I need help I have a student 5 PC and lightroom version. I bought some time ago and cannot download as when one click on install, nothing happens
Please visit the following links.
-
free trial of adbobe stall contribute, but when I click on download, nothing happens
Hi Patrick,
Please try to download it from another browser and check.
Otherwise you can download it directly by following the steps below:
1. go to the page contribute 6.5 Downloads: https://www.adobe.com/cfusion/tdrc/index.cfm?product=contribute&loc=en_us
2. sign in with your Adobe ID
3 copy and paste the following links on the address bar in an ime and press on enter:
Windows:
http://trials3.Adobe.com/AdobeProducts/CNTB/6_5/Win32/Contribute_6_5_LS12.7z
http://trials3.adobe.com/AdobeProducts/CNTB/6_5/Win32/Contribute_6_5_LS12.exe
Mac:
http://trials3.Adobe.com/AdobeProducts/CNTB/6_5/OSX10/Contribute_6_5_LS12.dmg
4. save the files
5. launch the .exe if Windows remains the .dmg I file on Mac to start the installation.
-
Frustration of fresh paint - when I click the button cancel the entire image is annihilated
Original title: Frustration of fresh paint
I am an older user and love the app, but my work is wiped out all of a sudden. I'll work on an image for days and save after each use, then for some reason, when I click the button cancel that the entire image is wiped out except the works which have been recorded at the start of the first time. When I do my "save under", he asked if I want to replace my drawing with the new and I click Yes. The day after the registered design is here and I can work on that. I have no idea why, while in the workplace the Cancel button clears all of this. Understand that I will have used the button cancel successfully with this doesn't happen. Help, please. It's very depressing to create something, you've spent time on and then lost it.
Please keep in mind that I am a novice. Please answer in understandable language. Thank youHello
1. have you tried to click the Redo button to bring back the deleted image?
2 has there been any changes made on the computer before the show?
Method 1:
First of all, I suggest you to run the app store that would check if there are problems with an application.
Method 2:
I suggest to refer to the article and follow the steps to solve the problem:
What to do if you have problems with a soft
Let us know the results.
-
I can't install Adobe Photoshop elements 13. When I click the button install, need me in the folder "Adobe Photoshop Elements 13 (download)", but there is no action that I can take at this time. I am running Windows 7 Home Premium, SP 1.
Hi Michelle. I thought about it. To install the program, go the downloaded zip [Adobe Photoshop Elements 13 (Download)] folder, then open the "64 bit", then double-click on the "PhotoshopElements_13_LS25_win64" application Who will run the program. I hope this helps. David
-
I uninstalled all Firefox files, etc. and reinstalled the latest version. When I open the menu at the top right and click on customize, nothing happens. Before I reinstalled it, all I would get was a blank white screen. Now as I said, I get no response at all.
Any suggestions as to what I can do...?
Kind regards
Laurie
Try from Firefox in safe mode and refresh. (https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings)
-
I only have the tab open but still impossible to create a new tab by clicking on the button "open a new tab. If I'm at a Web site and right-click, I can tell the page to open in a new tab. But I can't get the new tab button to work. It will also not work Ctrl-T
Inform your employer about this problem. The developer will have to address this add-on attachment.
-
I can't change the printing on my HP PSC2175 preferences. When I click on it, a window will appear, and then disappers instantly. May not print correctly (using Microsoft Office 2010) Word documents or PDF documents correctly. It can print text perfectly, but diagrams, text boxes and grids do not print, and other times it prints only part of it. I am using Windows 7 32 bit. It started after the upgrade to Vista.
Hello
Have you tried to uninstall and reinstall your driver located within the Windows 7 operating system? You probably know that HP did not create a downloadable driver for Windows 7. I would try uninstalling and then reinstalling the driver.
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
-
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