...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<client:format id="custom"> <!-- set column widths for columns in a specific data --> <data id="ar_property_details"> <column id="PropNo" width="20"/> <column id="OwnerName" width="200"/> </data> <data id="ar_road_details"> <column id="Status" width="10"/> </data> <!-- set column width globally for columns in any data --> <column id="RoadName" width="200"/> <column id="RoadType" width="50"/> <column id="Suburb" width="250"/> </client:format> <client:config id="test"> <!-- there should be other config items here --> <view id="com.cohga.html.client.main.gridView"> <label>Data</label> <location>center.south</location> <toolbar> <!-- toolbar items go here --> </toolbar> <!-- override formatting --> <format ref="custom"/> </view> </client:config> |
Date and Time formatting
You can also change the default date, time and date/time format by setting adding dateformat, timeformat and/or datetimeformat entries to the <data> section of the <defaults> section in the client config.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<client:config id="test">
...
<defaults>
...
<data>
<dateformat>Y-m-d</dateformat>
<timeformat>H:i:s</timeformat>
<datetimeformat>Y-m-d H:i:s</datetimeformat>
</data>
...
</defaults>
</client:config>
|
Place-holders
name | value | format |
d | Day of Month | Numeric, 2 digits, left padded |
D | Day of Week | Text, long |
j | Day of Month | Numeric |
l | Day of Week | Text, short |
N | Day of Week | Numeric, 1=Monday, 7=Sunday |
S | Day of Month Suffix | Text, 'st', 'nd', 'rd', 'th' |
w | Day of Week | Numeric, 0=Sunday, 6=Saturday |
z | Day of Year | Numeric |
W | Week of Year | Numeric, 2 digits, left padded |
F | Month | Text, long |
m | Month | Numeric, 2 digits, left padded, January=01 |
M | Month | Text, short |
n | Month | Numeric, January=1 |
t | Days in Month | Numeric |
Y | Year | Numeric, 4 digits |
y | Year | Numeric, 2 digits |
a | am/pm | Text |
A | AM/PM | Text |
g | Hour | 12 Hour, Numeric |
G | Hour | 24 Hour, Numeric |
h | Hour | 12 Hour, 2 digits, left padded |
H | Hour | 24 Hour, 2 digits, left padded |
i | Minute | Numeric, 2 digits, left padded |
s | Second | Numeric, 2 digits, left padded |
u | Milli-Second | Numeric, 3 digits, left padded |
T | Timezone | String |