Well, you caught exactly a component that does not have much documentation about itself. It is not a very long component though, defined in roughly 300 lines. Best way to know what's exported as parameters to the events is actually using a Listener
instead of a direct event (during the probe stage) and calling a method with a breakpoint in it.
Here's what I do when I'm in a hurry (don't want to browse thru Sencha docs when available, for example):
Draw the component, the simplest the possible:
<%@ Page Language="C#" %>
<form runat="server" id="fm1">
<ext:ResourceManager runat="server" SourceFormatting="true" ScriptMode="Debug" />
<ext:Portal ID="Portal1" runat="server">
<Drop Handler="console.log('add a breakpoint here');" />
Notice I used some different settings on ResourceManager
to improve reading the results.
Add a breakpoint in the
line. In IE development tools you can move the cursor over the function and hit F9, in Chrome sometimes you have to click the lower-left curly brackets (
) button to split the lines before you can actually add a breakpoint to that line.
Trigger the event, having the breakpoint stop there. You probably have to change the example above in order to add droppable content to the portal. If in doubt, base the further code from our portal example
Switch to debugging tools' console tab/window, and experiment with the parameters exposed.
This may look like a cumbersome solution, but in many times it is the best way to know what's exposed to an event, even from the most well documented components in Sencha docs.
Of course, another source of documentation for the component is the code itself. The portal client-side code is available, from source code, the directory
. If you look at the code, you'll notice that the 'drop' event is specially particular to the component, and probably the approach above to probe the actual event object properties would be best way to query what's there.
By looking at the portal-debug.js
code also, you'll notice that it is an extension of the Ext.panel.Panel component
), so many things inside are inherited from the Panel and will be on the Sencha panel's documentation.
But again, the Drop
event is specific to the Portal, so better off with the step-by above to infer what's available to the event object at run time.
Something that may help (but the step-thru above already covers) is getting what parameter an event has. We have an example which just shows you the prototype of any event to any component: Event Listeners' Arguments
Well, this is far from the best option but I hope this helps you get thru the Portal events smoothly. That's a very specific case of a component that has been added to Ext.NET since version 1