|
Home /Java / RefGuide the Wireless Abstraction Library Back to WALL
Reference Guide
PDF version WALL tags a alternate_img b block body br caller cell cool_menu cool_menu_css document font form h1,..,h6 head hr i img input load_capabilities marquee menu menu_css option select title wurfl_device_id xmlpidtd
|
WALL reference Guide Target AudienceThis reference is made for developers who need to create wireless services for existing and future browsers.To use WALL profitably, you need to possess a smattering of HTML and XML. To add to that, knowledge of XHTML MP, CHTML and WML will be a great advantage in fine-tuning your application for specific devices. This is not strictly necessary, though. WALL is currently available for the Java SDK 1.4 platform. Familiarity with the following Java technologies is an advantage:
WALL tagsa, alternate_img, b, block, body, br, caller, cell, cool_menu, cool_menu_css, document, font, form, h1,h2,h3,h4,h5,h6, head, hr, i, img, input, load_capabilities, marquee, menu, menu_css, option, select, title, wurfl_device_id, xmlpidtd.'a' tag This element implements a link (AKA hyperlink) on the target device. Being the foundation of hypertext navigation, this standard is pretty standard on all wireless devices. The capabilities
This tag relies on the following WURFL capabilities:
'alternate_img' tag 'alternate_img' tag provides a way to multiserve pictures out of a unique image tag. For this reason, alternate_img can only be used inside an 'img'. In order to influence the actual rendering of the parent 'img' tag, a request must verify two conditions:
The 'test' attribute allows the developer to specify an arbitrary condition (for example a WURFL capability value or a condition based on such values). The 'src' attribute specifies a (typically different) image url to be used by the parent 'img' tag whenever the test condition evaluates to true. The 'nopicture' attribute issues a directive to the parent 'img' tag to refrain from rendering the picture specified in the 'src' attribute of the img tag. 'opwv_icon' can only influence the rendering of a picture for devices that support the Openwave built-in icons. If test is true, those devices will display an Openwave icon rather than the picture specified by the parent img tag. 'eu_imode_icon' and 'ja_imode_icon' work similarly to 'opwv_icon', but they apply to imode devices only.
This tag relies on the following WURFL capabilities:
'b' tag The b tag is supported by all WAP 1.X and WAP 2 devices, but it cannot be used inside anchors (hyperlinks) on WML devices. In addition, CHTML devices do not recognize the b tag (even though they typically do not crash). This tag fixes the problem by disappearing for CHTML and WML (when used inside an hyperlink). No attributes are defined for this tag This tag relies on the following WURFL capabilities:
'block' tag This element typically maps to the p tags on the different devices. This tag was introduced to multi-serve different syntaxes to align the text. Also note that either 'p' tags or block need to be used in order to serve valid WML and XHTML MP mark-up.
This tag relies on the following WURFL capabilities:
'body' tag The body tag will multiserve the body of a wireless document. This implies that for WML browsers, a WML 'card' element will be produced. Some HTML attributes are also supported. They will be:
** = may not apply to some devices This tag relies on the following WURFL capabilities:
'br' tag The br tag is supported by all devices. Alas, because of CHTML well-formdness, some devices require that 'br' is escaped (i.e.<br/>) while others actually ignore escaped 'br'. No attributes are defined for this tag This tag relies on the following WURFL capabilities:
'caller' tag Most wireless devices support a syntax of some kind to let users start a telephone call by clicking an hyperlink. Some devices do not support this feature, while some others support it but with different syntax. The 'caller' tag abstracts that away.
** = not all devices support this. This tag relies on the following WURFL capabilities:
'cell' tag 'cell' this tag only makes sense inside a coolmenu. Its task is to render tables for devices which support them and make sure that imode and WAP 1.X devices get the line breaks in the right place. No attributes are defined for this tag This tag relies on the following WURFL capabilities:
'cool_menu' tag 'cool_menu' implements advanced graphical menus a-la 'VodaLive'. With the advent of cool WAP 2.0 devices equipped with big screen colors, all of the major carriers and wireless portals have implemented cool looking entry pages to their services. Of course, those cool pages do not work the way they are on old WML devices. Coolmenus are the WALL way to implement advanced graphical menus which degrade gracefully on all devices. The power of cool menus is best exploited when used together with 'img' and 'alternate_img' tags to multiserve the graphical icons. By default, cool menus are displayed in a grid of two columns (for devices which support tables), but this can be changed by setting the 'colnum' and 'tabularize' attributes. As far as colnum, nothing prevents you from
dynamically setting the number of columns as a function
of the display width as derived from the WURFL.There are cases in which one may want to represent the menu as a list, rather than a a table. Setting tabularize to
false will make WALL generate a list of hyperlinks (each preceeded
by the picture) also for those devices which can display the menu as
a matrix.Important Note: if you explicitly set the colnum
and tabularize attributes in the cool_menu, you need to make
sure that the corresponding attributes are set with the same values
in the cool_menu_css tag.
This tag relies on the following WURFL capabilities:
'cool_menu_css' tag 'cool_menu_css' only makes a difference on XHTML MP devices. It appears that different XHTML devices display the content in each tables aligned differently on different device/browsers combination. In addition, some devices display the table left-aligned (i.e. with a bunch of unused screen space on the right), while others automatically center the table and stretch it along the full width of the display. Fortunately, WCSS can help to reconcile these differences. This tag makes sure that the CSS is rendered, but only for XHTML devices. The 'colnum' attribute is necessary to calculate the cell width to be specified by the CSS. This value must be the same as the one fed into the colnum attribute in the cool_menu tag in the same page (or the results would be unpredictable). Default value is 2 (colunms). Important Note: if you explicitly set the colnum
and tabularize attributes in the cool_menu_css, you need to make
sure that the corresponding attributes are set with the same values
in the cool_menu tag.
This tag relies on the following WURFL capabilities:
'document' tag The 'document' tag is responsible for returning the right MIME-type for the mark-up returned by WALL according to the following scheme:
Finally, there is a directive to attempt to disable caching.
This tag relies on the following WURFL capabilities:
'font' tag 'font' tag is a CHTML tag which all web programmer know. It will render virtually verbatim on CHTML devices. XHTML MP devices will use the corresponding CSS. While this is not guaranteed to work on all devices, it will degrade gracefully. WML devices will not be served any tags at all, just the content.
This tag relies on the following WURFL capabilities:
'form' tag 'form' multiserves the form element for HTML and encapsulates the info to render forms in WML compatibility mode.
This tag relies on the following WURFL capabilities:
'h1',...,'h6' tag h1...h6 tags are supported by all CHTML and XHTML devices, but not WML devices. For WML devices, the content is highlighted with the <b> tag.
No attributes are defined for this tag This tag relies on the following WURFL capabilities:
'head' tag 'head' element is simple. It encapsulate the WALL 'title' tag (to mimic HTML syntax) and can contain non-WALL meta tags. The 'head' tag is responsible for producing the top tags for each mark-up. This tag has no attributesThis tag relies on the following WURFL capabilities:
'hr' tag The hr tag is supported by CHTML and XHTML devices. Because of XHTML well-formdness, some devices require that 'hr' is escaped (i.e.<br/>) while others actually ignore escaped 'hr'. As far as WML is concerned, WLM does not support the 'hr' element (some version of the Openwave browser Version 5 actually did. Currently WALL does not take advantage of this). For WML devices hr rendered as "<br>---<br>".Please note that hr cannot be used inside a block or a form. The reason for this is that it would break well-formedness. Some devices (notably the SonyEricssons) break on this.
This tag relies on the following WURFL capabilities:
'i' tag While the i tag is supported pretty much by all devices, it cannot be used inside anchors (hyperlinks) on WML devices. This tag fixes the problem effectively, by singling out that particular case. No attributes are defined for this tag This tag relies on the following WURFL capabilities:
'img' tag The 'img' tag is apparently just a wrapper around the 'img' tag as used in the three wireless mark-ups. When used together with 'alternate_img', though, you have a powerful tool to serve different pictures to different kinds of devices.This is particularly true if you use JSTL to perform tests on WURFL conditions to select alternate values for the 'src' attribute. Having said this, 'img' itself is pretty straightforward to understand and use: just set the 'src' and 'alt' attributes. Note: This tag performs some magic when used inside a coolmenu to add line-brakes and extra space correctly.
This tag relies on the following WURFL capabilities:
'input' tag The 'input' tag is often turned into an 'input' tag also in the target mark-up. Neverthless there is quite a lot of magick going on to emulate hidden-fields, submit buttons, formats and so on. When used in WML compatibility mode, the number of legal types for the 'input' element is limited to 'text','password','hidden','submit'
** = may not be supported by some devices *** partly = CHTML lets you specify numeric mode for the keyboard **** = This applies to WML compatibility mode. Outsde of it, you can use any value ('radio' and 'check' too, for example) This tag relies on the following WURFL capabilities:
'load_capabilities' tag The 'load_capabilities' tag is needed for those who intend to use the conditional tags in the JSTL with WALL as in the example below: <c:if test="${capabilities.gif}">
Loading the capabilities is sort of expensive the first time, so it's wise to avoid that operation unless you know you need it. Invoking the load_capabilities tag will make the following
variables available for your scripting:
${capabilities.'capability_name'} = wurfl capability
${wall_markup} = xhtmlmp, wml, chtml
${brands} = list of device brands
${devices.'brand_name'} = list of devices grouped by brand
${device_id} = WURFL device_id (debugging purposes)
No attributes are defined for this tag No capabilities are queried by this tag'marquee' tag 'marquee' tag is a CHTML tag which all web programmer know. It will render virtually verbatim on CHTML devices. XHTML MP devices will use the corresponding CSS. While this is not guaranteed to work on all devices, it will degrade gracefully. WML devices will not be served any tags at all, just the content.
This tag relies on the following WURFL capabilities:
'menu' tag 'menu' implements navigation menus. The two attributes concern automatic numbering and disabling of fancy coloring for menus on devices that support that.
This tag relies on the following WURFL capabilities:
'menu_css' tag 'menu_css' producess CSS information necessary to have colorized menus for advanced XHTML MP devices. The two good background colors are derived from the WURFL (which gives you a great way to configure your look & feel on a device-by-device basis), but those values can also be overriden in the code by setting them through the two attributes.
This tag relies on the following WURFL capabilities:
'option' tag 'option' maps to 'options' tag also on the different target mark-ups. Nothing special there.
This tag relies on the following WURFL capabilities:
'select' tag 'select' maps to 'select' on target mark-ups.
** = may not be supported by some devices This tag relies on the following WURFL capabilities:
'title' tag 'title' maps to the 'title' tag for XHTML and CHTML devices. On WML browsers, this is mapped to the 'title' attribute of the 'card' element.
This tag relies on the following WURFL capabilities:
'wurfl_device_id' tag This element is useful exclusively for debugging in those cases where you wonder which device ID and USer-Agent is being inferred by the system for the current device.
No capabilities are queried by this tag'xmlpidtd' tag 'xmlpidtd' means XML Processing Instruction and DTD. This tag makes sure that the right XML headers (if any) are produced for the target mark-up. No attributes are defined for this tag
This tag relies on the following WURFL capabilities:
|