Difference between action and actionListener

I would like to tell me which is the difference between an action and an actionListener in the following example:
<h:form style="text-align:center">
<h:commandButton image="mountrushmore.jpg"
actionListener="#{rushmore.listen}"
action="#{rushmore.act}"/>     
</h:form>Which method of the rushmore bean is invoked first the listen() or the act()? Based on the JSF lifecycle the action events are invoked in the Invoke Application Phase correct?So first we have the process of validation and then the action is invoked right?And then the listener?
Thanks in advance.

Action = Executed in the invoke application phase. Runs a method in a bean that returns a String object. The String is used by the navigation system to determine which page to render next. The rules for this are set up in the faces-config.xml file, in the navigation-rule sections.
ActionListener = Executed in the invoke application phase. Is triggered when the action event occurs for the component the listener is attached too. This listener can perform miscellaneous actions required when the button is clicked, but does not return a String that affects the navigation.
What order do they get called? Try this out!
http://www.jsftutorials.net/faces-config/phaseTracker.html
It'll help you understand the JSF lifecycle. Which is VERY important, especially when those weird errors start occurring (or JSF seems to be ignoring your commands).
CowKing

Similar Messages

  • What is the difference between action and workflow? How do I decide that I need an action in a transaction and not a workflow and vice versa?

    Dear Experts,
    I have few doubts and request your expert inputs to clarify my doubts.
    What is the difference between action and workflow? How do I decide that I need an action in a transaction and not a workflow and vice versa?
    Your earliest response is highly appreciated.
    Thanks,
    SMTP

    Hi SMTP,
    First of all, as I mentioned action is nothing but an executable work item which is designed in the workflow itself. In other words, Workflow is like your OOPS class. At run time, workflow instances are created just like objects of classes. Now, the steps designed in the workflow are called TASKS and the instances of tasks are called WORKITEMS. Now, the work items where any user action is required are called executable work items. ANd the work items where no user action is required (for example, sending an email in background) are called non-executable work items.
    Whether to go with development of workflow or not depends upon your business scenario. If your requirement is only to send an email and you find any BAdi or exit where in you can write your logic then there is no need of creating a workflow. If there is a defined business process with defined users and time lines, then you can go with the development of workflows.
    Rest, the below link will help you in understanding basic concepts of workflow :
    Why use SAP Workflow? | Insight Consulting Partners
    Regards,
    Richa

  • Difference between action and event

    Hi
    while creating an action, we will find action & event handler.  What is the difference between Action and event.  If anyone provide with examples, it will be helpful for me.
    regards,
    vijaya.

    HI,
    In simple words we can put it as..IF you need any user interaction.. i.e. if your logic is based upon how user interact with your application then use Action..
    e.g. Buttons, dropdown UI elements...etc..
    Means actions are act between user and your application.
    But your application not only communicate with user.But also communicate with server too.
    so to communicate with server you need and Event
    Note. In Web Dynpro, events are called actions if they are sent from the client to the server.

  • Differences between Monitor and Decrypt actions in Decryption Policies

    Hi Everybody,
    Currently I'm working in my first WSA (S170) implementation and some questions has popped up while I was configuring the Decryption policies. The main question here is:
    What are the differences between "monitor" and "decrypt" in the URL Filtering options. As I understand the "decrypt" action allows the WSA to decrypt the packet and treats it like a plain HTTP packet applying the Access Policies, malware inspection and so on. Then I do not really know what the Monitor option does, I'm assuming that it does not decrypt the packet and only checks the destination URL and to allow or not the connection.
    Thanks in advance for your collaboration.
    Jose M. Cortes H.

    If you set it for Decrypt, it always decrypts stuff in that category.
    If you set it to monitor, then other criteria in the policy are used for whether to decrypt or not, such as Web Reputation...
    Here's the flow, which I pulled from the online help:
    https://wsaip:port/help/wsa_help/index.html?Decryption_policies11.html#wp1208329

  • Difference between implements and extends

    Hi all,
    what is the difference between implements and extends. i am sorry to ask this silly question, but i am new to JAVA.
    Thanks
    Balaji

    when you extend a class, your class that you are coding inherits every method and field from the extending class. For example:
    public class CustomFrame extends JFrame {
    //Your class's methods will be in here, but so will all of JFrame's methods.
    }You can override (most) methods from extended classes if you want them to do different things than they normally do. The most commonly overriden methods when using swing are stuff like paint(Graphics g). It needs to be overriden to repaint all of the components.
    When you imlpement something, you have to specify an interface. Interfaces have methods in them with no code. If you implement an interface, all methods in in must be defined. If not, the code will not compile. Some interfaces like ActionListener extend other classes to perform stuff. The actionPerformed(ActionEvent e) method will perform an action when a button is pressed, etc.

  • What is difference between modify and update i am using

    hi
    what is difference between mofify and update
    my requiremen is to have three condition checkec while mofifying or updating from a internal table
    the three fields are
    cus no
    status
    date these all are primary key in the database table
    so which sould i use modify or update
    there might be entry already existing in database table or new entry to be created if already existin it should check on the primary keys and updatat if not it should add a record
    pls suggest whihc to use and how to implement the check on teh threee primary key
    like if modify ztable from table it_test
    now where condition ? can be used or not with modify? and if yes how
    if not should i use update will update create a new entry if no entry is there and please give syntex
    regards
    Arora

    Hi Nishant Arora,
    Modify: It works in performing two actions.
    They are: Insert + Update.
    For Example If a record that is exited in database, so you are modifying that record, it updates that particular record.
    Similarly, If the is not existed in the database, you are modifying it, it inserts a new record.
    Update: Update means just it updates the status, I mean it only updates the record. It doesn't inserts any new record if that particular record is not present in the database.
    These are the cases you need to write these statements.
    Syntaxes: :
    Go through this links please.,
    http://help.sap.com/saphelp_nw04/helpdata/en/e7/968aa8b2384dd9835f91e7f8470064/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm
    Reward points if useful
    Cheers,
    Swamy Kunche
    Edited by: Swamy Kunche on Jun 11, 2008 2:41 PM

  • What's the difference between Routing and Service Callout in ALSB?

    I am puzzled by that.
    what's the difference between them.
    Or what's the situation should use Routing, and that of service callout?

    There is little difference between routing and service callout.
    Routing is symbolizes the transition of request thread to a response thread starts. (in OSB every invocation of proxy is undertaken by different request and response threads ). So by this definition, there can be only one route node in a pipeline.
    Service call out is also used for similar actions as route node , but in pipeline. So service callout can be either in request pipeline (request thread) or in response pipeline (response thread ) . So in a proxy you can have multiple ServiceCallouts but only one route node.
    There are some other slight differences.
    Manoj

  • Difference between BAPI and IDocs

    hello all
    what is difference between BAPI and IDocs

    Hi,
    BAPI
    One of the big plusses for BAPIs is that the interface and function are not supposed to change.  This is a big plus when you do upgrades or hot packs because the transaction can change (format, required inputs etc) which means you then need to update the call transaction.
    Some of the BAPIs are better documented and easier to use than others. You usually need to perform the BAPI that actually does the COMMIT after you call your BAPI.
    The Program coding for calling a BAPI is usually cleaner than setting up the screen flow etc for the Call Transaction.
    You don't need to worry about special data circumstances interrupting the normal data flow of the screens and causing errors because of that.
    BAPIs probably have better performance since they don't do the screen flow processing.
    In general if the BAPI exists for the transaction you want to perform and you can figure out how to use it the BAPI is probably the best way to go.
    BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.
    IDOC
    IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed.   Therefore an IDoc data exchange is always an
    asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
    While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
    The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data.   The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order.
    Regards,
    Bhaskar

  • Differences between MD01 and MD02.

    Dear SAP Experts,
    Please tell me the various differences between MD01 and MD02.
    In which specific cases, MD01 should be used??
    Thanks and regards,
    Kaushik Basu.

    Hi,
    1. Md01 is the MRP Run for  plant by giving planning scope.
    2. Md02 is the mrp run for single Material from plant .
    Also refer following T code for your information
    Menu Nodes
    Transaction
    Activity
    Master Data
    MD25
    Create planning calendar
      MD26
    Change planning calendar
      MD27
    Display planning calendar
      MDSA
    Display BOM explosion number
      MDSP
    Edit BOM explosion number
      MEQ1
    Maintain quota file
      OPPP
    Explode BOM by date
      MDUS
    Display project assignment
      MDUP
    Process project assignment
      MDL1
    Create production lot
      MDL2
    Change production lot
      MDL3
    Display production lot
    Planning
    MD20
    Create planning file entry
      MD21
    Display planning file entry
      MDAB
    Set up planning file entry in background
      MDRE
    Check planning file entry
      MD01
    Total planning online
      MDBT
    Total planning in background
      MD03
    Single-item, single-level planning
      MD02
    Single-item, multi-level planning
      MD43
    Interactive single-item planning
      MD50
    Multi-level, make-to-order planning
      MD51
    Multi-level project planning
      MF52
    Display planning table
      MF50
    Change planning table
      MF57
    Planning table by MRP lists
      MF51
    Planning table by production list
    Evaluations
    MD04
    Stock/requirements list
      MD07
    Collective access of stock/requirements lists
      MD05
    MRP list
      MD06
    Collective access of MRP lists
      MDLD
    Print MRP list
      MD45
    Planning result
      MD46
    Collective access of planning result
      MD44
    Planning situation for a material
      MD47
    Planning situation for a product group
      MD48
    Cross-plant planning situation
      MD4C
    Order report
      MD09
    Pegged requirements
      CO46
    Order progress
    Planned Order
    MD11
    Create planned order
      MD12
    Change planned order
      MD13
    Individual access of planned order
      MD16
    Collective access of planned orders
      MD14
    Individual conversion of planned order into purchase requisition
      MD15
    Collective conversion of planned orders into purchase requisitions
      MDUM
    Convert planned order into purchase requisition in background
      CO40
    Convert individual planned order into production order
      CO41
    Collective conversion of planned orders into production orders
      CO48
    Partial conversion of planned order into production order
      COR7
    Individual conversion of planned order into process order
      COR7_PC
    Collective conversion of planned orders into process orders
      COR8
    Partial conversion of planned order into process order
      MDVP
    Collective availability check
      MDAC
    Execute action for planned order
    Hope it clear to u.
    Edited by: Atul Zod on Nov 21, 2008 6:59 AM

  • Differences Between Object And System Privileges

    Hi,
    Whats the difference between object and system privileges in oracle?
    Cheers
    Paul

    System Privileges
    A system privilege is the right to perform a particular action, or to perform an action on any schema objects of a particular type. For example, the privileges to create tablespaces and to delete the rows of any table in a database are system privileges.
    Schema Object Privileges
    A schema object privilege is a privilege or right to perform a particular action on a specific schema object:
    For example, the privilege to delete rows from the departments table is an object privilege.
    Some schema objects, such as clusters, indexes, triggers, and database links, do not have associated object privileges. Their use is controlled with system privileges. For example, to alter a cluster, a user must own the cluster or have the ALTER ANY CLUSTER system privilege.
    A schema object and its synonym are equivalent with respect to privileges. That is, the object privileges granted for a table, view, sequence, procedure, function, or package apply whether referencing the base object by name or using a synonym.
    Granting object privileges on a table, view, sequence, procedure, function, or package to a synonym for the object has the same effect as if no synonym were used. When a synonym is dropped, all grants for the underlying schema object remain in effect, even if the privileges were granted by specifying the dropped synonym.

  • Difference between P0000 and PA0000?

    Hello Everyone,
    I'm a fresher(chunnu munnu) in this SAP-ABAP world.
    I have started learing ABAP recently.
    I have a serious doubt. I'll be obliged if anyone spend some time to solve my doubt and help me to improve further.
    <u>Question :</u>
    What's the difference between P0000 and PA0000?
    What's the difference between table with an Header and without and Header?
    ( as in VBLK and VBRK and all..... and what's the fun in using a table with an header..) With Internal Table.
    Kindly explain with example.
    Thanks!
    Regards,
    Tejas.

    Hi
    P0000  HR Master Record: Infotype 0000 (Actions)
    PA0001 HR Master Record: Infotype 0001 (Org. Assignment)
    for second question
    http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm
    Regards
    Shiva

  • What is the difference between rfc and idoc

    hi,
       My name is rambabu.can anyone of u please tell me the main differences between idoc and rfc??
    Thanks in Advance

    hi Ramesh,
    Remote Function Calls (RFC) and data exchange through IDoc
    message documents. RFC makes direct and synchronous calls of a program in
    the remote system. If the caller is an external program it will call an
    RFC-enabled function in R/3 and if the calling program is the R/3 system
    it will call an RFC-function in another R/3-system or it will call a
    non-R/3 program through a gateway-proxy (usually rfcexec.exe). BAPIs are
    a subset of the RFC-enabled function modules, especially designed as
    Application Programming Interface (API) to the SAP business object, or in
    other words: are function modules officially released by SAP to be called
    from external programs.
    IDocs are text encoded documents with a rigid structure that are used to
    exchange data between R/3 and a foreign system. Instead of calling a
    program in the destination system directly, the data is first packed into
    an IDoc and then sent to the receiving system, where it is analyzed and
    properly processed. Therefore an IDoc data exchange is always an
    asynchronous process. The significant difference between simple RFC-calls
    and IDoc data exchange is the fact, that every action performed on IDocs
    are protocolled by R/3 and IDocs can be reprocessed if an error occurred
    in one of the message steps.
    While IDocs have to be understood as a data exchange protocol, EDI and ALE
    are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to
    deliver data to the receiving system. ALE is basically the scheduling
    mechanism that defines when and between which partners and what kind of
    data will be exchanged on a regular or event triggered basis. Such a
    set-up is called an ALE-scenario.
    Regards
    Sreeram.G.Reddy

  • Difference between rsnast00 and rseout00

    hi,
      Can any one say me the difference between RSNAST00 and RSEOUT00.

    The ABAP RSNAST00 is the standard ABAP, which is used to collect unprocessed NAST message and to execute the assigned action.
    RSNAST00 can be executed as a collector batch run, that eventually looks for unprocessed IDocs. The usual way of doing that is to define a batch-run job with
    transaction SM37. This job has to be set for periodic processing and start a program that triggers the IDoc re-sending.
    ABAP program RSNAST00 (which is scheduled to run on a periodic basis) reads the NAST records and creates outbound IDocs for each one, based on the ALE configuration. It writes these IDocs to the IDoc tables (EDIDC, EDID4, EDIDS). If the partner profile is set to "Send immediately", then the ALE layer will send the IDocs at this time.
    If the partner profile is set to "Collect IDocs", then the ALE layer will not send the IDocs until the ABAP program RSEOUT00 (also scheduled for periodic execution) runs. This program calls the ALE layer to send all collected IDocs of any specified message types.

  • Exact difference between VOimpl and VORowimpl and EO.

    Can anybody tell me whats the exact difference between
    VOimpl and VORowimpl and EO.
    Thanks

    Entity Object :BC4J entity objects encapsulate the business rules (validations, actions and so on) associated with a row in a database table, view, synonym or snapshot.
    View Object : (ViewImpl)
    In the simplest terms, a BC4J view object encapsulates a database query and provides iteration over and access to the view rows in its result set.
    View Row : ViewRowImpl :
    Represents a single row in a view object.
    For more Details see OA Developer Guide.
    Thanks

  • Difference between Macros and subroutine

    Hi all,
    What is the difference between the macros subroutine and function module functinalitywise.;

    Hi,
    Macros can only be used in the program the are defined in and only after the definition.
    Macros can take max 9 parameters.
    Macros are expanded at compilation / generation.
    Subroutines (FORM) can be called from both the program the are defined in and other programs ('perform
    ' of 'perform in program ').
    Subroutines can take any amount of parameters.
    Subroutines are 'expanded' at runtime.
    Functions are just like FORMs, but are intended to be called external.
    Some differences between FUNCTIONs and FORMs:
    The name of a FORM must be unique within the program (two programs can have different FORMs with the same name). A FORM is intended to be called internal (from within the program, however by a 'trick' you can call them external).
    The name of a FUNCTION has to be unique throughout the system. A FUNCTION is intended to be called external (and is thus shared by 'many' programs).
    The latter is more important for programmers and maintenance. Since a FUNCTION is called external, it is important to keep the interface (parameters) the same. The interface of a FORM (which is intended to be called internal) is check when debugging a program (but it is only checked within the program that is debugged). So if the interface of a FORM is changed, but the call to the FORM (perform ) is not, the debugger will notice this and issue an error message.
    In general:
    A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice.
    A FORM is a local subroutine (which can be called external).
    A FUNCTION is (more or less) a subroutine that is called external.
    Since debugging a MACRO is not really possible, prevent the use of them (I've never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.
    --Excerpt from http://sap.ittoolbox.com/documents/popular-q-and-a/macro-vs-subroutine-1594#
    DATA p_c(10).
    FIELD-SYMBOLS: <fs> TYPE ANY.
    DATA p_old1 TYPE i VALUE 10.
    DATA p_old2 TYPE i VALUE 11.
    DATA p_old3 TYPE i VALUE 12.
    DATA p_old4 TYPE i VALUE 13.
    DATA p_old5 TYPE i VALUE 14.
    DATA p_old6 TYPE i VALUE 15.
    DATA p_old7 TYPE i VALUE 16.
    DATA p_old8 TYPE i VALUE 17.
    DATA p_old9 TYPE i VALUE 18.
    DATA p_old10 TYPE i VALUE 19.
    DATA p_old11 TYPE i VALUE 21.
    DATA p_old12 TYPE i VALUE 22.
    DATA p_old13 TYPE i VALUE 23.
    DATA p_old14 TYPE i VALUE 24.
    DEFINE ADD_MAPPING.
    p_c = &1.
    CONDENSE p_c.
    CONCATENATE 'p_old' p_c INTO p_c.
    ASSIGN (p_c) TO <fs>.
    WRITE <fs>.
    END-OF-DEFINITION.
    DO 14 TIMES.
    ADD_MAPPING sy-index.
    ENDDO.
    http://sap.ittoolbox.com/documents/popular-q-and-a/macro-vs-subroutine-1594
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db972835c111d1829f0000e829fbfe/frameset.htm
    Regards,
    Priyanka.

Maybe you are looking for