Sample Dashlets

This section collects a set of sample dashlets you can copy and adjust to implement your own needs.

Display hello message

Hello <b>$user.fullName</b>

This basic dashlet of type custom content displays an hello message.

Select documents with a specific extended attribute

 from Document d join d.attributes v
where d.workflowStatus='Revision'
and d.creatorId in (1,114,113,116)
and v.stringValue='Acme'
and key(v) = 'Buyer'
order by desc

This dashlet of type documents select all the documents that match these criteria:

  • creator user must be identified by 1, 114, 113 or 116
  • workflow status must be Revision
  • the extended attribute Buyer must be Acme

List all the invoices with a custom visualization

#set($documentDao = $ContextTool.getBean("DocumentDAO"))   
#set($invoices = $documentDao.findByWhere('',' desc',10))
<table border="1">
#foreach( $doc in $invoices)

This dashlet of type custom content renders an HTML table with all the invoices(those documents with template identified by 547815424).