cancel
Showing results for 
Search instead for 
Did you mean: 

LoadingAnimation

yanick_matte
Explorer
0 Kudos

Did anybody have used the control LoadingAnimation in PDK 2.0.

If yes can you explain how you use it.

Thank you

Accepted Solutions (0)

Answers (3)

Answers (3)

yanick_matte
Explorer
0 Kudos

I dont know what I did wrong but when I click on the button I cannot see the loading animation.

This is a copy of my component.

Private Sub Button1_Action(ByVal sender As System.Object, ByVal e As SAP.Web.UI.Controls.AbstractButton.ActionEventArgs) Handles Button1.Action

System.Threading.Thread.Sleep(10000)

label1.Text = "OK"

End Sub

<%@ Control language="vb" Codebehind="PortalComponent1.ascx.vb" AutoEventWireup="false" Inherits="testanimation.PortalComponent1" targetSchema="http://schemas.microsoft.com/intellisense/ie5" %>

<%@ Register TagPrefix="sap" Namespace="SAP.Web.UI.Controls" Assembly="SAP.Web, Version=1.2.0.0, Culture=neutral, PublicKeyToken=50436dca5c7f7d23" %>

<!%@ PortalComponent name="PortalComponent1" %>

<LINK href="C:\Program Files\SAP\Portal Add-in for Visual Studio 2003\Controls\ur\ur_design.css"

type="text/css" rel="stylesheet">

<body class="prtlBody" xmlns:sap="urn:http://schemas.sap.com/SAP.Web.UI.Controls">

<P>

<sap:Button id="Button1" Text="Button" runat="server" <b>BUTTONCLICK="sapUrMapi_LoadingAnimation_trigger();</b>"></sap:Button>

<sap:LoadingAnimation id="LoadingAnimation1" Text="LoadingAnimation" runat="server"></sap:LoadingAnimation></P>

<P>

<sap:Label id="Label1" Text="Label" runat="server"></sap:Label></P>

</body>

Former Member
0 Kudos

Hi Yanick,

What portal version are you using?

PDK 2.0 officially works with SP15 or higher (which might explain your problem...).

Regards,

Ofer

yanick_matte
Explorer
0 Kudos

I have SP11.

You are probably right thank you for your help.

yanick_matte
Explorer
0 Kudos

Thank you for your help Reshef, I am using vb.net did you have an equivalent for sapUrMapi_LoadingAnimation_trigger( ).

thank you

Former Member
0 Kudos

Hi Yanick,

"sapUrMapi_LoadingAnimation_trigger" is a JavaScript function, to be executed by the browser in run-time, upon the user's click of the button (alongside the submitting of the page).

So, you can use Reshef's sample also in VB.NET, without any change.

Regards,

Ofer

Former Member
0 Kudos

Hi Yanick,

In order to use the loading animation control first of all, drag it to the design pane.

The loading animation control appears as a place holder in design time.

Then, assuming that u have a button named Button1 who is in charge of submiting the portal component to the server, add a call to the

sapUrMapi_LoadingAnimation_trigger( );

client-side function to its BUTTONCLICK scripting event.

The html representation will look as follows:

<sap:Button id="Button1" runat="server" Text="Button" BUTTONCLICK="sapUrMapi_LoadingAnimation_trigger( ); "></sap:Button>

This will cause the loading animation to appear on the client while the portal component is processed on the server. U can test it by adding a code such as

System.Threading.Thread.Sleep(10000);

to the button's server-side event handler.

Reshef