Contextual Event question (Currency Change Event)

Hello,
I have published a contextual event on my table (Currency Change Event)
I also have a SelectionListener on the same table.
Will I have to manually/programmatically publish the event within the selection listener code? (and if so, how?)
The reason I ask is that I practiced with a small app containing a region from an ADF library that handled currency change event from the referenced task flow and everything was great, but now I am trying to apply the same principles to my "proper" application and there is no currency change event being received in the parent application.
I had a look at Andrejus example (http://andrejusb.blogspot.co.uk/2010/10/contextual-events-framework-and-adf-11g.html) but he has hand crafted the events on the page binding will I have to do that too? Is it not enough that I have the currency change event declared?
Any help appreciated, thanks
JDeveloper 11.1.2.2

I've applied the same processing to another table that uses the standard collectionModel.makeCurrent selection listener and it's firing the contextual event handler in the parent application, so that almost confirms that it's the bespoke selection listener that needs code adding to it to invoke the currency change event
edit :
I added this code to invoke the makeCurrent and everything is ok again, thanks for listening
FacesContext fc = FacesContext.getCurrentInstance();
ELContext elContext = fc.getELContext();
ExpressionFactory ef =
fc.getApplication().getExpressionFactory();
MethodExpression meth = ef.createMethodExpression(elContext, "#{bindings.partnersVO1.collectionModel.makeCurrent}", Object.class, new Class[]{SelectionEvent.class});
meth.invoke(elContext, new Object[]{selectionEvent});

Similar Messages

  • Contextual Event - "Currency Change Event" not raised?

    Hey,
    I am trying to raise contextual event on a table when I click on a row. The event type for a table is eventType="Currency Change Event" But is not working.
    Here is the event in the PageDef file.
    <events xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
    <event name="paramValueChangedEvent"
    customPayLoad="${bindings.PolicyId.inputValue}"
    eventType="Currency Change Event"/>
    </events>
    After that I want to raise custom method:
    <methodAction id="testEvent" InstanceName="myBean.dataProvider"
    DataControl="myBean" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="testEvent"
    IsViewObjectMethod="false"/>
    Here is the event map:
    <eventMap xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
    <event name="paramValueChangedEvent">
    <producer region="*">
    <consumer region="" handler="testEvent" handleCondition=""/>
    </producer>
    </event>
    </eventMap>
    When I raise the event programmatically, then the event is raised and my function is called.
    Here is the code. I call this function on a custom selection listener of the table.
    public void riseCurrencyChangeEvent(String treeID, String nodeID,
    String attributeValuedPassedName) {
    DCBindingContainer bc = ADFFacesUtils.getDCBindingContainer();
    FacesCtrlHierBinding tbl =
    (FacesCtrlHierBinding)bc.findCtrlBinding(treeID);
    FacesCtrlHierNodeBinding node =
    (FacesCtrlHierNodeBinding)bc.findCtrlBinding(nodeID);
    EventDispatcher dispatcher = bc.getEventDispatcher();
    node = (FacesCtrlHierNodeBinding)tbl.getRootNodeBinding();
    dispatcher.queueEvent(node.getEventProducer(),
    node.getCurrentRow().getAttribute(attributeValuedPassedName));
    bc.getEventDispatcher().processContextualEvents();
    My idea is not to call custom method after clicking on a table row, but I want to raise declaratively the event because I will need so generics.

    Hi,
    there is a bug 10045872 filed for this. The bug is scheduled for fixing in PS4 (11.1.1.5) I'll work on a manual - though code centric - alternative for the time being and publish it on ADF Code Corner when done.
    Frank

  • Possible bug - Missing click event when handling change event

    Using Flex 4.5 SDK, I have a spark ComboBox and a Button next to it for applying a filter according to ComboBox selection.
    I listen to both the ComboBox's change event & the Button's click event (for different functions).
    When I manually delete the ComboBox text value from its TextInput (i.e. changing selected index to -1) and immediately click on the Button,
    the click event-handler function is not being called and only the ComboBox's change event-handler function is executed.
    (Selecting a value from the ComboBox's list and clicking on the button triggers both methods on the right order.)
    There's also a state definition for the module, but it isn't being changed during these operations...
    Is this a bug or a correct behavior? Am I missing something here?
    Any workaround suggestions?
    (I thought of listening also to mouse-down or mouse-up on the button instead, but haven't tried it yet...)
    *** UPDATE ***
    When using the Button's mouseDown event the behavior is as expected, so there's a simple workaround.
    However, it seems to me like there's a bug with the Button's click event listener or something...
    *** UPDATE #2 ***
    I created a test application for that and couldn't reproduce the problem.
    Then I figured out the problem and solved it.
    It's a bit emmbarrasing, but I actually disabled the button (enabled=false) as in a child method of the change handling code...
    (If there is no value, don't allow applying the filter - It makes sense! )
    Anyway... No issue after all.
    However, I choose to leave this post (and not delete it) as an example of identifying and resolving a strange behavior in a complex application.

    There's no need.
    Please read the section UPDATE #2.

  • 'CHANGE' event not triggering for BTE 2214 on park/change from FBV1/FBV2

    I have designed a workflow template for FI parking. If the parked document is rejected, i need to trigger FIPP 'CHANGE' event for sending workitem to approver when someone changes the parked document. In SWEL event trace, the 'CHANGE' event is not getting raised.
    So i implemented a BTE 000002214 and now i am able to raise 'CHANGE' event and capture it in workflow. But this is only working when i park a document using FV50 transaction and later change it.
    But when i park a document using FBV1 and then make changes from FBV2, the 'CHANGE' event is not being triggered in SWEL. Should i implement some other BTE like 2218 etc? Can you please help?

    Hi Gokul,
    You can try handling the SAVE event instead of the CHANGED event.
    T-code FBV2 will not allow you to save the document unless you make some changes.
    Try implementing BTE 2218 and revert.
    Thanks,
    Sreekanth

  • 11g: Contextual Events - How do I fire them on currency change?

    Hi!
    After posting a question here: 11g: Bounded task flows, need help and advice!
    I read the article at http://technology.amis.nl/blog/3365/adf-11g-how-events-in-one-region-cause-other-regions-to-refresh because I need to refresh region B when the user selects in region A.
    Now, the comments in that article suggest that Contextual Events are the built-in mechanism for that use case. So I tried that first. The online help suggests that this is what I need.
    I read the online help and created an event and defined a producer and consumer in the event map in the parent page's page def. Now the help shows how to fire the event when a methodAction binding is executed. But I need to fire the event when the user selects a row in region A's table.
    1. How do I do that? Where do I put the event? The help says it's possible, but does not show how. Add a selection listener to the backing bean and call the event-enabled methodAction binding from there? Or is there a better way?
    2. I get the impression, that - when I use the event to call the consumer's binding ExecuteWithParams method - just the query of the consumer's VO is executed. That's great. But how do I reset the flow to the initial action? Just refreshing the VO is not enough. I need to reset the flow to the initial action (showing a view).
    I read http://www.oracle.com/technology/products/jdev/tips/fnimphius/taskflow_in_popup/taskflow_in_popup.html and now I am completely confused. Use input parameters or use events? If I use events, how do I reset (refresh) the task flows?
    Thanks,
    Sascha
    Edited by: Sascha Herrmann on Oct 19, 2008 3:33 PM

    Sascha,
    are region A and B share the same transaction ? If yes and the content in region B is a dependency of the VO used in A then you don't need contextual events at all. So if i assume that region A contains a list of departments and region B the employee table (where DepartmentsVO is the parent of EmployeeVO) then you can do as follows
    - navigate to the region definition of region B in the pageDef file
    - use the right mouse context menu to add parameters, and then a parameter (e.g. changeIndicator)
    - wire the changeIndicator parameter to the DepartmentsVOIter current row key str (its a method exposed directly on the iterator)
    - set the region binding refresh to ifNeeded
    - set a partial trigger on the regionB to point to the departmentTable so the region is refreshed whenever the table row currency changes
    The parameter that you added just does nothing except that it indicates to the region binding that the region must refresh. You point it to the row row key of the department iterator because it provides the changed value.
    If VO in regionB is not dependent on the DepartmentVO, then you need to create a parameter on the bounded taskflow, which takes the value of changeIndicator to write it to pageFlowScope.currRowKey. Then create a set currentRowWithKey method as a default activity and wire it up to pageFlowScope.currRowKey
    Frank

  • [Flex 4.5.1] How to prevent Radio Button from being selected when clicked on? No Changing Event?

    I have a very common use case where you have a few radio buttons and only one can be selected at a time. Some of them are basic and on click should be selected right away, but other are more complex and open a pop up which requires some additional user selections after which the user selected OK or CANCEL for example and only after that the selection of the radio button should be applied programatically.
    So to solve this issue I've come up with 2 workarounds:
    1) make the entire group, that holds the radio button, act as a button with buttonMode="true" mouseChildren="false" and programatically change the radio button within it.
    2) hold the current radio button selection in a variable and in the changeHandler of that radio button return the selection back to what was selected before. But this also causes a small flickering of the radio button which gets selected and deselected immediately after that.. not cool.
    So my question is... is there something I am missing that could do the job without these workarounds... like a Changing event which I use for the ButtonBar but I can't find on the RadioButton or RadioButtonGroup... thanks!

    Hi,thanks for the reply. Actually that was my third option, but not sure if it's very good also..
    Here is a simple scenario:
    User must select between 2 radio buttons:
    1) no volume -> sets variable volume=0 and selects the radio button (that is the normal use case)
    2) set volume -> opens up a pop up with a list that has a X button to close and 4 options: 25% volume, 50% volume, 75%, 100%
    At this point the set volume radio button should not be selected and the user has 2 choices:
    -> hit the X button to close - nothing changes and no volume radio button is still selected and volume is still = 0
    -> hit one of the volume % buttons -> the set volume radio button gets selected and the variable volume=25/50/75/100 depending on the button selected by the user.
    That's a pretty common scenario and it's bugging me that I can't easily alter the radio button selection logic since whenever I click it, it gets selected and I can't put a logic in between in a standard way. This should apply to any component with selection, just like ButtonBar has it with the Changing event.
    So is there any other more convenient way to accomplish this scenario that you could recommend?
    Thanks!

  • A glitch in my use of the change event

    I have a script in the change event of a drop down list field that works when a certain choice is made then another field becomes visible. I am trying to get that field to become visible when when a record from a database populates the field the correct value. Right now all that happens is the drop down field shows the correct value but the field in question isn't visible.
    Here is the code I am using for the change event.
    var contractLangs = xfa.event.newText;
    if (contractLangs == "Creative Works Unlimited")
    xfa.form.form1.MainPageSF.ContractSF.ContractLanguageSF.presence = "visible";
    else
    xfa.form.form1.MainPageSF.ContractSF.ContractLanguageSF.presence = "hidden";
    I can't figure out how to get the field to become visible when right value goes into the drop down field.

    I don't think I have been explaining this very well so here is another try.
    I have a Drop-down List called "ContractTypeList" that has three items in the list;
    Limited Permission
    Creative Works Unlimited
    Commission for Creative Works
    If Creative Works Unlimited is chosen a hidden Drop-down List called "ContractLanguageList" becomes visible otherwise if either of the other two are chosen then it is hidden.
    I would like the "ContractLanguageList" to be hidden or shown depending on which item shows in the Drop-down List when I cycle through records in a database. Right now it only works with user interaction.
    I'm not sure what to do. I have been using the line, xfa.even.newText. If anyone can help me out it would most appreciated.

  • How to handle tab change event in UI shell main area

    Hi,
    I have two tabs(two taskflows) in UI shell main area. one is department tab and another is employee tab. My department tab shows employees department wise. On employee tab I have emplyee table which shows employees jobwise. This employee table has the functionality of adding new record to employee vo as well.
    Now i follow these steps.
    1. by defualt department tab is open.
    2. by clickinng on Tasks menu link i open Employee tab in to main area. Now i have both tabs in main area.
    3. at Employee tab I search all employees job = accountant. It shows the search result well.
    4. Now i add a new record to it and without saving/deleting this record i move to department tab.
    5. at Department tab i search employees where department =20, here no relation b/w job and department.
    6. Now i return to employee tab. my newly added record got disappeared. It is there but does not show in table.
    How to resolve it??
    I have one solution in my mind while changing the tab i can prompt to user "you can not leave the newly added record..either save it or delete it". But how to catch tab change event here? where i can write code to prompt msg to user?
    Pls help.
    Edited by: 900997 on May 6, 2012 4:10 AM

    With apologies for the slow reply, I'm currently travelling.
    Two things to note:
    1) The af:document uncommittedDataWarning flag was designed to stop users navigating away from half entered records. More about this flag can be found here:
    http://docs.oracle.com/cd/E23943_01/web.1111/b31973/af_orgpage.htm#CACDDDFH (see point 4)
    http://www.oracle.com/technetwork/developer-tools/adf/unsaveddatawarning-096556.html
    ....please note our documentation from time to time spells this flag wrong with only one "t" in the word committed, so if you're attempting a bulk search check for this (and I'll raise document bugs to get this fixed in the future).
    2) On addressing the ADF UI Shell, if you're switching between "pages" in the UI Shell, as separate to switching between dynamic tabs within a single page using the UI Shell, the UI Shell will actually restart the currently running task flow in the page you're returning too. You can verify this by implementing an initializer on your task flow with a log message, and watching when the initializer is called.
    In addressing your last question, at this stage I think you need to assess my first answer then come back if you think you sill need to execute the code on the tab click. I also need to know are you talking about the primary level of tabs that represent each page in the UI Shell, or are you referring to the dynamic tabs within a single UI Shell page that hold your task flows?
    CM.

  • Alter system set events Question

    Version 10202 on AIX
    sql> alter system set events '4030 trace name heapdump level 536870917; name errorstack level 3';
    Questions about this statement..
    what this command is doing, i guess creating tracefile for event 4030...& the location of trace file would be the current direcotry?
    & how to setup same kind of event trace for other events, any tips....& what to check in tracefile for problem?

    The values for level I have record are 1, 2, 3, 8, and 32 so I am guessing the number shown is the address of a specific heap to be dumped. The address of a heap would potentially change with a change in the shared pool storage parameters. Where did you get the address value?
    The dump should go to the user background dump destination and not the current directory.
    PS - if you have metalink look at document: #218105.1 Introduction to ORACLE Diagnostic EVENTS
    HTH -- Mark D Powell --
    Message was edited by: MDP add PS to Metalink Doc
    mpowel01

  • WebDynpro ABAP "on change event"

    Dear Experts,
    we are using a WebDynpro application (ABAP-Stack) and there are two
    inputfields included. My question is:
    First we did some input into the first field and than we navigate to the second one.
    Is it possible to delete the input of the first field when we do some input into the second one?
    Maybe we need something like an "on change event" but in WebDynpro there is no
    methodtype like that and no way to edit the generated HTML- or JavaScript-Code.
    Best regards,
    Henrik Pollmann

    Hi
    Just look at this Thread discuss the same on change event may get some help
    Re: on change event
    on change event
    Regards
    Abhishek
    Edited by: Abhishek Agrahari on Jan 15, 2009 5:36 AM

  • Jtable on cell changed event

    How can i treat an Jtable on cell changed event, not on value changed

    Do you mean cell selection changed? One way is to add a ListSelectionListener to both the table's and the table's ColumnModel's ListSelectionModels. Something likeListSelectionListener lsl = new ListSelectionListener() {
       public void valueChanged(ListSelectionEvent e) {
          System.out.println(e.getSource());
          ListSelectionModel lsm = (ListSelectionModel) e.getSource();
          if (!lsm.getValueIsAdjusting()) {
             System.out.println("Selection changed");
    table.getSelectionModel().addListSelectionListener(lsl);
    table.getColumnModel().getSelectionModel().addListSelectionListener(lsl);Note that simultaneous change of both row and column will generate two valueChanged events.
    If that's not what you wanted to know, ask a better question.
    [http://catb.org/~esr/faqs/smart-questions.html]
    db

  • Can i change event alert in the calender to one month before

    can i change event alert in the calender to one month before

    Vamsi,
    <b><i>Then Dispaly name Has been Changed But In My Postings my old name is Remains Same</i></b>
    Where u are seeing ur old name in ur thread? Please make sure only the display will change not the contents which u wrote in ur questions/replies. Like Best regards Vamsi, this one u are referring to? If yes then it won't changes.
    Best regards,
    raj.

  • BUS2000111 Change event

    Dear Experts,
    Business Scenario: A work flow should be triggered on change of the status to the person created the Opportunity. When ever the status changes the workflow should be triggered.
    In the standared business object BUS2000111 there is no CHANGE or STATUSCHANGE events to trigger the workflow.
    Currently what has been done:  ( We are new to Workflow )
    What we have done is in T Code SWO1 we have created a Sub Type ZBUS200011 and in Settings->delegate we provided BUS2000111. In ZBUS200011 we have created a event STATUSCHANGE and no coding was done. ( As we do not know what to write here )
    Now the event is visible in the T Code SWEC and we created a new entry.
    In the workflow Start events we changed the event of the object as STATUSCHANGE and try to change the status of the Opportunity. But the workflow is not getting triggered.
    My questions are as follows:
    1. What ever done in the above steps are correct?
    2. If correct what may the reason for not triggering the workflow on change of the status.
    3. If Not correct, how to achieve the business requirement.
    Please help us to proceed further.
    Thanks in advance,
    Dhananjay, TCS

    Hi,
    In T Code SWEC the following entries were maintained.
    Change Doc Object: CRM_ORDER
    Object Category: BO BOR Object Type
    Business Obj. Type : ZBUS200011
    Event: STATUSCHANGE
    On Change : Radio Button Selected     
    And in Field Restriction:
    Table : CRMA_OPPORT_H
    Field Name : STATUS_SINCE
    Old Value : *
    New Value : *
    But the workflow is not triggering. Please help.
    Thanks and Regards
    Dhananjay, TCS

  • Postmerge session event question

    We have implemented a custom session event listener that utilizes the postmerge session event.
    We have observed some unexpected behavior and were hoping that the product architect or manager could explain this behavior.
    We have the following graph of objects:
    A has a many-to-many privately owned collection of B
    B in turn has a many-to-many privately owned collection of C
    After commiting a transaction involving object A we observe:
    postMerge event for A
    postMerge event of each of A's privately owned Bs
    yet NO postMerge event for any of B's privately owned Cs
    Questions:
    1) Is this the expected behavior?
    2) Since we need to do some processing of Cs, we are using the postMerge event that occurs on Bs to update the Cs. Is this a safe/correct approach?
    3) In a transaction that involved only updates to Cs, (no changes to A or B), would we see a postMerge event for each updated C?
    Thanks in advance for any clarification you can provide.
    ...Steve

    You could paste the results (tkprof ?) of the trace.
    The "missing" time could be an uninstrumented wait --- i.e. a wait event that is not captured in v$session_event. Particularly because you are using external calls.
    For example, see "Case Study 1" at http://blog.tanelpoder.com/2007/08/27/advanced-oracle-troubleshooting-guide-part-2-no-magic-is-needed-systematic-approach-will-do/
    Hemant K Chitale

  • What should the payload of a "domain event" generated through "change data capture" include?

    Using domain driven design and event sourcing ...
    Given I have a table of 3 columns: (A, B, C) with an existing row of data: (1, 2, 3), when I update the row to contain values (1000, 2, 3) and I run a tool designed to capture data changes and emit associated events, which of these should I expect as the
    emitted event's payload?
    {date: 1234, newState: (1000, 2, 3)}
    {date: 1234, prevState: (1, 2, 3), newState: (1000, 2, 3)}
    {date: 1234, prevState: (1, 2, 3), newState: (1000, 2, 3)}, changed: (1,0,0)}
    {date: 1234, newState: (1000, 2, 3), changed: (1,0,0)}
    {date: 1234, changedData: (A: 1000)}
    {date: 1234, changedData: (A: 1000), previousData: (A: 1)}
    "Ideally" would like the design of the events to support wide variety of current and future uses including:
    data replication
    audit logging
    event triggered activities
    retroactive event insertion (possibly)
    My thoughts:
    Answer 1. above is the simplest, but clients that don't care about the "A" column still end up having to react to this event, as they can't tell from the event itself what's changed.
    Answer 5. above is the cleanest - it just captures the "difference". The downside is that it forces the client to roll up changes to display an audit log of the full state on each change. Also event triggered activities may require knowledge of
    the full state to work.
    Answer 4. above is perhaps more generally useful? It carries what's changed, but some contextual information alongside it.
    Answer 2. above falls into a trap of asserting what the previous state was. What if that's not the previous state in your datastore, perhaps in a test environment? Do you reject the event as invalid? Would retroactively inserting an event mean changing
    all subsequent events "previousState" fields?

    You have two competing demands, and I think you need to choose which of them you want to win. Demand 1, to have a fixed record of the state in each event. Useful for quick auditing by scanning the raw messages
    Demand 2, to have a record of the changes applied in each event, to facilitate event sourcing.
    Those two demands seem only subtly different, why not do both? Within that subtlety, however, you'll find that they are utterly conflicting. Demand 1 specifies that the knowledge of, and hence control of the mutation of state occurs with the sender, as it has
    absolute knowledge of the state (either before or after the change). Demand 2 specifies that the knowledge of, and control of state mutation occurs in the receiver.
    Demand 2 is suitable for event sourcing (recording that a change is requested), demand 2 is not, it is, as you say, more of an audit log (recording that a change has occurred)
    So, for that reason, since you want to do event sourcing, the only possible workable format is 5.
    Part of this is likely caused by the fact that you are coming at event sourcing by listening to mutation occurring in a database, whereas it should be the other way round, events causing the mutation to occur.
    That's not to say that you can't get your scheme to work, and satisfy your requirements well, just don't think of it as event sourcing, as that's not what you actually want.
    Adopting an event sourced data setup would support your needs above somewhat more easily, but adapting existing systems to that can be very involved to do.

Maybe you are looking for