Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

 

Description

The data wall widget provides an alternative way of presenting a collection of entities than is provided by die the map or table widgets. 

The example below describes the functionality that is provided by this widget. In addition, the widget can be hidden using visibility bindings.

 

 

Example

Code Block
languagexml
titleView XML
linenumberstrue
<wall title="wall_title.tickets" defaultSort="receivedTime" commentHandler="handleComment">
    <collectionSource function="getUnresolvedTickets"/>
    <itemTitle value="getTicketTitle"/>
    <itemText value="getTicketText"/>
    <itemTime value="getTicketTime"/> 
    <itemIcon value="getTicketIcon"/>
    <itemAction label="wall_action.resolve" action="resolveTicket" />
    <itemAction label="wall_action.delete" action="deleteTicket" />
</wall>
Code Block
languagejava
titleBacking unit
linenumberstrue
void handleComment(string comment) {
    logComment(comment);
}

string getTicketTitle(SupportTicket ticket) {
    return ticket.senderNumber;
}

string getTicketText(SupportTicket ticket) {
    return ticket.text;
}

datetime getTicketTime(SupportTicket ticket) {
    return ticket.receivedTime;
}

string getTicketIcon(SupportTicket ticket) {
    return "Person";
}
 
SupportTicket[] getUnresolvedTickets() {
    return SupportTicket:and(
        equals(spam, false), 
        equals(resolved, false)
    );
}

void resolveTicket(SupportTicket ticket) {
    ticket.resolved = true;
    ticket.save();
}

void deleteTicket(SupportTicket ticket) {
    ticket.spam = true;
    ticket.save();
}
Info

 

In addition to the example above, item GPS coordinates can also be represented in the data wall widget. This is achieved in the same way as many other elements of the data wall:

Code Block
languagexml
titleView XML
linenumberstrue
<itemLatitude value="getTicketLat"/>
<itemLongitude value="getTicketLong"/>
Code Block
titleBacking unit
linenumberstrue
getTicketLat(SupportTicket ticket) {
    return ticket.lat;
}

getTicketLong(SupportTicket ticket) {
    return ticket.long;
}

 

This provides an additional icon being displayed as well as an action that is triggered by clicking the icon. The screenshots below demonstrates this:

Info

Info

 

 

 

Automatic Refresh

The data wall widget allows a time interval between 30 and 1800 seconds to be specified at which point the contents of the wall is refreshed without the need for any user intervention. This is specified using the refreshIntervalSeconds attribute.

Code Block
languagexml
linenumberstrue
<wall title="wall_title.tickets" defaultSort="receivedTime" commentHandler="handleComment" refreshIntervalSeconds="30">
.
.
.
<wall>

 

 

 

Additional Mentions and References