Skip to content

Instantly share code, notes, and snippets.

SelectElement get _outputItems => _root.query('#outputitems');
void update(Event e) {
List<OptionElement> currentOptions = _outputItems.options;
for(final currentOption in currentOptions){
if(currentOption.selected){
//do something here
}
}
}
import org.springframework.beans.BeanUtils;
import com.datacert.core.notifications.model.impl.EmailTemplate;
println entity.medLcrVersion.code
if(!"Initial - Draft".equalsIgnoreCase(entity.medLcrVersion.code) && !entityService.isNewInstance(entity)) {
println 'about to send email...'
def parent = queryService.query("Matter",queryService.and().add(queryService.property("medLcr.id").eq(entity.id))).first();
def customTemplateEngine = applicationContext.getBean("customTemplateEngine");
def configService = applicationContext.getBean("configurationService");
def emailService = applicationContext.getBean("emailService");
package com.datacert.apps.mattermanagement.integration;
import com.datacert.core.util.Logger
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.AllFileSelector;
import org.apache.commons.vfs2.FileSystem;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileSystemManager;
import org.gmock.GMockTestCase
group.add(SearchRestriction.isNull("description"));
/*
* Method will accept a Map, and populate a template
* Each child element (blocks and variables) will be processed as well
* as any <included> directives
* In case processing takes some significant time, we leverage a Future
*/
Future<String> render(Map data){
var completer = new Completer();
String result = content;
List futuresPending = new List();
#import('../ThirdParty/dartwatch-JsonObject/JsonObject.dart');
class Stooge extends JsonObject{
Stooge(name, addresses):super(){
this.name = name;
this.addresses = addresses;
}
//List<Address> addresses;
//String name;
}
#import('../ThirdParty/dartwatch-JsonObject/JsonObject.dart');
class Stooge extends JsonObject{
Stooge(this.name, this.addresses);
List<Address> addresses;
String name;
}
class Address extends JsonObject{
Address(this.city);
String city;
@iggymacd
iggymacd / NotFoundHandler.dart
Created April 30, 2012 18:40
Sample NotFound Handler
class NotFoundHandler {
NotFoundHandler(){
}
List<int> _notFoundPage;
static final String notFoundPageHtml = """
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
@iggymacd
iggymacd / FileHandler.dart
Created April 30, 2012 18:39
Sample FileHandler
class FileHandler {
FileHandler(){
}
void onRequest(HttpRequest request, HttpResponse response, [String fileName = null]){
final int BUFFER_SIZE = 4096;
if (fileName == null) {
fileName = request.path.substring(1);
}
import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang.exception.ExceptionUtils;
import com.mitratech.teamconnect.base.BQGroupAccess;
import com.mitratech.teamconnect.base.YQGroup;
import com.mitratech.teamconnect.base.factory.GQGrupStore;
import com.mitratech.teamconnect.entity.BNEnterpriseObject;
import com.mitratech.teamconnect.entity.BNGroupAccess;