« [Tip] SubEthaEdit for Servoy | Main | [Tip] Export more than 10,000 rows with sample data »
September 13, 2006
[Tip] Quick tips with Web Client 3.0
by Bob Cusick
Servoy USA
If you are considering creating a application that will work well in both the Smart Client and the Web Client (and who isn't?? ) - I've come up with some helpful tips that will hopefully save you a lot of time.
NOTE: These tips are applicable with version 3.0RC4 ONLY. I'll modify them if the behaviour changes before release.
1. DO NOT use application.formInDialog() - go to the form instead. You can
simulate a dialog - by using a tabless tabpanel - and showing the form in
there (don't forget to use controller.readonly = true for the underlying
form before you show the "dialog" tabpanel - or the user can edit the fields
underneath the "dialog" tabpanel).
2. DO use application.getApplicationType() to tell if you're running in web
client or not.
3. For LISTS - use TABLE VIEW, not Listview. Listview is not supported - and
if you use a listview - you'll see only one row (the height of the body
section).
4. On LISTS - if you set the fields to non-editable - there will be no
"record selection" event - that means no backgroundrowcolor, no firing of
the "onRecordSelection" event.
5. On LISTS - in SC the height of the line will be equal the SMALLEST item,
in WC its the BIGGEST item (so size all your items with the same height - to
remain consistent in SC &WC).
6. DO USE STYLES for all types of fields/labels
7. Keep in mind that the size of the underlying form will determine whether
or not you will see scroll bars in WC.
8. When showing forms in tabpanels, make sure that the underlying form is
less wide than the tabpanel.
9. When displaying HTML in a HTML area - DO NOT use your own
tags in the HTML - in WC it will render incorrectly. Just use for WC
HTML areas - and the style of the label/field will determine the overall
font/size
10. DO NOT use .png graphics - use transparent GIFs if you want them to
appear transparent in IE6.
11. If you have regular buttons that are marked as "transparent" - they will
be rendered with the square look (shadow below and right). If you UNCHECK
the "transparent" property - then they will render as "regular" buttons in
WC.
| Posted by David Workman on September 13, 2006 at 10:24 AM in Tips | Permalink