How to add an event to a Custom Control in Lotus Domino XPages? - lotus

I'm developing an Lotus XPages solution. I have a Custom Control that I would like to have additional functionality in the form of an event call-back.
Is it possible to create a JavaScript callback or event in a custom control? What I'd really like is to add events to one of my controls, something like OnSomething or querySomething and postSomething, so that when the event is fired, the code at the calling end is properly called.
Can it be done??
Thanks!

Related

Execute custom code in CRM

Is there a way I can execute custom code in c# when a user clicks a button in the CRM application? I would like it a synchronous and asynchronous approach.
Actually something like when putting a button on a webform with a wired code behind click event handler.
And how can I add a button?
I want to display a list of report views the customer has assembled and access the report data in the CRM database.
It seems so complicated with CRM!
Here's an example of a custom workflow with a bunch of XAML. I dont know where they got it from.
Sample: Create a workflow in code
One way to go about it:
Use Ribbon WorkBench add add a button to the form. Only supported way of adding buttons to CRM is by editing ribbon XML.
Add an on click JavaScript Event Handler.
Call an Action which can be used to call a custom workflow where you can perform business logic.

How to make parent component to listen, events fired by child components using eventbus in gwt

I have a custom panel with a couple of components, eg. a button and a text box.
Once the button is clicked I would like custom panel that is also the parent panel receives the event and decides what to do, like call setText on the textbox.
Is it possible to achieve this using an eventbus ?
This means that the child components need not handle their event and then relay it.
I don't know the exact classes and how they work together. But sure you could use the GWT EventBus to achieve this. Fire an event in your button class and handle this event in your custom panel. You can google or find related answers here on stackoverflow.
I think this answer will help you: How to use the GWT EventBus
It's pretty simple to fire events and handle this events in other classes in your application.

Attach event handler to KendoUI widget (View)

I am attempting to work an existing web app to use Kendo (Mobile) UI widgets.
All of the existing javascript code base is contained within AMD modules (RequireJS).
I would like to attach a 'show' event handler to a view, so that the app can request data from the back end, however the data logic is within a module, and cannot be called from the page script (and thus, I can't use Kendo data-event attributes).
I thought that I would be able to to attach an event handler in code like so:
$('#tabstrip-browse').on("show", function(e) {...});
however, the event handler is not called.
Is there a way to do this?
Seems I'm finally able to answer my own question
My issue was that I was trying to use jQuery event binding syntax to bind to the events, however, KendoUI does not expose events in a jQuery friendly/compliant way.
However, there is a way to do this using the KendoUI API
There is no standard 'show' event in javascript or jQuery. You can bind custom events, but you need to also include a way to trigger them.
Here's a trivial example:
// bind the custom event
$('#element').on('show', function(e) {
// handle the custom event
});
// trigger the custom event
$('#element').trigger('show');
There is an attach event on Durandal
https://groups.google.com/forum/#!topic/durandaljs/UQ9hXpwP_ds

WP7 should we add event handler in XAML?

I 've seen many WP7 applications, some place event handlers in code, some place event handlers in XAML
Should we add event handler in XAML?
Does that handler automatically unsubscribe to the event when the page is navigated from ?
You can do either, it really doesn't matter! And no, you do not have to worry about adding / removing event handlers when the user navigates from one page to the next. When a page is no longer needed, it is destroyed.
The only time you might want to handle things differently is if you are using the MVVM pattern, when you might want to use commands rather than event handlers.

Using custom form in Outlook when creating a new mail message

I want to create a custom form in Outlook 2007 and then have that form be the form that comes up when the user clicks New / Mail Message in the toolbar. Is there a way to do that? I know how to create the custom form, but I don't know how to change what the menu item does.
Jon
If you are using an outlook form you can publish it to the Organizational Forms Library and the get you clients to use that new custom form instead of the default out the box form. It a registry change that points it to a new form. There are tools to do this change for you.
A good example http://www.petri.co.il/customizing_new_meeting_request_outlook_form.htm
76mel
There is a great tutorial by Ty Anderson on that located at devx on replacing the standard AppointmentItem inspector with a custom form.
Basically, you need to write code that gets triggered on the NewInspector event and display your form instead and cancel the standard inspector.

Resources