User-1819217823 posted
We have noticed that our applications when accessed by WML devices don't render the numbers for our list controls, thus forcing the user to scroll vs. hitting a number to select the item they want. I have traced it down to the following in our config files:
<mobileControls
cookielessDataDictionaryType="System.Web.Mobile.CookielessData">
<device
name="TestWmlAdapters"
inheritsFrom="WmlDeviceAdapters">
<control
name="System.Web.UI.MobileControls.Label"
adapter="Test.Mobile.Adapters.WmlLabelAdapter, Test.Mobile.Adapters, Version=1.1.6087.0, Culture=neutral, PublicKeyToken=Null"
/>
</device>
</mobileControls>
this strikes me as odd since we are not overriding the default List control, if I simply define the node as:
<device
name="TestWmlAdapters"
inheritsFrom="WmlDeviceAdapters"/> the same behavior
occurs.
I have also put the following line in the code to see if the list adapter changed based on having the section defined or not:
List1.Items.Add(
new
MobileListItem(this.List1.Adapter.ToString()));
in both cases I got the follwoing for the adapter type:
System.Web.UI.MobileControls.Adapters.WmlListAdapter
using a WML emulator I have verified that the generated mark up is differnt,
The following is the working mark up:
<HTTP-raw> Select a team:<do type="accept" label="Go"><go href="http://forums.asp.net/AddPost.aspx?ForumID=48#__pbc2"><setvar name="mcsvt" value="List1"/><setvar name="mcsva" value="$(List1)"/></go></do><select
name="List1"><option value="0">Dunes</option><option value="1">Phoenix</option><option value="2">Eagles</option><option value="3">Zodiac</option></select></p></card>
The following is the none working mark up
<HTTP-raw> Select a team:<br/>
<HTTP-raw> <anchor title="Dunes">Dunes<go href="http://forums.asp.net/AddPost.aspx?ForumID=48#__pbc2"><setvar name="mcsvt" value="List1"/><setvar name="mcsva" value="0"/></go></anchor><br/>
<HTTP-raw> <anchor title="Go">Phoenix<go href="http://forums.asp.net/AddPost.aspx?ForumID=48#__pbc2"><setvar name="mcsvt" value="List1"/><setvar name="mcsva" value="1"/></go></anchor><br/>
<HTTP-raw> <anchor title="Go">Eagles<go href="http://forums.asp.net/AddPost.aspx?ForumID=48#__pbc2"><setvar name="mcsvt" value="List1"/><setvar name="mcsva" value="2"/></go></anchor><br/>
<HTTP-raw> <anchor title="Go">Zodiac<go href="http://forums.asp.net/AddPost.aspx?ForumID=48#__pbc2"><setvar name="mcsvt" value="List1"/><setvar name="mcsva" value="3"/></go></anchor></p></card>
Any suggestions as to why simply defining adapters to use would cause the default WMLList adapter to render differently?