ADF refresh page with page fragments jsff jsf after the set session variable

Hello.

I have a model that includes a button that allows you to select a profile, you push the button appear available profiles, choose one and press to accept. After that, I put a variable session successfully.

I have a page of 'First' of jsf with two fragments of page jsff after seeing a link. The display link is composed by a headerView and detailView. The headerView had a variable binding. What I need, is that this parameter (bindVariableParameter) can be defined by the session of the model variable.

That's what I get:

I am in a homepage (separate Application Module), model button is pushed until I load "first" jsf page and after that, I go to the page jsf 'First', that information is loaded successfully. What I do in the Application Module is something like this:

protected void prepareSession (one session) {}

SessionScope card = ADFContext.getCurrent () .getSessionScope ();

Company string = (String) sessionScope.get ("compId");

System.out.println ("Default Comapny in British Colombia is:" + company);

super.prepareSession (session);

this.getSession () .getUserData () .put ("The company", company);

System.out.println ("after the definition userData value card BC");

}

And in the variable binding expression of the headerView that I use:

adf.userSession.userData.Company

It works very well! But!

When I press the button again and I chose another profile, the info is not updated. In the headerView or in the detailView.

Also, when I go to the 'First' jsf page (without previously pressing the button model), I had no info, which is just, because I have no session variable. After I have press the model and select the profile, but the page is not refreshed.

I tried many ways to this, but I'm lost.

Could you help me?

Kind regards.

I'm not sure that understand your use case. What do I get, you set a parameter after that you press a button on the home page to pass this parameter to the first.jsf.

Why don't you implement a method of the application module and call it directly with the parameter. The session of preparation will not be called whenever you browse but only init am.

Do you need the parameter in the layer model or only in the display?

Timo

Tags: Java

