Entering content frame

Function documentation isTableSupported Method Locate the document in its SAP Library structure

Use

The isTableSupported method specifies whether or not a mobile device can interpret the <table> tag, so multiple columns can be displayed side by side.

Features

Tables are a crucial element for the clear layout of Web applications. It is essential that you define the number of columns in a table using the tag attribute columns.

For example, there are mobile devices that can only display one column on each page. So, for example, WAP-enabled Nokia devices do not interpret tables in the usual way. For these devices, the value is set to false, because the contents of the columns are not displayed side by side but below one another. The layout becomes too complex and you can no longer correctly assign the column values.

However, an Openwave browser displays the tables in the usual way – that is, it displays columns side by side.

If a mobile device does not meet the condition, because it does not support the <table> tag, another display type for the structure of the Web application should be selected (see example). For some devices, you can use lists instead of tables.

Example

The following JSP example shows one way of how to use the isTableSupported method for the customization of Web applications.

<%@ page import="com.sap.mobile.clientinfo.*" %>
<%
ClientInfoFactory factory = ClientInfoFactory.newInstance();
ClientInfo clientInfo = factory.newClientInfo();
clientInfo.load(request);
%>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "
http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="main" title="table">
<p>
<% if clientInfo->getTableSupported() == true; { %>
<table columns="3">
<tr> <td>Rome</td><td>sunny</td><td>28&#176;C</td> </tr>
<tr> <td>Berlin</td><td>cldy</td><td>21&#176;C</td> </tr>
<tr> <td>Oslo</td><td>rain</td><td>15&#176;C</td> </tr>
</table>
<% } else { %>
<%= clientInfo->getDefaultBullet(); %>Rome<br/>
sunny 28&#176;C<br/>
<%= clientInfo->getDefaultBullet(); %>Berlin<br/>
cloudy 21&#176;C<br/>
<%= clientInfo->getDefaultBullet(); %>Oslo<br/>
rain 15&#176;C<br/>
<% } %>
</p>
</card>
</wml>

ClientInfo Interface

Leaving content frame