Calling an action method in a controller from an iframe

I am not able to call an action command in the page flow controller from an iframe.
Currently, it just skips it. Is there a way to do it or it is a bug. I am using
portal 8.1.
Thanks, SB.

I think JButton.doClick() will do what you want

Similar Messages

  • Calling a particular Method of all subclass from a super class

    hi
    I have a class 'A' which is a super class for 'B' ,'C' , 'D'
    my main method is in the class Main and while on the run i am calling methods of B,C,D form this main class.
    but as the first step of execution i need to call a init method which has been defined in all the sub-classes. and there can be any no of sub-classes and all will have the init method and i have to call the init method for all classes. is this possible to do that in runtime. ie i wil not be knowing the names of sub-classes.
    thanks
    zeta

    Sorry if i had mislead you all.
    I am not instantiating from my super class.
    as mjparme i wanted one controller class to do the
    init method calls
    so i got it working from the link you gave.
    URL url = Launcher.class.getResource(name);
    File directory = new File(url.getFile());
    This way i can get all the classes in that
    in that package
    and from reflection i can get whether it is
    her it is a sub class of the particular super class
    and i can call the init methods by making the init
    methods static
    thanks for the help
    zetaThis is a rather fragile solution.
    If the problem is one of knowing which subclasses exist, I would suggest specifying them explicitly via configuration (system property or properties file or whatever).
    One thing that's not entirely clear to me: Is the init going to be called once for each subclass, or once for each instance of each subclass? It sounds to me like it's once per class, but I want to make sure.

  • Multiple calls of action method after exception during update model phase

    using: Sun RI 1.1_01
    Situation: have a view with
    * a field that has a value binding to a setter that can throw an exception, with a message tag
    * a command button bound to an action method
    Enter a value in the field that will trigger the exception. You will get the same page again, with a message from the exception; the action method is not called.
    Now change the value to something that will be accepted by the setter. The action method will now be called twice.
    I presume this is a bug?
    On code inspection of the RI 1.1_01, it turns out that an EvaluationException is thrown, which is translated by the ValueBindingImpl#setValue method into another EvaluationException, after posting the exception message as JSF message. This method is run inside UIInput updateModel, which essentially sets valid to false. This will result in interrupting the normal phase cycle, and makes us jump to render response, as expected.
    Now all this happens during the update model phase, and earlier an event for the application phase was posted, to trigger execution of the action method. Since we did not reach the application phase, this event is never executed, but also it is never removed from the event List structure.
    It is lurking inside the UIViewRoot, and is still there in the next request/response cycle. If in this next cycle, there is no more interruption, we will eventually reach the application phase, but there we now have 2 events waiting to be executed. As a result, the action method will be called twice.
    If you trigger the exception in the setter more often, all action events will be saved for the next cycles. If you trigger the exception n times, the action method will be executed n+1 times the first time there is a submit with no exception.
    This can not be intended behavior, can it?

    BTW: MyFaces does this in UIViewRoot:
        public void processUpdates(FacesContext context) {
            if (context == null) throw new NullPointerException("context");
            super.processUpdates(context);
            _broadcastForPhase(PhaseId.UPDATE_MODEL_VALUES);
            if (context.getRenderResponse() || context.getResponseComplete())
                clearEvents();
        }Events are cleared. Guess we are switching, then.

  • Call method of interface controller from component controller

    hi,
    I have created one method in the interface controller of a component. Now i have this method along with attributes to the component controller. Now from the component controller i want to call the method of the interface controller. How do i do it???

    Hi,
    You dont need to call the method from the interface controller when you are in the same component.
    You can call the method which is in the component controller.
    Interface controller is used to expose some methods to a different component.
    Ex Comp a want to expose a method which will be used by comp b then  you need the interface controller in comp a.
    Comp b will use comp a as used component
    then it will invoke the methods.
    Regards
    Ayyapparaj

  • File Not found error when calling Form Post Method to a JSP from JSP Portlet

    I have built a set of JSP forms using post method to call other JSPs. Normally, the code looks like
    <form name="MyForm" action="MyJsp.jsp" method="post">
    I migrated the calling form containing this code to a portlet, but not the MyJsp.jsp. When I submit the form, I get a file not found in Jserv.log
    Exception:javax.servlet.ServletException: java.io.FileNotFoundException: D:\servlet\RegisterCompany.jsp (The system cannot find the file specified)
    [14/06/2001 13:59:59:679 PDT] JspServlet: unable to dispatch to requested page: Exception:javax.servlet.ServletException: java.io.FileNotFoundException: d:\oracle\isuites\apache\apache\MyJsp.jsp (The system cannot find the file specified)
    I notice that launching the calling jsp from a portlet, my opriginal context that uses ../Apache/Apache/htdocs is not being searched for the JSp. Why is this? Moreover, I try to set up an Alias in httpd.conf file to the this director and use it with the jsp in the action tag, but still get an error that my jsp servlets/Myjsp can't be found. Why is it insiting on looking at servlets context instead of htdocs.
    I have none of these issues outside of Portal30 using IAS.
    regard

    Initially, I couldn't do this unless I moved tghe jsp's up to the root directory of IAS, i.e ../Apache/Apache. Nomrally, htdocs is my doc directory for IAS. I could not do http:\\myUrl\htdocs\myJsp. If I tgried this, I got an error in Apache error logg that said can't find file ..\htdocs\htdocs\MyJsp.jsp.
    If I just tried the the URL http:\\myUrl\MyJsp.jsp with Jsp file in htdocs, I would get an error in the Jserve log that file d:\oracle\isuites\apache\apache\MyJsp.jsp could not be found. Once I moved the file MyJsp to Apache/Apache directory, it could be found using http:\\myUrl\MyJsp.jsp. Later, I delted these files and kept the ones in htdocs and they continued to work.
    I'm confused why launching pages through portal isn't consistant with Apache Standards. Where is the documentation that tells me how to configure context and aliases for pages launched from portal pages?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Sue Vickers ([email protected]):
    David,
    Passing information using Portal is different than just using Apache/Jserv. Does it work in portal if you use the absolute path?
    <form name="MyForm" action="http://host.domain/MyJSP.jsp" method="post">
    Portal will not be on the same relative path as your Apache, so you may need to adjust your action somehow.
    Thanks,
    Sue<HR></BLOCKQUOTE>
    null

  • Is it possible to call a custom method in App Module from a backing bean?

    I would like to know if a custom method in App Module can be called from inside a backing bean.
    I am not sure if it is logically right to call, from a backing bean, a custom method in App Module. But would like to know if that makes sense or if it is possible.

    Hi..
    Yes it is possible.You have to add that method for client interface of AppModule.Now you can see that method in Data Controls(Refresh the data control). To call this method using bean it should add as method action to bindings(Click Bindings>+>methodAction>and Create action binding).
    Now you can call this method in bean class.
    Check following example use this concept to execute view criteria
    http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html

  • How to call a specific method in a servlet from another servlet

    Hi peeps, this post is kinda linked to my other thread but more direct !!
    I need to call a method from another servlet and retrieve info/objects from that method and manipulate them in the originating servlet .... how can I do it ?
    Assume the originating servlet is called Control and the servlet/method I want to access is DAO/login.
    I can create an object of the DAO class, say newDAO, and access the login method by newDAO.login(username, password). Then how do I get the returned info from the DAO ??
    Can I use the RequestDispatcher to INCLUDE the call to the DAO class method "login" ???
    Cheers
    Kevin

    Thanks for the reply.
    So if I have a method in my DAO class called login() and I want to call it from my control servlet, what would the syntax be ?
    getrequestdispatcher.include(newDAO.login())
    where newDAO is an instance of the class DAO, would that be correct ?? I'd simply pass the request object as a parameter in the login method and to retrieve the results of login() the requestdispatcher.include method will return whatever I set as an attribute to the request object, do I have that right ?!!!!
    Kevin

  • 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

  • How to call a static method of a class from another class?

    Hello,
    I have two classes in a package. The first one
    package my package;
    public class class1
    protected static ImageIcon createIcon(String path)
    The second one
    package my package;
    public class class2
    private ImageIcon image1;
    image1 = class1.createIcon("/mypath");
    This does not work since class2 cannot load the appropriate image. Where do I have to define the ImageIcon variables in class one or two and do they have to be static variables?
    Thanks in advance
    Christos

    If the two classes are in the same package, that will work, in fact. A trivial example:
    package foo;
    public class Foo1 {
         protected static String getString() {
              return "World";
    // Note: Member of the same package
    package foo;
    public class Foo2 {
         public static void main(String[] argv) {
              System.out.println("Hello "+ foo.Foo1.getString());
    }However, if they are in different packages that won't work - the protected keyword guarantees that only classes derived from the class with the protected method can access it: Therefore this will not work:
    package foo;
    public class Foo1 {
         protected static String getString() {
              return "World";
    package foo.bar;
    public class Foo2{
         public static void main(String[] argv) {
              System.out.println("Hello "+ foo.Foo1.getString());
    }But this will:
    package foo;
    public class Foo1 {
         protected static String getString() {
              return "World";
    package foo.bar;
    public class Foo2 extends foo.Foo1 {
         public static void main(String[] argv) {
              System.out.println("Hello "+ foo.Foo1.getString());
    }I think you should read up a bit more about packages and inheritance, because you're going to have a lot of trouble without a good understanding of both. Try simple examples first, like the above, and if you hit problems try to produce a simple test case to help you understand the problem rather than trying to debug your whole application.
    Dave.

  • Calling methods in controller from View.

    Hi Experts,
    Can any one let me know or point to the document which explains how to call a userdefined method in component controller from view.
    Thanks,
    James

    You have to define a "controller usage" using the controller editor. Then the code generator will create an accessor "wdGet<ControllerName>Controller()" to the component controller which can be used to call its methods.
    See also this document:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ba2c45-0518-2a10-73be-9b785e10aef1
    Armin

  • Calling controller action from an iframe

    I am not able to call an action command in the page flow controller from an iframe.
    Currently, it just skips it. Is there a way to do it or it is a bug.
    I am using portal 8.1.
    Thanks,
    SB.

    Hi Uma,
    Please follow the below steps :
    1. Create a viewuielement container at the first view and place it where you want.
    2. Then create one attribute with the type of string and bind this attribute to youe viewuielement property "Visible".
    3. Then double click the window -> go to the first view -> Here your viewuielemnt name will displayed. Just right click it -> embed view -> select your second view.
    4. Then go to your method of the link to action and write the following code.
    data:
          Elem_Context                        type ref to If_Wd_Context_Element,
          Stru_Context                        type If_Firstview=>Element_Context ,
          Item_VISIBLE                        like Stru_Context-VISIBLE.
    *   get element via lead selection
        Elem_Context = wd_Context->get_Element(  ).
    *   get single attribute
        Elem_Context->get_Attribute(
          exporting
            Name =  `VISIBLE`
          importing
            Value = Item_Visible ).
    IF Item_VISIBLE IS INITIAL.
      Item_VISIBLE = 'X'.
      ENDIF.
    Elem_Context->Set_Attribute(
          exporting
            Name =  `VISIBLE`
            Value = Item_Visible ).
    So when ever you click the link to action it will shows your second view elements in your first view.
    Thanks.

  • JSF 10.1.3EA: af:menuTabs and menuitems calling action methods

    I am trying to use af:menuTabs as spelled out in the demo using a menu model. What I would like to do is to get one of the menu items (when clicked) to frist call an action method in one of my backing beans. I belived I could set the outcome for the menu item as follows:
    <managed-property>
    <property-name>outcome</property-name>
    <value>#{recent.refreshAction}</value>
    </managed-property>
    But when I try this I get the following:
    javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: The scope of the referenced object: '#{recent.refreshAction}' is shorter than the referring object     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
    The menuTab is used as follows:
    <af:menuTabs var="menuItem" value="#{menuModel.model}">
    <f:facet name="nodeStamp">
    <af:commandMenuItem text="#{menuItem.label}"
    action="#{menuItem.getOutcome}" immediate="true"
    rendered="#{menuItem.type=='default'}"/>
    </f:facet>
    </af:menuTabs>
    <managed-bean>
    <managed-bean-name>menuItem_recent</managed-bean-name>
    <managed-bean-class>com.shiny.menu.MenuItem</managed-bean-class>
    <managed-bean-scope>none</managed-bean-scope>
    <managed-property>
    <property-name>label</property-name>
    <value>Recent</value>
    </managed-property>
    <managed-property>
    <property-name>viewId</property-name>
    <value>/recent.jsp</value>
    </managed-property>
    <managed-property>
    <property-name>outcome</property-name>
    <value>#{recent.refreshAction}</value>
    </managed-property>
    </managed-bean>
    <navigation-case>
    <from-action>#{recent.refreshAction}</from-action>
    <from-outcome>success</from-outcome>
    <to-view-id>/recent.jspx</to-view-id>
    </navigation-case>
    But if I use the following navigation case (and set the outcome of the menu item accordingly) all is ok but not what I want as I need some objects setup first.
    <navigation-case>
    <from-outcome>guide.alc_rec</from-outcome>
    <to-view-id>/recent.jspx</to-view-id>
    <redirect/>
    </navigation-case>

    I have just got back to this as busy on other things.
    Has anyone got this to work? I still get the exception:
    javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't get value from value binding expression: '#{products_backing.loadNew}'.     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)     at oracle.adf.view.faces.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:55)     at oracle.adf.view.faces.component.UIXComponentBase.getProperty(UIXComponentBase.java:1013)     at oracle.adf.view.faces.component.UIXMenu.getValue(UIXMenu.java:99)     at oracle.adf.view.faces.component.UIXCollection._flushCachedModel(UIXCollection.java:889)     at oracle.adf.view.faces.component.UIXCollection.encodeBegin(UIXCollection.java:393)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:297)

  • JSF seems to not call a simple action method

    I have a situation where it seems JSF is not performing one of it's basic functions--calling an action method in a backing bean based on a simple JSF EL expression.
    Here's the relevant part of my JSP (the h:subview tags are there because another JSP includes this one):
    -- my.jsp: ------------------------------------------------------------
    <%@ page language="java" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:subview id="work-area">
    <h:form id="peers-work">
         <h:commandButton id="edit" value="Edit"     action="#{peerBean.edit}" styleClass="actionButton" />
    </h:form>
    </f:subview>
    --------------------------------------------------------------My faces-config.xml defines the "peerBean" as follows:
    -- faces-config.xml: ------------------------------------------------------------
    <faces-config>
      <managed-bean>
        <description>Session bean for performing Peer operations.</description>
        <managed-bean-name>peerBean</managed-bean-name>
        <managed-bean-class>com.myApp.PeerBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
      <navigation-rule>
        <from-view-id>/my.jsp</from-view-id>
        <navigation-case>
          <from-outcome>success</from-outcome>
          <to-view-id>/editPeer.jsp</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>fail</from-outcome>
            <to-view-id>/error.jsp</to-view-id>
          </navigation-case>
        </navigation-rule>
    </faces-config>
    --------------------------------------------------------------And here's the action method in PeerBean:
    -- PeerBean.java ----------------------------------------
    public class PeerBean extends BaseBean implements Serializable {
        public PeerBean() {
        public String edit() {
            logger.debug("in edit().");
            Peer peer = this.getPeer(this.getId() );
            String outcome = "success"; // optimism!
            if (peer == null) {
                outcome = "fail";
            } else {
                this.setId(peer.getId() );
                this.setName(peer.getName() );
                this.setDescription(peer.getDescription() );
            return outcome;
    --------------------------------------------------------------It compiles and runs fine, but when I click on the "Edit" button in my.jsp, the page submits but never enters the "edit" method (based on the fact that the logger call in the method does not write anything to the log.), and it simply re-displays my.jsp (even though it should go to the "success" or "fail" page, according to the navigation rules). I see a bunch of debug messages in the logs from the code that loads the page, but no indication that the edit method is touched. There are no stack traces or errors reported in any of the logs that Tomcat creates for this application.
    Elsewhere in my application, I am able to use commandButton elements to trigger backing bean actions just like I'm trying to do above, and in other places it works fine. I don't know why the above case does not work.
    Also, is there a way to put JSF in a debug mode that shows info such as the navigation outcome processing, JSF EL processing, etc.?
    Any help would be appreciated!
    Thanks,
    Scott

    I see. Thanks for the response.
    I already have message and messages tag in the JSF, but no error message is displayed. Also, there is no error message in the tomcat log.
    I actually found your tutorial ( http://balusc.blogspot.com/2008/01/jsf-tutorial-with-eclipse-and-tomcat.html ) yesterday, so when I saw your response, your name looked familiar but I did not immediately remember why. I Will be going through the tutorial now.
    My application goes as far as the INVOKE APPLICATION phase, but never enters/executes the action method, can anyone please suggest any reason that could be the cause.
    Please see code below:
    JSF - status.jsp
    ============
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <f:loadBundle basename="com.fujimitsu.moneytransfer.resources.UIResources" var="bundle"/>
    <html>
        <f:view>
        <head>
            <title><h:outputText value="#{bundle.registerStatus}"/> </title>
             <link href="../css/stylesheet.css" rel="stylesheet" type="text/css"/>
        </head>
            <body>
                <f:verbatim><p>JavaServer Faces Page</p>
                <p>
                     </p><table border="0" cellpadding="0" cellspacing="0" width="800">
                          <tr>
                               <td>
                                    <h:graphicImage url="/images/resources.jpg" alt="#{bundle.img_alt_info}"/>
                               </td>
                          </tr>
                          <tr>
                               <td>
                                    <h:messages globalOnly="false" styleClass="validationMessage" layout="table"/>
                                    <p>
                                         <h:form id="statusManagedBeanForm">
                                              <h:panelGrid columns="3">
                                                   <h:outputText value="#{bundle['statusField.status']}"/>
                                                   <h:inputText id="status" value="#{statusManagedBean.status}"/>
                                                   <h:message for="status" styleClass="validationMessage"/>
                                                   <h:outputText value="#{bundle['statusDescField.statusDesc']}"/>
                                                   <h:inputText id="statusDesc" value="#{statusManagedBean.statusDesc}"/>
                                                   <h:message for="statusDesc" styleClass="validationMessage"/>
                                                   <h:outputText value="Created By:"/>
                                                   <h:inputText id="createdBy" binding="#{statusManagedBean.createdBy}"/>
                                                   <h:message for="createdBy" styleClass="validationMessage"/>
                                              </h:panelGrid>
                                              <h:commandButton action="#{statusManagedBean.createStatusAction}" type="submit" value="Submit"/>
                                         </h:form>
                                    </p>
                               </td>
                          </tr>
                     </table>
                </f:verbatim>
            </body>
        </f:view>
    </html>
    HTML code of status.jsp before the submit button is clicked
    ===========================================
    <form id="statusManagedBeanForm" name="statusManagedBeanForm" method="post" action="/moneytransferFaces/pages/status.jsf" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="statusManagedBeanForm" value="statusManagedBeanForm" />
    <table>
    <tbody>
    <tr>
    <td>Status</td>
    <td><input id="statusManagedBeanForm:status" type="text" name="statusManagedBeanForm:status" /></td>
    <td></td>
    </tr>
    <tr>
    <td>Status Desc</td>
    <td><input id="statusManagedBeanForm:statusDesc" type="text" name="statusManagedBeanForm:statusDesc" /></td>
    <td></td>
    </tr>
    <tr>
    <td>Created By:</td>
    <td><input id="statusManagedBeanForm:createdBy" type="text" name="statusManagedBeanForm:createdBy" /></td>
    <td></td>
    </tr>
    </tbody>
    </table>
    <input type="submit" name="statusManagedBeanForm:j_id_jsp_948632549_16" value="Submit" /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id4:j_id5" />
    </form>
    HTML code of status.jsp after the submit button is clicked
    ==========================================   
    Please note:   action="/moneytransferFaces/pages/status.jsf"   ,  is this what it is supposed to be?
    <form id="statusManagedBeanForm" name="statusManagedBeanForm" method="post" action="/moneytransferFaces/pages/status.jsf" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="statusManagedBeanForm" value="statusManagedBeanForm" />
    <table>
    <tbody>
    <tr>
    <td>Status</td>
    <td><input id="statusManagedBeanForm:status" type="text" name="statusManagedBeanForm:status" /></td>
    <td></td>
    </tr>
    <tr>
    <td>Status Desc</td>
    <td><input id="statusManagedBeanForm:statusDesc" type="text" name="statusManagedBeanForm:statusDesc" /></td>
    <td></td>
    </tr>
    <tr>
    <td>Created By:</td>
    <td><input id="statusManagedBeanForm:createdBy" type="text" name="statusManagedBeanForm:createdBy" /></td>
    <td></td>
    </tr>
    </tbody>
    </table>
    <input type="submit" name="statusManagedBeanForm:j_id_jsp_948632549_16" value="Submit" /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id1:j_id3" />
    </form>
    STATUS BEAN
    ===========
    package com.fujimitsu.moneytransfer.beans;
    import javax.faces.component.html.HtmlInputText;
    public class Status {
         private String status;
         private String statusDesc;
         private HtmlInputText createdBy;
         public Status() {
         public HtmlInputText getCreatedBy() {
              return createdBy;
         public void setCreatedBy(HtmlInputText createdBy) {
              this.createdBy = createdBy;
         public String getStatus() {
              return status;
         public void setStatus(String status) {
              this.status = status;
         public String getStatusDesc() {
              return statusDesc;
         public void setStatusDesc(String statusDesc) {
              this.statusDesc = statusDesc;
         public String createStatusAction() {
              this.setStatusDesc("testing createStatusAction()...");
              return "success";
    FACES CONFIG
    ============
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
         Copyright 2003 Sun Microsystems, Inc. All rights reserved.
         SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    -->
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
         <application>
              <locale-config>
                   <default-locale>en</default-locale>
              </locale-config>
         </application>
         <managed-bean>
              <managed-bean-name>statusManagedBean</managed-bean-name>
              <managed-bean-class>
                   com.fujimitsu.moneytransfer.beans.Status
              </managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <navigation-rule>
              <from-view-id>/pages/status.jsf</from-view-id>
              <navigation-case>
                   <from-outcome>success</from-outcome>
                   <to-view-id>/pages/home.jsf</to-view-id>
              </navigation-case>
         </navigation-rule>
         <navigation-rule>
              <from-view-id>/pages/status.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>success</from-outcome>
                   <to-view-id>/pages/home.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
         <lifecycle>
              <phase-listener>
                   com.fujimitsu.moneytransfer.utils.PrintTreePhaseListener
              </phase-listener>
         </lifecycle>
    </faces-config>
    web.xml
    ======
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC
      "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
         <!--A short name that is intended to be displayed by tools.-->
         <display-name>The simplest JSF application.</display-name>
         <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>/faces/*</url-pattern>
         </servlet-mapping>
        <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.faces</url-pattern>
        </servlet-mapping>
    </web-app>
    DIRECTORY STRUCTURE
    ====================
    appName
                pages
                WEB-INF
                .........Thanks.

  • How to call action method on commandLink/commandButton

    Faces 1.1 from WebLogic 9.2.2, RichFaces 3.1.3.
    I'm still getting up to speed with JSF. I'm experimenting with a datatable with "Add" buttons on each row, to give me a new row after the current row (ignoring the problem with inserting at top for now).
    So, I'll need an action method in my backing bean that can tell what row number to insert after in the backing data structure.
    I've tried a couple different approaches, but I don't understand what's going wrong with them.
    Presently, I've defined this column in my table:
    <rich:column>
      <f:facet name="header">
        <h:outputText value="Add"/>
      </f:facet>
      <a4j:commandLink action="#{projectManager.addProject}"
                                  reRender="projectsTable" value="Add">
        <f:param name="rowNum" value="#{rowNum}"/>
      </a4j:commandLink>
    </rich:column>Unfortunately, what happens when I click the Add link is ... nothing. I see tons of debug go by on the console, but it doesn't attempt to call my action method (I have a breakpoint set on it in my debugger, so I'm pretty sure it's not getting there (other breakpoints are hit)).
    Any suggestions?

    I am not familiar with JBoss Richfaces and Ajax4jsf. But I can tell you that in Sun JSF you can bind the datatable to a HtmlDataTable property in the bean and then use HtmlDataTable#getRowData() in the action method to obtain the row object where the commandlink was clicked. You can find more detailed background information about this at http://balusc.blogspot.com/2006/06/using-datatables.html
    If Richfaces doesn't seem to provide this functionality, then consider to ask it at their own forum at jboss.org. You will have more chance on a well suited answer over there. You see, you're here at a Sun JSF forum.

  • Opening a new window calls action methods again.

    Hi all,
    I have a form that has a button to submit the information. For certain scenarios that submission can take over 30 seconds. So while that submission is taking place I hit <ctrl>-N on the browser to open a new window. This new window is calling the action methods associated with the submit button of the form.
    My guess is that this second window is sharing the session information of the other window and therefore is sending the request flow through the state of the other view.
    What can I do to handle this case?
    Thanks.
    Jason

    If you want to open a new window besides your original window, then you have to do it with javascript. Put a code similar like this in your onClik property of your hyperlink:
    window.open("faces/Page1.jsp", "","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=450");
    return false;When you click the hyperlink, it will open a second window of Page1.jsp. You can use if-else construct in javascript to choose which page you want to show.
    If you want to pass a value to the second window, you can use query string like this:
    window.open("faces/Page1.jsp?par1=value1", "","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=450");
    return false;Passing a field value in table component to second window:
    window.open("faces/Page1.jsp?par1=#{currentRow.value['FIELDNAME']}", "","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=450");
    return false;To retrieve the parameter in the second page (in this case Page1.jsp), put this in init():
    javax.servlet.http.HttpServletRequest req = (javax.servlet.http.HttpServletRequest) getExternalContext().getRequest();
            String par1 = req.getParameter("par1");After getting the parameter value, you can do the rest as your normal page, ie populating the page the way you like.
    AFAIK, the only way to open a new window is through javascript only. CMIIW.
    Hope that helps.

Maybe you are looking for

  • I chatted online yesterday with Adobe and I have domain problem

    I bought Photoshop 10 and have not been able to login yesterday I chatted online with Adobe and because i used an e-mail address when I upgraded to 10, when I left the company that e-mail address was dead it now causes a problem Adobe tells me becaus

  • ScrollPane vertical scroll bar positioning

    I have a ScrollPane that holds a number of number of sprites. The sprites are like rows and I would like them to fill the width of the ScrollPane. My problem is that if there are not enough sprites to fill the vertical space of the ScrollPane, then n

  • Pricing Procedures of Excise

    Dear Experts, 1) i wanna configure pricing proceduer , like jinfact.... i am checking in IDES for testing but i am anable to view in Pricing procedure of DEPOT JEXPOR JFACT JINDEP JINEXP... i cannot  view these pri pros in IDES.... 2)while creating c

  • Premiere transitions not working

    Hello, I imported a Premier project file into the AE file. Everything works great but I don't see transition is working. How can I enable those transition effects? Thank you.

  • Heard this before

    Ok have an old emac with imovie 2 awesome Get this new computer and WHAT THE HEAK IS THIS IMOVIE 08 It does not work and it is the most confusing thing ever can I get back the old format?? There is not even any effects?? P.s not impressed with this m