spacer
cornerspacercorner
Reply
Occasional Contributor
RichG
Posts: 5
Registered: 11-23-2011
0 Kudos

Adding custom buttons to the main toolbar

The Web Client Configuration Guide document tells you how to customise almost any part of the web interface.

Section 1.29 explains how to add custom buttons to the toolbar.  I can't work out from the instructions where you tell the system what to do when the button is pressed.  I want to launch an admin form.

Can anyone help please?

Occasional Contributor
RichG
Posts: 5
Registered: 11-23-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

Has anybody needed to do this?

 

 

Occasional Contributor
RichG
Posts: 5
Registered: 11-23-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

Any assistance with this would be much appreciated.

Employee
Tony Wheeler
Posts: 67
Registered: 05-02-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

[ Edited ]

Hi Rich,

 

For your scenario, it sounds like all you are trying to do is launch a URL. I would refer to the Web Client configuration guide Section 4 (BPM URLs) to get the syntax of the Admin form URL you are trying to open.

 

Then in the Default.aspx page add the following under the definition of the telerick:RadToolBar around line 60:

 

<telerik:RadToolBarButton href="http://www.google.com" SkinID="MyPage" CheckOnClick="true" Group="NavItems" Text="My Page" ToolTip="My Page" />
             

(replace google's URL with the URL of your Admin form)

 

You're creating a new RadToolBarButton but there is no definition for the SkinID yet so you'll get an error if you just run it.

 

Now go to the Web\app_themes\Default\Default.skin file and find the corresponding skin definition for all those buttons around line 14 and add the following:

 

<telerik:RadToolBarButton skinid="MyPage" imageurl="Images/ListButtons/reports_off.png" HoveredImageUrl="Images/ListButtons/reports_on.png" CheckedImageUrl="Images/ListButtons/reports_on.png" ImagePosition="AboveText" runat="server" />

 

After saving both files (Default.aspx and Default.skin) your button should now be clickable with 2 states. When you click it, google should open in a new window. You can change the images for the button states or add javascript to your liking.

 

*Edit * I just looked and it is not opening in a new window but you can play around with the link to get it to open in a different window.. ie target="_blank".

 

Capture.JPG

Capture1.JPG

Capture2.JPG

Occasional Contributor
RichG
Posts: 5
Registered: 11-23-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

[ Edited ]

Thanks for the reply, I tried to launch a new window using your suggested solution but couldn't get it to open in a new window.

 

Instead I've used this which seems to work:-

 

<telerik:RadToolBarButton NavigateUrl="http://<Server Name>/Metastorm/eForm.aspx?Map=eService_Desk&Client=External&Action=MDDC_Log_Call" target="_new" SkinID="MyPage" CheckOnClick="true" Group="NavItems" CommandName="MyPage"
          Text="Log New Call" ToolTip="Log New Call" />

 

But when the new window opens I get a message in the background :- "Nullable object must have a value."

 

Do you have any idea how I can avoid this?

Screen shot.jpg

 

Kind Regards


Rich

 

 

 

 

Employee
Tony Wheeler
Posts: 67
Registered: 05-02-2011
0 Kudos

Re: Adding custom buttons to the main toolbar

[ Edited ]

Can you try it while leaving <CommandName="MyPage"> off?

 

Edited * Okay I just tested this and what you want to do is set  CheckOnClick="false"  and leave off the CommandName="MyPage" entirely... ie:

 

<telerik:RadToolBarButton NavigateUrl="http://<Server Name>/Metastorm/eForm.aspx?Map=eService_Desk&Client=External&Action=MDDC_Log_Call" target="_new" SkinID="MyPage" CheckOnClick="false" Group="NavItems" Text="Log New Call" ToolTip="Log New Call" />

Valued Contributor
Greg
Posts: 179
Registered: 05-19-2010
0 Kudos

Re: Adding custom buttons to the main toolbar

Hello

 

I want to fallow Metastorm BPM 9.1 SR1 WebClient Configuration Guide, and I Want to have embedded my external URL inside List interface on Content Viewer.

 

In default.aspx I have:

            <telerik:RadToolBarButton SkinID="MyPage" CheckOnClick="true" Group="NavItems"
                CommandName="MyPage" Text="GoogleInside" ToolTip="GoogleInside" />

 

In default.skin I have:

    <telerik:RadToolBarButton skinid="MyPage" imageurl="Images/ListButtons/gl_on.png" HoveredImageUrl="Images/ListButtons/gl_on.png" CheckedImageUrl="Images/ListButtons/gl_on.png" ImagePosition="AboveText" runat="server" />

 

In default.aspx.cs I have:


// Put here logic for any custom content.

if (!(currentControl is ContentViewer))
{
ContentViewer myViewer = new ContentViewer();
myViewer = new ContentViewer() { Location = "http://www.google.com" };
myViewer.Enabled = true;
newControl = myViewer;
newControl.ID = newControl.GetType().Name + "_" + checkedGroupButton.CommandArgument;
MyNewControlPlaceHolder.Controls.Add(newControl);

}
break;

 

But I have the same message about nullabe object.

How can I do this without need of opening conent in new window?

Valued Contributor
Greg
Posts: 179
Registered: 05-19-2010
0 Kudos

Re: Adding custom buttons to the main toolbar

I found problem.

Everything works fine if we will try-catch the line above:
 ListType = listType.Value;

but this looks like it is not used at all :smileyhappy: so comment this also works fine :smileywink:

line spacer line
spacerFollow Metastorm on:
spacer Twitter YouTube Blog iTunes LinkedIn Metastorm Community Central, MC2
spacer Copyright © 2011 OpenText Corporation. All Rights Reserved.spacer About Metastormspacer Privacyspacer Legalspacer Site Mapspacer RSSspacer Contact Us
Microsoft Gold Certified Partner
Powered by Windows Azure
line spacer line