Contextual event - handler called before producer bean's setter
I am trying a simple contextual events usecase:
Page A.jsff has an input text field whose value is directly stored in a bean variable (bean is in pageFlowScope). Contextual event is defined on value change event for this input field. A.jsff has taskflow B_btf as an embedded region.This B_btf will simply display the value entered in the A.jsff. So, when contextual event is raised, the handler sets the value in a local variable of B_btf bean. The problem is that the handler method is getting called before the setter for the attribute of the bean of A.jsff. This is resulting in the B_btf displaying the last-but-one value entered in the input field of A.jsff instead of the current/latest value. Any tips?
Thanks,
Amitabh
The issue was with the (lack of) understanding of the JSF lifecycle. The value change listener is called during the Process Validation phase, whereas the managed bean (Model) values will be set in the Update Model phase which lies next-in-line after Process Validation phase. Hence, if the value change listener is to be used, then the handler code should have used the default payload and not the custom payload. For a value change event the default payLoad will be a DCBindingContainerValueChangeEvent, and one can invoke getNewValue() to get the value entered in the text field (For details watch Frank Nimphius' video here: ADF Region Interaction - Contextual Events - YouTube). For my case, I added a command button to the page, and moved the contextual event to that button.
Similar Messages
-
Event Handler Call Back Functions
Hi all,
I've followed http://wiki.sdn.sap.com/wiki/display/CRM/ExtendBOLModelBTwithcustomtabletyperelationship that wiki to get my Z table accessible in the BOL through a relationship to BT. Create and display opperations are working just fine.
My problem is with Modify and Delete actions.
Essentially, when I press Save in the BOL Browser (after modifying some field in my Z Entity) and have a look at the Event Trace, I see that the events Init, Save, Init have been called. The problem here is that Init is being called before Save, clearing the global class table that holds my entities. Therefore, when Save is called the table is empty and no entities are updated in the DB.
My Init function is called on '88 (Initialize Document)' and the Save function is called on '80 (Save Document)'. Is there some way of ensuring that Init will not be called before Save?
Thanks for your time and help,
Patrick.Hi folks.
Some more info.
I've been trying to figure out how the SAP standard works, so I'm having a look at PARTNERSET/PARTNER, which have the same set up against BT that my objects have. I've put break-points in to the functions CRM_PARTNER_INIT_EC & CRM_PARTNER_SAVE_EC.
From the BOL Browser I now find a Partner relationship, make a modification and press Save.
I see that here, also, the calling order is INIT followed by SAVE; but here the modifications are actually stored to the DB.
So, is there something wrong with the code in the INIT/SAVE functions from that wiki?
Essentially, has anyone here ever taken a Z Table, created a BOL entry for it with a relationship to BT (or any other component) and had it actually work?
I've read every resource I can find on this, the wiki I linked, another by a guy named Harel, another that has us use the component set SO2; the CRM WebUI programming book and the Deep Dive course material and you can add to that many, many forum posts. None of them result in entities (with relationships) that actually work.
Some insight/help would be greatly appreciated.
Thanks,
P.
Edited by: Patrick O'Neill on Oct 12, 2011 10:40 AM -
Inline popup sending contextual event to calling taskflow?
Is it possible?
Because of the returnListener not firing consistently, I was thinking of using contextual events. I am not sure, however, if that will work.
11.1.1.4
Basically I have a link, opens an inline popup to display a task flow as JSPX. Upon clicking on the okay button there, I want to fire an contextual event back to the
parent to refresh it's data.Hi,
yes, this should work because the calling task flow also remains active
Frank -
How to pass import/export parameters while event handler call in OOABAP?
Hi Experts,
Is it possible to use export parameter in set handler method?
Actually my requirement is while creating customer through XD01 after committing to data base i want that customer.
So i exporting customer no. in one of the badi before commit and importing in my custom class (zabc) after commit.
Using event TRANSACTION_FINISHED and checking KIND eq C.
My question is instead of using import export abap command is it possible to pass those parameters in ??
Sample : SET HANDLER zcl_sd_after_commit=>get_kunnr.
Regards,
Raj....Yes it can
but the event should be defined in the BADI so why do you need to do it?
CLASS MY_CLASS_1 DEFINITION FINAL.
PUBLIC SECTION.
METHODS GET_KUNNR IMPORTING KUNNR TYPE KUNNR.
EVENTS MY_EVENT EXPORTING VALUE(KUNNR) TYPE KUNNR.
ENDCLASS.
CLASS MY_CLASS_2 DEFINITION FINAL.
PUBLIC SECTION.
METHODS MY_METHOD FOR EVENT MY_EVENT OF MY_CLASS_1
IMPORTING KUNNR.
ENDCLASS.
CLASS MY_CLASS_1 IMPLEMENTATION.
METHOD GET_KUNNR.
RAISE EVENT MY_EVENT EXPORTING KUNNR = KUNNR.
ENDMETHOD.
ENDCLASS.
CLASS MY_CLASS_2 IMPLEMENTATION.
METHOD MY_METHOD.
WRITE KUNNR.
ENDMETHOD.
ENDCLASS.
So it can move KUNNR from class1 to class2
DATA: MY_OBJ_1 TYPE REF TO MY_CLASS_1.
DATA: MY_OBJ_2 TYPE REF TO MY_CLASS_2.
PARAMETERS: P_KUNNR TYPE KUNNR.
START-OF-SELECTION.
CREATE OBJECT MY_OBJ_1.
CREATE OBJECT MY_OBJ_2.
SET HANDLER MY_OBJ_2->MY_METHOD FOR MY_OBJ_1.
MY_OBJ_1->GET_KUNNR( P_KUNNR ). -
Capture Return Value from Contextual Events Subscriber Method
Hi
I was wondering if anyone knew whether you could capture the return value from a method exposed as a subscriber for a contextual event?
Requirement: We have 2 bounded task flows (parent-child) with the child task flow embedded as a region in a view activity in the parent task flow. Based on an action in the parent task flow we raise a contextual event which calls an application module method exposed as a data control within the child task flow. We need to be able to capture the return value from the method on the managed bean.
Example method within child task flow application module:
public String contextualEventSub(){
Return "Y";
So here we would like to capture String value when the event is raised by the event producer (parent task flow action).
Within the Event Map on the page definition of the parent task flow view activity it is possible to set parameters to pass to the subscriber but it’s not obvious where you can capture the return value.
Many thanks!
Technology:
ADF 11.1.1.7 – ADFbc with ADF task flows and page fragmentsCheck this URL it may help you
One size doesn't fit all: JDev 11g: Programmatic Contextual Events -
Triggering Validation in a Region Through a Contextual Event
I am using JDeveloper 11.1.1.6.0.
I am trying to find out how to trigger the built in validation that occurs normally when a "submit" action occurs, but have the submit action occur outside of a region, and the validation also occur in the region itself.
I have a page that contains a dynamic region in it. I will refer to the containing page as the parent and the region as the child. The parent region and child region both have different business objects bound to them, though they are part of the same application module. The parent page contains a submit button that needs commit the user entered data in both the parent and child pages. This action must not proceed if there are any validation errors in the parent or the child. The validation should trigger on the parent page without any work from me because of how ADF handles the situation. The child page is notified of the submit action via contextual events. I currently have it where this event can trigger the "commit" action successfully, but I have no idea how to go about ensuring that it triggers a validation check as well.
The overall flow that I think will happen in the final version is likely:
1: submit button pressed.
2: parent page validation is checked (if success, proceed)
3: contextual event is fired
4: contextual event is received by the child.
5: the child triggers its own validation (if success, proceed, else stop)
6: the child triggers a commit action
7: the child sends a response contextual event (signalling that it was successful)
8: the parent receives the response contextual event
9: the parent performs a "commit" action.
I do not know how to cause step 5 to occur, and I do not know if steps 7 through 9 are needed yet (I haven't tested to see if causing the commit in either the parent or the child ends up causing all modified entity objects to be committed). Any help would be greatly appreciated.
Thank youHi,
you can access a command button on the page fragment and queue its action event. For this you access a managed bean (backingBean Scope) that contains a handler to the command button and queue the event (this then will perform validation as if the user clicked it. The command button can also be hidden on the fragment.
Have a look here for how you can integrate the managed bean as the contextual event handler
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/regionpayloadcallbackpattern-1865094.pdf
Frank -
Event handling in global class (abap object)
Hello friends
I have 1 problem regarding events in abap object... how to handel an event in global class in se24 .
Regards
Reema jain.
Message was edited by:
Reema JainHello Reema
The following sample report shows how to handle event in principle (see the § marks)..
The following sample report show customer data ("Header"; KNB1) in the first ALV list and sales areas ("Detail"; KNVV) for the selected customer (event double-click) in the second ALV list.
*& Report ZUS_SDN_TWO_ALV_GRIDS
REPORT zus_sdn_two_alv_grids.
DATA:
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_cell_top TYPE REF TO cl_gui_container,
go_cell_bottom TYPE REF TO cl_gui_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid,
gs_layout TYPE lvc_s_layo.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_knvv TYPE STANDARD TABLE OF knvv.
"§1. Define and implement event handler method
" (Here: implemented as static methods of a local class)
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_knb1 TYPE knb1.
CHECK ( sender = go_grid1 ).
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = '1000'.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 2
columns = 1
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_top.
CALL METHOD go_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = go_cell_bottom.
* Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_top
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
"§2. Set event handler (after creating the ALV instance)
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1. " Or:
" SET HANDLER: lcl_eventhandler=>handle_double_click FOR all instances.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_cell_bottom
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Display data
gs_layout-grid_title = 'Customers'.
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'KNB1'
is_layout = gs_layout
CHANGING
it_outtab = gt_knb1
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
gs_layout-grid_title = 'Customers Details (Sales Areas)'.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'KNVV'
is_layout = gs_layout
CHANGING
it_outtab = gt_knvv " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements
CALL SCREEN '0100'.
* Flow logic of dynpro (does not contain any dynpro elements):
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
* SET TITLEBAR 'xxx'.
* Refresh display of detail ALV list
CALL METHOD go_grid2->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* User has pushed button "Display Details"
WHEN 'DETAIL'.
PERFORM entry_show_details.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form ENTRY_SHOW_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM entry_show_details .
* define local data
DATA:
ld_row TYPE i,
ls_knb1 TYPE knb1.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM knvv INTO TABLE gt_knvv
WHERE kunnr = ls_knb1-kunnr.
ENDFORM. " ENTRY_SHOW_DETAILS
Regards
Uwe -
Contextual event in reverse direction ( from child TF to parent view )
Hi ,
It seems all example of Contextual events talk about mirroring input value from Parent page to Child TF running in a region and there are numerous examples out there.
What I wanted to accomplish was that an lov in a child TF triggers a contextual event and the parent TF takes the selected list of values. It needs to conduct a search based on these values and than mark the rows in a (tree)table.
What has succeeded is almost all aspects of this. I can fire the event and receive it successfully. But the problem is the the backingBean class that I create via EL is not binded to my parent pages components. The treetable component returns null.
My handler code (the handler code from the bean which you use to create the data control to listen to the cntxtual event) is almost 1:1 to as the code from the book "Oracle Fusion Developer Guide: Building Rich Internet Applications with Oracle ADF Business Components and Oracle ADF Faces", Chapter 6, page 210.
public void receiveEvent(
DCBindingContainerValueChangeEvent incomingPayload){
FacesContext fctx = FacesContext.getCurrentInstance();
ELContext elctx = fctx.getELContext();
Application app = fctx.getApplication();
ExpressionFactory exprFactory = app.getExpressionFactory();
ValueExpression valExpr = exprFactory.createValueExpression(
elctx,
//reference the managed bean that holds the mirror value
//property displayed in the input text field
"#{backingBeanScope.ConsumerBackingBean}",
Object.class);
ConsumerBackingBean consumer = null;
consumer = (ConsumerBackingBean)valExpr.getValue(elctx);
//get the changed attribute value from the contextual event
//payload
String newValue = (String)incomingPayload.getNewValue();
//set the new value to the backing bean property that is
//referenced by the input text field in View 3
consumer.setMirrorValue(newValue);
AdfFacesContext adffacesContext = null;
adffacesContext = AdfFacesContext.getCurrentInstance();
//partially update the text field to display the new value
adffacesContext.addPartialTarget(consumer.getMirrorTxt());
The #{backingBeanScope.ConsumerBackingBean} evaluates in my case to fine. But every component I should see as binding in the bean is null.
Since the handler is declared in the pageDef of this parent page Fragment, i assumed the last bit about it being able to get to the backing bean and hence to my components should also be possible.
If I cant refresh my components than I dont see the use of the contextual frameworks for me.You should find this post useful: http://flexponential.com/2010/12/05/saving-scroll-position-between-views-in-a-mobile-flex- application/
It demonstrates one way of saving and restoring data when pushing and popping a view. -
OIM 11g - ldap sync - Post Process event handler 'CREATE' faillling
Hi Gurus,
We have ldap sync set up between OIM 11.1.1.5 and ODSEE 11g,
Post process event handler on user creation with is setting a attribute with random 16 digit character, This event handler is getting triggered and setting the attribute in OIM but in logs i can see "Modification failed because user 45118 is not synchronized to the LDAP directory." error and it is not updated in ODSEE.
This behaviour is only for trusted recon not for the User created through UI.
Not sure what exactly is happening..
Is it expected behavior??
Gurus help me out on this.IF it fail because event handler unable to produce random number then verify below
is eventhandler code being executed in trusted recon verify in log.
There are two method execute and bulk execute in eventhandler. execute is being called from UI and bulk execute is being called for trusted recon.
either put code in bulk execute or update batch recon size something like that system property to 1. so, it will function as UI. Default value of batch is 500
--nayan -
[SOLVED] Triggering a contextual event programatically
Hi,
Is it possible to raise a contextual event from within a managed bean code, without transforming that bean into a data control and defining a methodAction?
Thanks,
~ SimonHi again,
I found it myself (thanks to decompilation), the required code is
BindingContainer.getEventDispatcher().queueEvent(EventProducer producer, Object payload);Well I still need to figure out the exact semantic of the value returned by EventProducer.getEventDefinitionsList(), but hopefully I'm going to find that soon.
Regards,
~ Simon -
Hi,
Products
OIM 11.1.1.5 BP02
OAM 11.1.1.5
OID 11.1.1.5
Problem
I have written a post-process event handler which fires when a role is assigned to a user. The event handler calls a plugin which uses the UserManager API to generate and change the user's password.
I've tested this by assigning a role to the user via the OIM web console. I can see my log messages indicating that the event handler has fired and that the password has been changed.
However, I expected that when UserManager.changePassword completed, a notification email would then be sent to the user informing them of the new password, but no notification email has been sent.
The email notifications have been set up correctly, because I have changed the same user's password via the OIM web console and successfully received a Reset Password email.
So, my questions are:
1) Am I right in thinking that when you call UserManager.changePassword(), an out-of-the-box ResetPassword email notification should be sent to the user?
2) Has anyone got this working in 11.1.1.5?
Some more detailed info
In my plugin class I'm calling the following from both execute methods (EventResult and BulkEventResult):
char newpasswd[] = new RandomPasswordGeneratorImpl().generatePassword(user);
getUserManager().changePassword(userKey, newpasswd, false, null, true);
logger.info(("Successfully changed password"));
plugin.xml
<oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
<plugin
pluginclass="oracle.iam.PostInsertPlugin"
version="1.0"
name="PostInsertPlugin">
</plugin>
</plugins>
</oimplugins>
$OIM_HOME/server/bin/weblogic.properties
wls_servername = oim_server1
app = OIMMetadata
metadata_from_loc=/home/oracle/eventhandlers
metadata_file=/metadata/roleuser/custom/EventHandlers.xml
/home/oracle/eventhandlers/import/metadata/roleuser/custom/EventHandlers.xml
<?xml version='1.0' encoding='utf-8'?>
<eventhandlers
xmlns="http://www.oracle.com/schema/oim/platform/kernel"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
<action-handler
class="oracle.iam.PostInsertPlugin"
entity-type="RoleUser"
operation="CREATE"
name="PostInsertPlugin"
stage="postprocess"
order="1002"
sync="TRUE"/>
</eventhandlers>
There are no errors in the OIM out and diagnostic logs apart from the following which occur at OIM startup:
[2013-01-07T16:29:23.425+00:00] [oim_server1] [ERROR] [IAM-0080075] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: 2e903d7ef060ab65:66b2de91:13c15d6d9ce:-8000-0000000000000002,0] [APP: oim#11.1.1.3.0] XML schema validation failed for XML /metadata/iam-features-OIMMigration/EventHandlers.xml and it will not be loaded by kernel.
[2013-01-07T16:29:24.267+00:00] [oim_server1] [ERROR] [IAM-0080075] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: 2e903d7ef060ab65:66b2de91:13c15d6d9ce:-8000-0000000000000002,0] [APP: oim#11.1.1.3.0] XML schema validation failed for XML /metadata/iam-features-callbacks/event_configuration/EventHandlers.xml and it will not be loaded by kernel.
Thanks
dty
Edited by: oim_user on Jan 7, 2013 5:37 PMNo notification will be sent if you changepassword using the method from usermanager api.
You have to trigger the resetpassword event manullay in your code.
Here is a sample code to create an event for reset password. Once you create event, invoke it from notification service - notify method.
NotificationEvent event = new NotificationEvent();
String[] receiverUserIds= {userLogin};
event.setUserIds(receiverUserIds);
event.setTemplateName("ResetPasswordNotification");
event.setSender(null);
HashMap<String, Object> resolvedData = new HashMap<String, Object>();
resolvedData.put("userLoginId", userLogin);
event.setParams(resolvedData); -
SelectManyCheckbox event handling
Hi,
I am new to this ADF technologies. In my jsp i have a selectmanycheckbox component and have a event handler method in backingbean, when i am clicking on the checkbox the control is going to
event handler method in backing bean, its fine and working..
My question is where the control is going or which method is invoking when i am unchecking the same check box ,its not coming to same event handler
Any help is appreciated...
Thanks in advance..
Anoop Cmy jsp code
<af:selectOneChoice onchange="return fnCheck()" id="financialYearId" binding="#{acctSummaryBB.financialYears}"
valueChangeListener="#{acctSummaryBB.getSelectedFinancialYear}" autoSubmit="true" >
<f:selectItems binding="#{acctSummaryBB.financialYear}" />
</af:selectOneChoice>
<af:selectManyCheckbox id="BU" onclick="selectAllBU()" immediate="true" valuePassThru="true" autoSubmit="true"
value="#{acctSummaryBB.selectedBUs}" valueChangeListener="#{acctSummaryBB.triggerBU}" >
<f:selectItem itemValue="ALL" itemLabel="ALL" />
<f:selectItems value="#{acctSummaryBB.allBU}" />
</af:selectManyCheckbox>
My BackingBean Code
public void triggerBU(ValueChangeEvent evt)
int FY = 0;
String str = "";
if (evt != null)
FacesMessage fm;
System.out.println("##################### BU CHANGE START####################");
selectedBUs = ((List)evt.getNewValue());
System.out.println("##################### SELECTED BU===" + selectedBUs);
public void getSelectedFinancialYear(ValueChangeEvent event)
System.out.println("############### START OF FIN YEAR CHANGE METHOD ##################### ");
Every time control is going to getSelectedFinancialYear() after invoking triggerBU() method when i am checking one item from the SelectManyCheckBox.
Can anybody provide a solution for this...How can i stop firing ValueChangeEvent from selectOneChoice .
Plz..Provide a solution.....Thanks.. -
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.2I'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}); -
Calling a method on backing bean in response to contextual event
Hi
I am using Jdeveloper 11.1.1.6.0 and using ADF contextual events..
I have a drop down list and i am rasiing a contextual event on changing the current selection. In response to that event i want to call a backing bean method with parameters.. But when i click on the subscriber section for the contextual event, i can see only some bindings of the page.. How can i call a method on backing bean as a subscriber..
Thanks
RaghuHi,
this article has a use case for the POJO approach: http://www.oracle.com/technetwork/issue-archive/2011/11-may/o31adf-352561.html
Another is to define a method binding in the receiving PageDef file and configure it as explained here
http://java.net/projects/smuenchadf/pages/ADFSamplesBindings/revisions/3#SMU164
Frank -
Contextual event producer not listed as in the event map
Hi
There is a taskflow A containing a pagedef which raises a contextual event. Taskflow A resides in Taskflow B.
Consumer page has Taskflow B dropped as a region and also has a handler method to subscribe to the event. While trying to create an event map in the consumer's page def, I do not see the Taskflow B listed as a producer in the editor. Thus, I am not able to specify the relative path in the producer of the event map.
If I add wildcard as a producer , the event gets subscribed but I would like to make use of the relative path to the producer instead.
Any idea how to go about it?
Thanks.I have seen in some tutorial videos where the wiki object updates while on the editing board. I do not have this effect - and when previewing the object still has no content.!!
I have tried both ways using an article url or a keyword.
As you can see the twitter tab does not appear on the events list.
I am running Firefox 32.0.3 as a browser on a Linux OS (LinuxMint15)
thanks for your interest in the matter
Maybe you are looking for
-
Finder not working/No icons on Desktop
Hi everyone, I opened up my MacBook today, and my desktop was completely empty, all my icons, including hard drive are gone. Also, if i try clicking the Finder icon on the Dock, nothing happens, it doesn't open a window... All other applications seem
-
Moving a movieclip in a certain direction
Hi! So, i got this movie clip (say a military tank), and i have attached to it a missile by script. When the tank moves, the missile moves with it, and when the tank rotates, the missile rotates with it. Now what i want it, when i hit the space butto
-
OIM-AD-Exchange prepopulate query
Hi, We have OIM-AD-Exchange in our environment Exchange is dependent on AD When Exchange is provisioned we want to pre-popopulate "alias name" attribute with respective AD user samAccountName. To this end i will have to create a pre-populate adapter.
-
Camera connection kit ipad 2 funktioniert nicht
brauche Hilfe, mein Ipad nimmt weder meine Kamera noch Fotos über das Camera Connection Kit an, wer kann mir helfen? was mache Ich falsch?
-
Trackpad - Dragging issues?
I recently got a new Macbook Pro to replace my month old one that had a dead hard drive (Great service at the Apple store - replaced the whole laptop instead of the drive without me asking). I got home, updated the laptop to the new OS and with the n