If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
arvestal
Posts: 5
Registered: ‎01-15-2009
My Device: Not Specified

Command server control renders as a button instead of link

Hi,

I have a few mobile:Command controls on my page where the Format property is set to Link.  On the Iphone, Google phone, treo with palm or windows OS, it renders as a Link, but on the BlackBerry curve it renders as a button.

 

any help would be appreciated.

 

Thanks, Allen

Please use plain text.
Guru I
Xandrex
Posts: 18,380
Registered: ‎07-29-2008
My Device: Z10 10.1.0.2312 / Playbook 2.1 / 8900 5.0
My Carrier: Vodafone France (SFR) & B&You

Re: Command server control renders as a button instead of link

is this part of HTML ?
there are no properties in HTML. Only attributes.
Properties are for CSS.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Please use plain text.
New Developer
arvestal
Posts: 5
Registered: ‎01-15-2009
My Device: Not Specified

Re: Command server control renders as a button instead of link

In .net there are mobilecontrols.  one of the server controls is called Command.  In this Command control it has a few properties, one of which is called Format.  You can assign it two values, either Button or Link.  When I choose Link, it is supposed to render the button as a Link.  This works fine for the Google, Treo (palm and windows os) and IPhone.  It doesn't work for the blackberry curve.  I was wondering why or what I need to do to make it work.  Currently functionality works fine, it just renders as a button instead of a Link.

 

thanks, allen

Please use plain text.
Guru I
Xandrex
Posts: 18,380
Registered: ‎07-29-2008
My Device: Z10 10.1.0.2312 / Playbook 2.1 / 8900 5.0
My Carrier: Vodafone France (SFR) & B&You

Re: Command server control renders as a button instead of link

okay so that's the name of the tool you use to create a webpage. Since, I don't know what tool and maybe it's got a bug.
did you verify that the output is valid as to the HTML 4.01 specification ?



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Please use plain text.
New Developer
arvestal
Posts: 5
Registered: ‎01-15-2009
My Device: Not Specified

Re: Command server control renders as a button instead of link

this is what the source looks like when i view source.

 

snippet....

 

<div class="bottom-links">
            <ul>
                <li><span>View Site in:</span></li>
                <li class="activelink">
                    <a href="/Default.aspx">Mobile Home</a>
                </li>
                <li><a href="javascript&colon__doPostBack('footer$ctl00$cmdFoobar','Form1')">Foobar</a></li>
                <li><a href="javascript&colon__doPostBack('footer$ctl00$cmdSomeLinkHere','Form1')">some link here</a></li>
            </ul>
        </div>

 

for some reason, the blackberry curve renders the last two <a href> tags as buttons when they are clearly anchor tags.

 

the markup on the page is:

 

<mobile:Panel Runat="server" ID="css">

<mobile:DeviceSpecific ID="cssDeviceSpecific" Runat="server">

<Choice Filter="isHTML32" Xmlns="http://schemas.microsoft.com/mobile/html32template">

<ContentTemplate>

<div class="bottom-links">

<ul>

<li><span>View Site in:</span></li>

<li class="activelink">

<mobile:Link ID="linkMobile" Runat="server" Text="Mobile Home" NavigateUrl="~/Default.aspx" BreakAfter="false" />

</li>

<li><mobile:Command ID="cmdFoobar" Runat="server" Text="<%$ Resources:GlobalResources, FoobarAltText %>" Format="Link" OnClick="cmdFoobar_Click" BreakAfter="false" /></li>

<li><mobile:Command ID="cmdSomeLinkHere" Runat="server" Text="<%$ Resources:InternalFooter, LinkSomeLinkHere %>" Format="Link" OnClick="cmdSomeLinkHere_Click" BreakAfter="false" /></li>

</ul>

 </div>

</ContentTemplate></

Choice>

</mobile:DeviceSpecific>

</mobile:Panel>

 

Notice that the last two li tags are the mobile:Command control where the Format property is set to Link.  Again, this works fine on most html phones i've tried besides the BlackBerry curve.  I have not tried it on other Blackberry products since I dont' have those phones to test with.

Please use plain text.
Guru I
Xandrex
Posts: 18,380
Registered: ‎07-29-2008
My Device: Z10 10.1.0.2312 / Playbook 2.1 / 8900 5.0
My Carrier: Vodafone France (SFR) & B&You

Re: Command server control renders as a button instead of link

hello,

opening the page using your Blackberry browser, you can see the actual source code computed and delivered to your device.
you just type Alt-RBVS.
can you copy / paste here the same snippet as what you copied in your message ?

because what you have pasted seems strange. See the javascript&colon__ thing ? There should be a ; after the &colon


about the fact that you don't have many devices, you can install on your PC several Blackberry devices emulator for free. meaning you can easily test on a Pearl, a curve and a Bold at the same time.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Please use plain text.
New Developer
arvestal
Posts: 5
Registered: ‎01-15-2009
My Device: Not Specified

Re: Command server control renders as a button instead of link

i think the forum encoded my copy and paste.  you are correct that is a ; since i took it directly from what is being render from the browser.

 

how to do setup these emulators?  I tried to download them but when i launch the phone, it doesn't connect to any website i try to go to.

 

 

Please use plain text.
Administrator
MSohm
Posts: 14,362
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Command server control renders as a button instead of link

In order to use the BlackBerry Browser in the BlackBerry Simulator you also need to install and run the MDS Simulator.  You can download it here:  http://na.blackberry.com/eng/developers/browserdev/devtoolsdownloads.jsp
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
agurovij
Posts: 2
Registered: ‎03-20-2009
My Device: Not Specified

Re: Command server control renders as a button instead of link

I have the same problem with the button command instead of the link that should appear. Could you solve it finnally?
Please use plain text.
New Developer
arvestal
Posts: 5
Registered: ‎01-15-2009
My Device: Not Specified

Re: Command server control renders as a button instead of link

No, I was not able to solve this.  When I loaded up the emulators for the blackberry and actually viewed the source it was, for some reason, rendering the command button with the Format of Link as a input button even though any other browser, IE 6-8, FF, Safari and Chrome render it as a link.  Even the phones I've tested, IPhone, Treo with windows and palm, Google Phone and a view others render this correctly.

 

Let me know if you find a fix, I haven't really messed with it since it is functionally correctly and is just a UI bug.

Please use plain text.