af:fileDownloadActionListener not calling the bean method

Hello,
I am using Jdev 11.1.1.6.
I have a page where user can generate the report and download it. I am using <af:fileDownloadActionListener> for this on my jsff (implemented as region using BTF).
The commandbutton with <af:fileDownloadActionListener> is calling a backing bean method. When user clicks the "Print" button, it is supposed to generate the report and allow user to download it.
The issue here is that the control never goes to bean method after button press. The browser keeps showing busy but no control passed to bean method. Interestingly, after you close the browser, it immediately goes to bean method.
I have tried waiting for long time (some times 15-20 min) but it never goes there during execution.
What could be going wrong here?
Code snippet from my jsff:
<af:commandButton id="cb1"
                  textAndAccessKey="Print"
                  partialSubmit="false"
                  clientComponent="true">
               <af:fileDownloadActionListener method="#{someMethod}"
                                              filename="#{someName}"/>
</af:commandButton>This is really frustrating as I have no clue what is going wrong here. The similar code works in other page but not here.
I would highly appreciate help here.
Thanks,
Jai

Like I said, it is working fine on my other pages and I tried on new page, just like yours, and it worked. It is not working where I need it.
I know the issue is somewhere with my page [child or parent, explained later] and I am looking for help on finding the root cause. Some direction/tip which I can follow and figure out the issue.
Other buttons are working fine on the page but <af:fileDownloadActionListener> does not work. The page seems to go in loop as it keeps printing generic messages that are generally printed when page is submitted.
This will continue until you close the page/browser and then the control goes to bean method.
Let me explain page structure:
My application is based on UIShell and is basically based one page application. Every page (jsff) is implemented as region using BTF. When user clicks on menu, MainPage is opened. This MainPage represents main structure using layout components like panelGroupLayout, panelTabbed, showDetailItem etc. These layout components contains <af:region> implemented using BTF.
The MainPage which has this issue is large page with almost 100+ BTF af:regions implemented under panelTabbed+showDetailItem combination.
<af:fileDownloadActionListener> has been implemented on one of the <af:region>, which is part of this MainPage.
Few Observations:
1. If I move this button [with <af:fileDownloadActionListener>] to any of the af:region under current MainPage then it does not work.
2. If I move this button [with <af:fileDownloadActionListener>] to any independent page or any <af:region> which is part of some other MainPage, then it works.
3. Other MainPage where it is working fine is also a fairly large page with almost 150+ BTF af:regions
4. All our MainPages are based on template, so there is very high level of consistency in behavior and other handlings.
For whatever reason, it is not working on my current page and I would highly appreciate any input based on above info [or otherwise] to find a root cause for this issue.
If I need to debug, where should I start? What could be causing that looping behavior, specially with <af:fileDownloadActionListener>.
Thanks,
Jai