Similar Questions

  • Can a report of Jasper operate with an af:button on a page fragment (jsff) or simply on a jsf page?

    Mr President.

    Can a report of Jasper operate with an af:button on a page fragment (jsff) or simply on a jsf page?

    Because I'm running report jasper jsff page but it does not work but the same report runs on a jsf page.

    Concerning

    Cherish!

    The answer to this question is Yes

    We can run report jasper with a button on a page jsff using the servlet class

    The same code for jdev worm 12.1.3.0.0 is as below

    package ash.view;
    
    import ash.model.SchoolAppModuleImpl;
    
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    
    import java.util.HashMap;
    import java.util.Locale;
    import java.util.Map;
    
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.annotation.WebServlet;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    import net.sf.jasperreports.engine.JasperCompileManager;
    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.design.JasperDesign;
    import net.sf.jasperreports.engine.xml.JRXmlLoader;
    
    import oracle.jbo.client.Configuration;
    
    @WebServlet(name = "ReportServlet", urlPatterns = { "/reportservlet" })
    public class ReportServlet extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html; charset=UTF-8";
    
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        }
    
        protected Connection getConnection() {
    
            PreparedStatement st = null;
            String amDef = "ash.model.SchoolAppModule";
            String config = "SchoolAppModuleLocal";
            SchoolAppModuleImpl am = (SchoolAppModuleImpl ) Configuration.createRootApplicationModule(amDef, config);
    
            st = am.getDBTransaction().createPreparedStatement("select 1 from dual", 0);
            Connection conn = null;    
    
            try {
                conn = st.getConnection();
                return conn;
            } catch (SQLException e) {
            }   
    
            return null;
        }
    
        public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            String var0 = "";
            try {
                var0 = request.getParameter("classId");
            } catch (Exception e) {
                e.printStackTrace();
            }
            response.setContentType(CONTENT_TYPE);
            Map parameters = new HashMap();
                   parameters.put("format", "pdf");
                   parameters.put("WEBDIR", getServletContext().getRealPath("/"));
                   parameters.put("REPORT_LOCALE", new Locale("ar"));
    
                   parameters.put("classId", new String(var0));
                   Connection conn = null;
                   InputStream is = null;
                   try
                   {
                     conn = getConnection();
                     is = getServletContext().getResourceAsStream("/WEB-INF/reports/ClassDataReport.jrxml");
    
                     response.setContentType("application/pdf");
                     response.addHeader("Content-Disposition", "attachment; filename=ClassDataReport.pdf");
    
                     JasperDesign jasperDesign = JRXmlLoader.load(is);
                     JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
                     JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);
                     JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
    
                     conn.close();
                   }
                   catch (Exception e) {
                     e.printStackTrace();
                   } finally {
                     closeConnection(conn);
                     try {
                         if(is !=null){
                             is.close();
                         }                   
    
                     } catch (Exception localException1)
                     {
                     }
                   }
    
            PrintWriter out = response.getWriter();
            out.println("");
            out.println("ReportServlet");
            out.println("");
            out.println("

    The servlet has received a GET. This is the reply.

    "); out.println(""); out.close(); } protected static void closeConnection(Connection conn) { try { if(conn !=null){ conn.close(); } } catch (Exception ex) { // System.out.println("Developer Msg : Exception in printReport1Servlet.closeConnection()"); } } }

    Concerning

  • 26 of Firefox does not load the home page. Instead, it loads the previous session (and that includes all tabs). It does not matter how Firefox is closed.

    26 of Firefox does not load the home page. Instead, it load the previous session, regardless of what has been entered in 'Options '. The browser runs in Win 7.0 64 bit; Norton Internet Suite 21 provides security features. There are some solutions 'cloud', also running as Google Drive, box, Skydrive and Cubby. The browser behaves in the same way in all my machines (installation and the OS is similar to that described above) and no amount of reset 'Options' seems to affect it. Nor is it affected by the way that Firefox is closed. This is obviously a bug that should be fixed.

    You can check if you have a user.js file in the Firefox profile folder that affects the pref browser.sessionstore.resume_session_once true value.

    You can use this button to go to the Firefox profile folder:

    • Help > troubleshooting information > profile directory: see file (Linux: open the directory;) Mac: View in the Finder)
  • should my time capsule be connected with a cable for backups, after the initial installation?

    should my time capsule be connected with a cable for backups, after the initial installation?

    If you mean that you have to keep your Mac connected to a Time Capsule via Ethernet for future backups, then the answer is no. Time Machine and time Capsule are designed to work over wireless for your Mac would just need to be connected to the wireless network provided by the time Capsule.

  • Default value loading the page fragment (jsff)

    Hello

    I use jdev 11.1.2.3.0 and I have an application that has a main page with links to launch fragments in a dynamic region.

    I use a session bean to populate the dynamic region

    One of the fragments has a selectoneradio control that is bound to a lookup table.

    The selected value is used to power a bean, who calls a stored procedure to create a record that is used elsewhere.

    I find that if you open the fragment and select one option other than the first item and go to an another jsff by clicking on a different link, then navigate back, still the previously selected item is selected, as opposed to the question that I would be default.

    I've been Googling away, but did not found a snippet of code that allows me to reset, or return to the first element in the set default control.

    Any suggestion would be appreciated.

    Yes, automatically send has been set to true.

    I found a solution to my problem, but it won't work for everyone.

    Because the list of items is linked, but the control itself doesn't have to be, I was able to set the default value directly in the value property of the control.

    Old code...

           
                               label = "#{bindings." SupplierSystemsLookup1.label}.
                               required = "#{bindings." SupplierSystemsLookup1.hints.mandatory}.
                               shortDesc = "#{bindings." SupplierSystemsLookup1.hints.tooltip}"id = 'sor1 '.
                               layout Binding = "#{backingBeanScope.SupplierChange.optSystems}" = "horizontal" "
                              

    inlineStyle = "margin: 0px 0px 15px 0px;" autoSubmit = "true" >

    New Code...

           
                               label = "#{bindings." SupplierSystemsLookup1.label}.
                               required = "#{bindings." SupplierSystemsLookup1.hints.mandatory}.
                               shortDesc = "#{bindings." SupplierSystemsLookup1.hints.tooltip}"id = 'sor1 '.
                               layout Binding = "#{backingBeanScope.SupplierChange.optSystems}" = "horizontal" "
                               inlineStyle = "margin: 0px 0px 15px 0px;" autoSubmit = "true" >
             

    Kind regards.

  • Refreshing the page does not not after the closing of popup.

    I have a main page that has a list that includes a list of elements. And there is a button create that opens a popup to create a new line. I have 2 buttons on the popup, create and cancel.

    The page contains a workflow in which I have an activity back to the home page.

    Action = "return" the Cancel button on the shortcut menu to return to the home page.

    But when I click on cancel, I will return to the home page but the page is empty.  I have partialTriggers on the homepage of listView set the id of the button.

    Help, please.

    I had partialTrigger the button on the shortcut menu.

    Instead if I set the partialTrigger for the popup itself, refresh works fine.

  • Some pages are not loading after the last update v39.

    After the updated 07/07, pages many (but not all) which worked well previously are now time and need to be recharged to load (for the first time, somehow). Started by clearing cache, then checked for malware and ended by reinstalling Firefox. I copied my profile, rather than starting from scratch with extensions (about 5 only execution).

    All of these problematic pages open correctly in Internet Explorer.

    Any ideas? Thank you very much.

    As test, please disable McAfee. It caused problems.

  • Cannot display the home page /apex or /apex_admin after the installation of the local computer

    Hello

    I am trying to install and run a local version of Apex 4.2.2 on my Windows 7 laptop.  I followed the instructions in the Setup Guide of Apex.  And followed the troubleshooting steps and previous patterns uninstalled previous facilities.  Set up and ran the @apexins SYSAUX SYSAUX TEMP/i /.  And configured for the embedded PL/SQL Gateway Protocol. When you enter the url of the apex apex / http://127.0.0.0:8080 / apex_admin browser (configured to run java script) runs for 30 seconds then go back to the page "connection has expired.  The server to 127.0.0.0 takes too long to respond. "Is there something else I need to check/try (log files?).  At one point I had installed 3.2.2 Apex and to the top and runnign on the same laptop, but were not able to get the apex operational 4.x.  Thanks for any help.  -Mike

    Thank you, that did the trick!

  • Problem with the setting session state variable...

    So, I try to understand the context of variables.

    I have a package with a few procedures that were hard coded so I decided to change some of them to use variables in them.

    I'm in APEX 4.1 g 11 backend.

    When I run:
    BEGIN
    APEX_UTIL.set_session_state('p_collection_var', 'STORAGE_TABLE');
    END
    I thought is a variable that would be accessible by:
    v('p_collection_var');
    in the package I have.
    ERR-1002 Unable to find item ID for item "p_collection_var" in application "4500".
    It seems that as the first code is not setting the variable. I'm not sure what I am doing wrong with that.

    Published by: bostonmacosx on November 27, 2012 15:36

    Hello

    You have a page or application P_COLLECTION_VAR in your application?
    You call APEX_UTIL. Procedure SET_SESSION_STATE and V session function valid apex?

    BTW, I think you still need to write the name of the element with capital letters.

    Kind regards
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Z400 disks with EFI partition not mounting after the Windows 7 Pro upgrade

    HP z400: after a repair/upgrade to sp1 of Windows 7 Pro (64), no matter what external disk with an EFI partition is not installed.  Player will be present in the BIOS and the management of drive, but without a letter. Cannot assign a drive letter.  All other discs mount correctly.  Disks with EFI partition will mount on other PCs.  All the drivers seem to be current and fuctional.

    I thought about it... after two weeks of puzzle, I finally found the cause.

    I run MacDrive 8 so I can play discs with HFS + formatting.  This program should be completely uninstalled and reinstalled after the upgrade.  I had turned it off before the upgrade, but it takes more than that.  Everything works now as expected.

    But wouldn't be INCE if Windows reads discs mac natively?

  • Problem with opening files and programs after the attack "rogue security."

    Earlier this year, I met a rogue security program called Windows Security 2011. I had removed it, but I'll still have some serious problems. I found another user here, who had a similar encounter: http://answers.microsoft.com/en-us/windows/forum/windows_xp-windows_programs/exedirectory-file-association-problems/5dcd9044-8b57-43e0-a3bc-0c966326f0da

    "But since the incident, the PC has struggled to open .exe files. If I open Mozilla Firefox, for example, it will ask me to specify the program to run it with. I can browse the OS and find the firefox.exe and open it with that, but it won't allow me to check the box "always use this option. "

    It's exactly the same problem that I have now, as well as some sections of the control panel not working not at all, but there is no answer about what to do after the malware has been removed. Is there a way this can be fixed now?

    Hi Lapeul,

    You can create a new user account and check if you can solve the problem.

    How to create and configure user accounts in Windows XP

    If you are able to resolve the problem, you can consult the following article to fix the damaged user account.

    How to recover damaged Windows XP user profile

  • Problems with some sites to display after the installation of updates.

    Original title: Display problems

    I have some display problems with certain websites.  The appearance has changed after the last windows update.  For example, in Facebook to backgammon, displays boxes outside and I can't see the full picture in the other boxes or scroll down to see it.  Any ideas?

    Hello

    Thanks for choosing Microsoft Community to post your question!

    According to the description above, it seems that after installing the updates, you are facing some display problems with certain websites. I'll be happy to help you.

    I would be grateful if you could answer the following questions:

    1. What is the number of KB of the installed update recently?

    2. what browser do you use?

    3. What is the brand and model of your computer?

    While you reply us with the above information, we will update the video card driver and turn on compatibility mode (this applies only when you use Internet Explorer).

    See the following suggestions.

    Method 1: Refer to the following link suggestions.
    Some sites Web may not behave as expected in Internet Explorer

    http://support.Microsoft.com/kb/956197/ro

    Method 2: Open Internet Explorer in no mode control the Add - ons.
    a. click the Start button, then select all programs.

    b. click on Accessories, then select System Tools.

    c. click Internet Explorer (No Add-ons).

    If your browser seems to work correctly in Internet Explorer (No Add-ons) mode, you can use the add-on Manager to disable all add-ons and then turn on modules only as needed. This will allow you to figure out which add-on is causing the problem.

    Method 3: You can update the display driver.
    Check out the following link to update the display drivers.

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    For all windows questions do not hesitate to contact us and we will be happy to help you.

  • Why is-2 slashes after domain name now, when you publish a live site after the new update with Muse? Post also after the site he has these 2 slashes before 'index.html '.

    There are 2 slashes after domain name now, when you need to publish a live site after the new update with Muse?

    -It was always a slash after the domain name. And if BC publication the

    site - it has also these 2 slashes before "index.html" - is this correct? - or something wrong?

    slash.png

    Hi erinb61521593,

    I did some tests at my end and can confirm that it is a known problem with the latest version of Muse but I advise you to choose the option with the / / at the time of release as it will download your site in good folder on the servers of BC (that points to your domain name) and after publishing the site if you go to the url with single / it works perfectly.

    We already noted this problem with the developers of muse and I don't know that it will be fixed in the next version of Muse.

    Feel free to reply to this post, just in case I missed something or if you have any other doubts about this.

    Kind regards

    Vivek

  • I show several problems with extensions does not not after the last CC PS upgraded.

    USM double, for example, as well as several others are not loading any method. No problem before the major CC PS upgrade in June. Remove and reinstall does not work, manual installation discouraged with Panel of Exchange etc.

    I really don't want to track and communicate with each author to see what the problem is that it looks like more systematic

    They are not installable in the application of obsolete Plugin Manager. They show as purchased on the new CC web add Manager, sync is on, but only a handful are in place such as Kuler and AdobeEMailer. Double USM for example is supposed to appear on the filters menu (and not before the release of June), but he isn't.  There is no error log I know for this kind of failure that seems all hidden in the web cloud CC process to add ons and extensions.  What seems to be the addons and extensions start appearing as they upgraded to the new version. This looks like the case with Double USM, which is now available, but has been absent for a month or so after the release in June. So I see how it works as long as the extension developers playing catch up with Adobe, which is inevitable I guess and is something to know if extensions are an integral part of your

    workflow.

  • Premiere page do not disappear after the first run

    I just installed the latest firefox (9.0.1) and as usual, the first immediate window rises, explaining my rights etc. It is fine and normal. My problem is that no matter how many times I reboot my computer or browser, this first run page does NOT go far. It's like I'm running my firefox for the first time, every time. How can I fix this so I can just have my choice of the right browser?

    Hi ShadoGazer,

    You should look at this article on this specific issue and Preferences not savedarticle. It should give you all the information you need!

    If this does not work:

    1. Enter about: config in the address bar
    2. Click I'll be careful, I promise you if prompted
    3. In the filter field, type Startup
    4. Double click on startup.homepage_override_url
    5. Delete the text string, and then click OK
    6. Close Firefox and reopen the window to check that it worked.

    Hope this helps!

Maybe you are looking for