Setting the EventAlias and EventNameSpace
There are two ways that the EventAlias and EventNameSpace properties can be set, depending on whether you create result viewers with the result viewer web parts (located in the Business Portal web part gallery) or use HTML.
Using the result viewer web parts
When you create a publishing result viewer with a result viewer web part (from the Business Portal web part gallery), its EventAlias property is set when you configure the web part. For example, when you choose the Configure Publishing button, a list of entities will be displayed. Select an entity from the list. The publisher’s EventAlias property will be set to the alias of the data permission for the entity.
After you select an entity, you must select the alternative method option, as shown.
When you create a subscribing result viewer with a result viewer web part (from the Business Portal web part gallery), its EventNameSpace property is set when you configure the web part. For example, when you choose the Configure Subscribing button, a list of entities will be displayed. Select an entity from the list. The subscriber’s EventNameSpace property will be set to the fully-qualified name of the selected entity.
After you select an entity, you must select the alternative method option, as shown.
Using ASP, ASPX, or HTML
If you create result viewers using ASP, ASPX, or HTML code, you must set the EventAlias and EventNameSpace properties directly in the code. The EventAlias must be set to the alias of the data permission whose key values will be published when the event occurs. This property can be set as an attribute of the code used to create a publishing result viewer. The following HTML code shows how to set this property for a Primary Publishing List.
<body style="margin:0"> <PPL:Primary id="PPL1" EventAlias="Lead" HasFind="true" HasHeader="true" QueryServiceURL="/BusinessPortal/QueryWebService.asmx?WSDL" OnReady="OnPPL1Ready()" InitialQuery="/BPSDK Sample Queries/Leads" /> </body>
Refer to Finding a Data Permission Alias for information about finding the alias for a data permission. |
The EventNameSpace property can be set as an attribute of the code used to create a subscribing result viewer. It must be set to the fully-qualified name of the entity whose property values the subscriber expects to receive when an event occurs. For example, if the subscriber is expecting to receive the Lead entity’s LeadID property, its EventNameSpace property must be set to BPSDK.Sample.Lead, the fully-qualified name of the entity.
The following HTML code shows how to set this property for a Form Viewer.
<body style="margin:0"> <FORM:Form id="Form1" EventNameSpace="BPSDK.Sample.Lead" OnReady="OnForm1Ready()" QueryServiceURL="/BusinessPortal/QueryWebService.asmx?WSDL" InitialQuery="/BPSDK Sample Queries/Lead Details" /> </body>