Similar Messages

  • JSP does not call the right method in controller class

    Hi all,
    I have a jsp file which loads a page at this address: http://localhost:8080/dir/list/
    I've added two checkboxes to the page; user can check both checkboxes, only one or none. Following is code I have in jsp file:
    <form class="checkboxForm">
    <c:choose>                                                                                                         
    <c:when test='${newItems==true}'>
    <input id="newItems" type="checkbox" value="#" name="newItems" class="checkbox2" checked="checked" /><strong> New Businesses   </strong>                                                                 
    </c:when>
    <c:otherwise>
    <input id="newItems" type="checkbox" value="#" name="newItems" class="checkbox2"/><strong> New Businesses   </strong>
    </c:otherwise>
    </c:choose>
    <c:choose>                                                                                                         
    <c:when test='${rejectedItems==true}'>
    <input id="rejectedItems" type="checkbox" value="#" name="rejectedItems" class="checkbox3" checked="checked"/><strong> Rejected Businesses   </strong>                                                                 
    </c:when>
    <c:otherwise>
    <input id="rejectedItems" type="checkbox" value="#" name="rejectedItems" class="checkbox3"/><strong> Rejected Businesses   </strong>
    </c:otherwise>
    </c:choose>
    <a href="#" onclick="apply();">
    <button name="apply" class="btn-primary" value="Apply" tabindex="4">Apply</button>
    </a>
    </form>
    <script type="text/javascript">
    function apply(){
         var newItems = document.getElementById("newItems").checked;
         var rejectedItems = document.getElementById("rejectedItems").checked;
         alert("Inside apply() method.");
         alert("newItems= " + newItems + ", rejectedItems: " + rejectedItems);     
         window.location = "<c:url value='/list/'/>" + newItems + "/" + rejectedItems;
         alert("window.location= " + window.location);
         alert("Add extra delay!");
         return false;
    </script>This is my Controller class:
    // Method1: this method gets called when the user loads the page for the first time.
    @RequestMapping(value="/list", method = RequestMethod.GET)
    public String list(Model model, HttpServletRequest request) {          
              System.out.println("Controller: method1: Passing through...");
              model.addAttribute("newItems", Boolean.TRUE);
              model.addAttribute("rejectedItems", Boolean.TRUE);
              // Does other things.
    // Method3: this method gets called when user checks/unchecks one of the checkboxes and clicks on Apply button.
    @RequestMapping(value="/list/{newItems}/{rejectedItems}", method = RequestMethod.GET)
    public String list(@PathVariable Boolean newItems, @PathVariable Boolean rejectedItems, Model model, HttpServletRequest request) {          
              System.out.println("Controller: method3: Passing through...");
              model.addAttribute("newItems", newItems);
              model.addAttribute("rejectedItems", rejectedItems);
    // Does other things.
         }The way my jsp code is written now, it calls the correct method and displays the correct url. When page loads for the first time, it calls method1 and the url is:
    http://localhost:8080/dir/list
    When the user checks/unchecks one or both checkboxes and clicks on apply button, method3 is called and this url is displayed:
    If both checkboxes are checked which both booleans are set to true:
    http://localhost:8080/dir/list/true/true
    Everything is fine... however, if I comment these two lines at the end of JavaScript apply() function,
    alert("window.location= " + window.location);
    alert("Add extra delay!");Then method3 will never gets called; only method1 gets called and I see this url:
    http://localhost:8080/url/list//?newItems=%23&rejectedItems=%23&apply=Apply
    I do not know why it gets confused bet. method1 and method3 and cannot pick the right method?
    I tried to use the POST method instead, but the page goes directly to our internal error page and it never reaches the method I wrote in my controller for POST:
    I don't really know what I'm doing wrong? Any help is greatly appraciated.
    Edited by: ronitt on Dec 13, 2011 2:35 PM

    I changed the <form> in the jsp to div and its working fine. I do not need to have comments in JavaScript funcion() anymore. I don't know why that made the difference though? According to:
    http://www.w3schools.com/tags/tag_form.asp
    The <form> tag is used to create an HTML form for user input.
    The <form> element can contain one or more of the following form elements:
    <input>
    <textarea>
    <button>
    <select>
    <option>
    <optgroup>
    <fieldset>
    <label>
    An HTML form is used to pass data to a server.
    I do have <button> and also send the data - the value of checkboxes - to server. So I think it should also work with <form>.
    Please let me know if you have any idea. Thanks.

  • Not calling the action method??

    hi ..
    now i up with some common problem...
    i said as common problem coz i dont know where the error is occuring.
    here is the description.
    In my jsp
    i am having a panel tabbed pane with 2 panes.
    first pane contains some 20 text boxes with save button, used to save the entered records to the database.
    second pane contains the summary page which displays all the records from the respected table with select option button(radio). By selecting the single radio button we can edit the particular record by getting the same in the first tabbed pane fields...
    (here, i am using a javascript to select any one radio button in the form coz radio buttons are generated thru datatable)
    In java
    ======
    in constructor
    i populate all the data from the table to a list. and i display the populated data to the summay fields.
    save button action
    saving the data to the table
    edit the value
    updating the edited values
    Here, my problem is after entering all the fields in the first tabbed pane
    i click the save button. if there is no data in the table(database) all things working properly, but if there single data, save function is not calling. but the constructor are calling properly.
    i am using hibernate for the database conn.
    i know this is some sort of logical error, i am posting this only if any one who had already face this type of error(might be in setting session values).. suggestions plz..

    Hi;
    Your question is not related wiht Download forum side, Please post your issue on related Forum side:
    Forum Home » Developer Tools » JDeveloper and ADF
    Regard
    Helios

  • Howto call the @Remove method of a stateful session bean after JSF page ...

    I use EJB3, JPA, JSF in my web application. There are 2 database tables: Teacher and Student. A teacher can have many (or none) students and a student can have at most 1 teacher.
    I have a JSF page to print the teacher info and all his students' info. I don't want to load the students' info eagerly because there's another JSF page I need to display the teacher info only. So I have a stateful session bean to retrieve the teacher info and all his students' info. The persistence context in that stateful session bean has the type of PersistenceContextType.EXTENDED. The reason I choose a stateful session bean and an extended persistence context is that I want to write something like this without facing the lazy initialization exception:
    <h:dataTable value="#{backingBean.teacher.students}" var="student">
        <h:outputText value="${student.name}"/>
    </h:dataTable>Because my session bean is stateful, I have a method with the @Remove annotation. This method is empty because I don't want to persist anything to the database.
    Now, my question is: How can I make the @Remove method of my stateful session bean be called automatically when my JSF page finishes being rendered?

    Philip Petersen wrote:
    I have a few questions concerning the EJB remove method.
    1) What is the purpose of calling the remove method on stateless session
    bean?There isn't one.
    >
    2) What action does the container take when this method is called?It checks that you were allowed to call remove (a security check) and then
    just returns.
    >
    3) What happens to the stateless session bean if you do not call the remove
    method?Nothing
    >
    4) Is it a good practice to call the remove method, or should the remove
    method be avoided in the case of stateless session beans?
    Personally, I never do it.
    -- Rob
    >
    >
    Thanks in advance for any insight that you may provide.
    Phil--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    [att1.html]

  • How to call a bean method through javascript?

    Hi,
    i want to call a bean method using the javascript.
    thansk in advance.

    hi
    i want to call a backing bean method thought javscript on the button click.
    i am inplementing addition of textbox at runtime.i wrote method and i am calling that on the button click.but the textbox is not created.
    the code is bleow
    public String doAction() {
         tryStuff1();
    return "samplejsf";
    public void tryStuff1()
    System.out.println("Enter the trystuff method");
         FacesContext facesContext = FacesContext.getCurrentInstance();
    UIViewRoot uIViewRoot = facesContext.getViewRoot();
    Application application = facesContext.getApplication();
    UIComponent formComp=uIViewRoot.findComponent("subbody:form1");
    HtmlPanelGrid grid= new HtmlPanelGrid();
    grid.setId("panelgrid2");
    grid.setColumns(2);
    grid.setBorder(2);
    //UIComponent panelGridComp=formComp.findComponent("subbody:panelgrid1");
    //UIComponent panelGroupComp=panelGridComp.findComponent("panelgroup2");
         HtmlOutputText output = new HtmlOutputText();
    output.setValue("dynamic jsf text2");
    System.out.println("hello output text2");
    output.setRendered(true);
    grid.getChildren().add(output);
    HtmlInputText input = new HtmlInputText();
    input.setSize(40);
    input.setValueBinding("value", (ValueBinding) application.createValueBinding("#{sample.text2}"));
    input.setRendered(true);
    grid.getChildren().add(input);
    System.out.println("hello output text1");
    grid.setRendered(true);
    formComp.getChildren().add(grid);
    System.out.println("hello output text3:");
    formComp.getRendersChildren();
    formComp.setRendered(true);
    public boolean getRendersChildren() {
         return true;
    jsp code is
    <h:form id="form1">
    <h:panelGrid columns="2" binding="#{sample.formElements}">
    </h:panelGrid>
    <h:panelGrid id="panelgrid1" columns="1">
    <h:panelGroup id="panelgroup1">
    <h:outputText value="hardcoded jsf text1"/>
    <h:inputText value="#{sample.text1}"/>
    </h:panelGroup>
    </h:panelGrid>
    <h:commandButton id="add" action="#{sample.doAction}" value="add" type="SUBMIT"/>
    </h:form>
    when i click on the button its going into the method and diaplying s.o.p but the text box is not updated to the page.
    why is it so.
    i thought there may be a problem in calling the method directly thru button. i want to try thru javascript calling the bean method.
    why is the page not updated.
    can u help me out
    thanks in advance
    sree

  • How to call a bean method through a javascript function

    I dont discover any problems calling the bean method in this maner:
    <%= helpdesk.data() %>
    But, when I use a Button Onclick= to call the script function and which then is going call my bean method
    an error on the page is reported!
    I have include som code which gives you the idea of what Iam searching for. And is it possible to call
    the bean method without doing from a new jsp page?
    If you have any suggestions to why it doesnt work, please let me know.
    I use Apache Tomcat 4.0
    Best regards Micah.
    <jsp:useBean id='helpdesk' scope='application'
    class='helpdesk.testdb'/>
    <html>
    <head>
    <script language="javascript">
    function broadcast()
    helpdesk.data();
    </script>
    </head>
    <body>
    <input type="button" value="Broadcast" onclick= broadcast()>
    </body>
    </html>

    It's actually quite simple:
    Beans run server-side
    Javascript runs client-side
    So you will never be able to run server-side-code thru the client...

  • How to call a bean method in the faces-config file?

    Hi,
    I would like in my menu to call the method of a bean (it initialize some properties before opening the page) instead of opening directly the page, by I can't find how to do that.
    I tried :
    <managed-property>
    <property-name>viewId</property-name>
    <value>#{listInformationsController.listInformations}</value>
    </managed-property>
    And :
    <managed-property>
    <property-name>outcome</property-name>
    <value>#{listInformationsController.listInformations}</value>
    </managed-property>
    With no success...
    Can someone help me?
    Thank you and merry christmas !

    Hi,
    a managed property only gives you a anlde to a bean or property, it doesn't execute it. To execute a bean, you can use a custom JSF PhaseListener that calls a bean method. The reference to the bean is achieve through value binding
    ValueBinding vb = FacesContect.getCurrentInstance().getApplication().createValueBinding("Name of Managed Bean);
    TypeOfBean theBean =(TypeOfBean) vb.getValue(FacesContext.getCurrentInstance());
    .... theBean.theMethod() ...
    Frank

  • How to call a bean method from javascript event

    Hi,
    I could not find material on how to call a bean method from javascript, any help would be appreciated.
    Ralph

    Hi,
    Basically, I would like to call a method that I have written in the page java bean, or in the session bean, or application bean, or an external bean, from the javascript events (mouseover, on click, etc...) of a ui jsf component. I.e., I would like to take an action when a user clicks in a column in a datatable.
    Cheers,
    Ralph

  • How to call the bean in jspdyn component?

    Hi,
    i created  jspdyn component in that bean and bussiness logic class in NWDS.i created a method() in that businesslogic class.i called that method in bean class.i created both in same package,there is no error occur while creating the object of that class.but the bean class not recognize the business class method which i created. What is the cause? and also tell me how to call the bean in jsppage also.and also give me textfields,button and syntax of event handling in HTMLB,iam new to this area.so,give me one example step by step.

    Hi,
         Please check on these links for a good start.
    Java development methodologies (Part II)
    Bean usage in JSPDynPage
    jspDynPage portalapp.xml
    Regards,
    Harini S
    Please avoid giving personal mail id(s). That may prevent others from getting the same information when needed.

  • Calling backing bean method from HttpSessionListener

    Hi,
    I am detecting session expiration through HttpSessionListener's sessionDestroyed() method. I have a logout() method in my backing bean which does all the session clean up. If the user clicks the logout link, then I call the logout method and do the clean up. But when the user closes the browser, then I believe that the HttpSessionListener's sessionDestroyed() method will be called. How do I call the logout() method of my backing bean from from sessionDestroyed() method of HttpSessionListener.

    I did as you said, but the finalize method is never called. I can see the session timing out and sessionDestroyed() method being called, but not the finalize() method. Here is the code for sessionDestroyed()
        public void sessionDestroyed(HttpSessionEvent sessionEvent){
            System.out.println("Session Destroyed Called");
            HttpSession session = sessionEvent.getSession();
            session.invalidate();
            System.gc();
        }and for finalize()
        public void finalize() throws Throwable{
            System.out.println("In Finalize Method");
            FacesContext ctx = FacesContext.getCurrentInstance();
            Object requestObject = ctx.getApplication().getVariableResolver().
                                   resolveVariable(ctx, "databaseCon");
            DatabaseCon databaseCon = (DatabaseCon) requestObject;
            Connection con = databaseCon.getConnection();
            String sql = "DELETE FROM TEMP WHERE EX_ID = ?";
            PreparedStatement pstmt = con.prepareStatement(sql);
            pstmt.setInt(1,this.getExId());
            pstmt.executeUpdate();
            super.finalize();
        }

  • CommandLink not invoking the action method

    Hi,
    I have commandLink that doesn't call the action method specified in the managed bean. I also have scope of the bean as session. I tried with commandButton also. Any thoughts on this? I am using myfaces1.1.4.
    The source code is as follows:
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
    <html>
    <f:subview id="itemdetails">
    <f:loadBundle basename="messages" var="msgs"/>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Item Details</title>
    <LINK REL=StyleSheet HREF="buttons.css" TYPE="text/css" />
    </head>
    <body bgcolor="#DEE7F7">
    <h:form>
    <h:commandLink action="#{ItemDetailsBean.addItems}" styleClass="label" value="Add" />
    <h:panelGrid id="panel" columns="4" border="0" styleClass="tableborder" style="text-align:left">
    <f:facet name="header">
                        <h:outputText value="Item Details" styleClass="title" />
              </f:facet>
              <h:outputLabel value="#{msgs.line}" styleClass="label"/>
              <h:panelGroup>
              <h:column>
              <h:inputText id="lineNumber" value="#{ItemDetailsBean.lineNumber}" required="false" />     
              <h:outputText escape="false" value="<br>"/>
    </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.elApplicationTypeJapan}" styleClass="label"/>
    <h:inputText id="elApplicationTypeJapan" value="#{ItemDetailsBean.elApplicationTypeJapan}" required="false" />     
              <h:outputLabel value="#{msgs.ro}" styleClass="label" />
              <h:panelGroup>
              <h:column>
              <h:inputText id="roNumber" value="#{ItemDetailsBean.roNumber}" required="false" />     
              <h:outputText escape="false" value="<br>" />
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.elApplicationTypeNotJapan}" styleClass="label"/>     
    <h:inputText id="elApplicationTypeNotJapan" value="#{ItemDetailsBean.elApplicationTypeNotJapan}" required="false" />     
              <h:outputLabel value="#{msgs.item}" styleClass="mandatory"/>
              <h:panelGroup>
              <h:column>
              <h:inputText id="itemNumber" value="#{ItemDetailsBean.itemNumber}" required="true" />     
              <h:graphicImage id="itemDescLov" value="#{msgs.imagesLov}" style="cursor:hand"/>
              <h:inputText id="itemDesc" value="#{ItemDetailsBean.itemDesc}" required="true" />     
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.elModelType}" styleClass="label"/>
    <h:inputText id="elModelType" value="#{ItemDetailsBean.elModelType}" required="false" />
              <h:outputLabel value="#{msgs.uom}" styleClass="mandatory"/>
              <h:panelGroup>
              <h:column>
              <h:inputText id="uomCode" value="#{ItemDetailsBean.uomCode}" required="true" />     
              <h:graphicImage id="uomCodeLov" value="#{msgs.imagesLov}" style="cursor:hand"/>
              <h:inputText id="uomDesc" value="#{ItemDetailsBean.uomDesc}" required="true" />
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.elApprovalNumber}" styleClass="label"/>
    <h:inputText id="elApprovalNumber" value="#{ItemDetailsBean.elApprovalNumber}" required="false" />     
              <h:outputLabel value="#{msgs.qty}" styleClass="mandatory"/>
              <h:panelGroup>
              <h:column>
              <h:inputText id="quantity" value="#{ItemDetailsBean.quantity}" required="true" />
              <h:outputText escape="false" value="<br>"/>
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.ordinanceCodeNo}" styleClass="label"/>
    <h:inputText id="ordinanceCode" value="#{ItemDetailsBean.ordinanceCode}" required="false" />
    <h:outputLabel value="#{msgs.qtyperunitprice}" styleClass="mandatory"/>
    <h:panelGroup>
              <h:column>
              <h:inputText id="quantityPerUnitPrice" value="#{ItemDetailsBean.quantityPerUnitPrice}" required="true" />
              <h:outputText escape="false" value="<br>"/>
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.ordinanceClassficationNumber}" styleClass="label"/>
    <h:inputText id="ordinanceClassficationNumber" value="#{ItemDetailsBean.ordinanceClassficationNumber}" required="false" />     
              <h:outputLabel value="#{msgs.unitprice}" styleClass="mandatory"/>
              <h:panelGroup>
              <h:column>
              <h:inputText id="unitPrice" value="#{ItemDetailsBean.unitPrice}" required="true" />
              <h:outputText escape="false" value="<br>"/>
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.smallSum}" styleClass="label"/>
    <h:inputText id="smallSum" value="#{ItemDetailsBean.smallSum}" required="false" />
    <h:outputLabel value="#{msgs.hsCode}" styleClass="mandatory" />
    <h:panelGroup>
              <h:column>
              <h:inputText id="hsCode" value="#{ItemDetailsBean.hsCode}" required="false" />
              <h:outputText escape="false" value="<br>"/>
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.secretCodeFlag}" styleClass="label"/>
    <h:inputText id="secretCodeFlag" value="#{ItemDetailsBean.secretCodeFlag}" required="false" />
    <h:outputLabel value="#{msgs.countryoforigin}" styleClass="label"/>
    <h:panelGroup>
              <h:column>
              <h:inputText id="countryOfOrigin" value="#{ItemDetailsBean.countryOfOrigin}" required="false" />     
              <h:graphicImage id="countryOfOriginLov" value="#{msgs.imagesLov}" style="cursor:hand"/>
              <h:inputText id="countryOfOriginDesc" value="#{ItemDetailsBean.countryOfOriginDesc}" required="false" />
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.comprehensivePreInspectionFlag}" styleClass="label"/>
    <h:inputText id="comprehensivePreInspectionFlag" value="#{ItemDetailsBean.comprehensivePreInspectionFlag}" required="false" />     
              <h:outputLabel value="#{msgs.countryofdiffusion}" styleClass="label"/>
              <h:panelGroup>
              <h:column>
              <h:inputText id="countryOfDiffusion" value="#{ItemDetailsBean.countryOfDiffusion}" required="false" />     
              <h:graphicImage id="countryOfDiffusionLov" value="#{msgs.imagesLov}" style="cursor:hand"/>
              <h:inputText id="countryOfDiffusionDesc" value="#{ItemDetailsBean.countryOfDiffusionDesc}" required="false" />     
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.ear}" styleClass="label"/>
    <h:inputText id="ear" value="#{ItemDetailsBean.ear}" required="false" />
    <h:outputLabel value="#{msgs.countryofassembly}" styleClass="label"/>
    <h:panelGroup>
              <h:column>
              <h:inputText id="countryOfAssembly" value="#{ItemDetailsBean.countryOfAssembly}" required="false" />     
              <h:graphicImage id="countryOfAssemblyLov" value="#{msgs.imagesLov}" style="cursor:hand"/>
              <h:inputText id="countryOfAssemblyDesc" value="#{ItemDetailsBean.countryOfAssemblyDesc}" required="false" />
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.tsca}" styleClass="label"/>
    <h:inputText id="tsca" value="#{ItemDetailsBean.tsca}" required="false" />     
    <h:outputLabel value="#{msgs.hazardousgoods}" styleClass="label"/>
    <h:panelGroup>
              <h:column>
              <h:selectBooleanCheckbox id="hazardousGoods" value="#{ItemDetailsBean.hazardousGoods}"/>
              <h:outputText escape="false" value="<br>"/>
              </h:column>
    </h:panelGroup>
    <h:outputLabel value="#{msgs.inspection}" styleClass="label"/>
    <h:inputText id="inspection" value="#{ItemDetailsBean.inspection}" required="false" />     
    <h:outputText escape="false" value="<br>"/>
    <h:outputText escape="false" value="<br>"/>
    <h:outputLabel value="#{msgs.ewarningGoods}" styleClass="label"/>
    <h:inputText id="warningGoods" value="#{ItemDetailsBean.warningGoods}" required="false" />
    </h:panelGrid>
    </h:form>
    </body>
    </f:subview>
    </html>

    I have a SummaryPage that has an outputlink. On clicking that link to goes to the following URL:
    http://localhost:8080/viewLayer/ExportInvoiceEdit.faces?invoiceId=INV-00035&orgId=PLGA
    The code snippet of this page is :
    <t:panelTabbedPane width="110%" activeTabStyleClass="RightTabForeCurveid704112siteid0" >
    <t:panelTab label="Invoice Header">
    <jsp:include flush="true" page="invoiceheader.jsp"></jsp:include>
    </t:panelTab>
    <t:panelTab label="Item Summary" >     
         <jsp:include flush="true" page="ItemSummary.jsp"></jsp:include>
    </t:panelTab>
    <t:panelTab label="Item Edit">
         <jsp:include flush="true" page="itemdetails.jsp"></jsp:include>
    </t:panelTab>
    <t:panelTab label="Item Specification">
         <jsp:include flush="true" page="itemspecification.jsp"></jsp:include>
    </t:panelTab>
    <t:panelTab label="Comments">
         <jsp:include flush="true" page="comments.jsp"></jsp:include>
    </t:panelTab>
    <t:panelTab label="Shipping Schedule">
         <jsp:include flush="true" page="ScheduleSummary.jsp"></jsp:include>
    </t:panelTab>
    <t:panelTab label="Add Shipping Schedule" >
         <jsp:include flush="true" page="seaschedule.jsp"></jsp:include>
    </t:panelTab>
    </t:panelTabbedPane>
    ===================
    In itemdetails.jsp, I have the commandlink. I don;t have any params configured in faces-config.xml since there is not managed bean for ExportInvoiceEdit.faces. However i have one managed bean for each included jsf page
    I need the invoiceid that has been passed in url in all the included jsf pages. Since on commandlink click, the page is getting refreshed without the param "�nvoiceid", my tabs that contain included jsf pages r getting displayed blank on refresh.
    Message was edited by:
    prashantp_4s

  • Calling a bean method on select of Combo box item

    Hi
    On select of Combo box item in a form, text fields in the same form should be populated
    dynamically.Is it possible to call a bean method which does this,by calling onSelect() method
    of combo box ?
    Thanks in advance,
    Sridevi

    Uff, sorry!
    I ment that you write some code for the "onSelect" event which sends a request to the server with the selected value: onSelect="self.location.href='<%= request.getRequestURI()%>?selectedVal= ' + this.selectedIndex;"

  • Calling managed bean method using ajax on jsp page loading

    Hello,
    I am using jsf1.1 i want to call managed bean method when page gets loaded using ajax.
    Thanks
    K.Ramu

    Use an ajaxical JSF framework, for example Ajax4jsf (part of RichFaces).
    But why don´t you just use the constructor of the bean class to do some stuff prior to page loading?

  • How to call backing bean method from java script

    Hi,
    I would like to know how to call backing bean method from java script.
    I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
    The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
    So could any please letme know how to call backing bean method from java script
    Thanks
    Murali
    Edited by: mchepuri on Oct 24, 2009 6:17 PM
    Edited by: mchepuri on Oct 24, 2009 6:20 PM

    Hello,
    May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
    the problem is.
    1. before loading the page a javascript comes on which i clicked ok
    2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
    I m trying to do this through server listener and click listener. the code is(adf jspx page)
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
    <af:commandButton text="commandButton 1"
    binding="#{backingBeanScope.backing_check4.cb1}"
    id="cb1" action="#{beanCheck4.submit1}"/>
    <af:clientListener type="click" method="delRow"/>
    <af:serverListener type= "jsServerListener"
    method="#{backingBeanScope.backing_check4.submit1}"/>
    <f:facet name="metaContainer">
    <af:resource type ="javascript">
    x=confirm("hi");
    // if(x){
    delRow = function(event){
    AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
    return true;
    </af:resource>
    </f:facet>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
    </jsp:root>
    the backing bean code is -----
    public class classCheck4 {
    public classCheck4() {
    public String submit1() {
    System.out.println("hello");
    return null;
    }

  • Initializer block not called when static method called

    public class Initializer {
         Initializer(){
              System.out.println("Constructor called");
                   System.out.println("CLASS INITIALIZED");
         static void method(){
              System.out.println("Static method called");
         public static void main(String[] args) {
              Initializer.method();
    From the JLS
    A class or interface type T will be initialized immediately before the first occurrence of any one of the following:
    T is a class and an instance of T is created.
    T is a class and a static method declared by T is invoked.
    [b]
    But when i call the static method , if the class is initialized shouldnt the initializer block be called, it is not called, why.

    Perhaps running something like this will add a little more colour?:
    public class Initializer {
        static {
            System.out.println("First static initializer");
            System.out.println("First instance initializer");
        Initializer() {
            System.out.println("Constructor");
        static {
            System.out.println("Second static initializer");
            System.out.println("Second instance initializer");
        static void staticMethod() {
            System.out.println("staticMethod");
        void instanceMethod() {
            System.out.println("instanceMethod");
        public static void main(String[] args) {
            System.out.println("main");
            staticMethod();
            new Initializer().instanceMethod();
    }

Maybe you are looking for

  • No Vendor specified during creation of implicit enhancement

    I am trying to do the implicit enhacement in the include MSSCDFLS at the starting of the form ls_display . But it giving an message "No vendor Specified" and when i go to SE80 and check the enahcement then it is not activated and i didn't find any as

  • Problems with ie6

    Hi, i develop page with visual web pack, it contain many buttons with actions etc. it work fine with ie7 and firefox but have problems with ie6, sometimes i click the button i see the progrss bar of the browser but it does not occur anything, sometim

  • How to make some junk code not deleted by the optimizer?

    I'm doing a security application. I wrote this function to check for some license, that will throw an exception when a license is not present: void CheckLicense(); Then I found this can be easily hacked, since the hacker can simply replace every CALL

  • Hi I cannot make the accessibility zoom option work. What are the commands on a non Mac keyboard?

    Hi I cannot make the accessibility zoom option work. What are the commands on a non Mac keyboard?

  • CP5 Quiz Navigation

    How can you keep the student from advancing if they haven't answered the question? I have a check box in the incomplete option and that message isn't showing up when they try to arrow through the quiz.