This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FileBean { | |
private UploadedFile file; | |
public void setUploadedFile(UploadedFile file) { | |
this.file = file; | |
} | |
public UploadedFile getUploadedFile() { | |
return file; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyPage { | |
@Inject | |
private DynamicTemplateParser parser; | |
public DynamicTemplate getMyDynamicTemplate() { | |
// if you want this to come from a string you might need to | |
// implement a StringResource by extending AbstractResource | |
Resource resource = new ClasspathResource("path/to/some-template.tml"); | |
return parser.parseTemplate(resource); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface BlockContainer { | |
void addBlock(Block block); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppModule { | |
public static BeanModelSource decorateBeanModelSource(BeanModelSource defaultImpl) { | |
return new MyBeanModelSource(defaultImpl); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sandbox.junit; | |
import org.junit.runner.Description; | |
import org.junit.runner.Result; | |
import org.junit.runner.notification.Failure; | |
import org.junit.runner.notification.RunListener; | |
import org.junit.runner.notification.RunNotifier; | |
import org.junit.runner.notification.StoppedByUserException; | |
import org.junit.runners.BlockJUnit4ClassRunner; | |
import org.junit.runners.model.InitializationError; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConverterGridDataSource implements GridDataSource { | |
private final GridDataSource delegate; | |
private final Converter converter; | |
public ConverterGridDataSource(GridDataSource delegate, Converter converter) { | |
this.delegate = delegate; | |
this.converter = converter; | |
} | |
public int getAvailableRows() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
207.61.224.54 - - [06/Jan/2014:05:44:15 +0000] "GET / HTTP/1.1" 200 606 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/6.1.1 Safari/537.73.11" | |
207.61.224.54 - - [06/Jan/2014:05:44:16 +0000] "GET /assets/1.0-SNAPSHOT/tapestry/default.css HTTP/1.1" 200 2089 "http://tapestry-atmosphere.uklance.cloudbees.net/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/6.1.1 Safari/537.73.11" | |
207.61.224.54 - - [06/Jan/2014:05:44:16 +0000] "GET /assets/1.0-SNAPSHOT/ctx/bootstrap/css/bootstrap.css HTTP/1.1" 200 17911 "http://tapestry-atmosphere.uklance.cloudbees.net/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/6.1.1 Safari/537.73.11" | |
207.61.224.54 - - [06/Jan/2014:05:44:34 +0000] "GET /chatdemo;jsessionid=a5g6txxdf2uo10detrcbjztn HTTP/1.1" 200 3000 "http://tapestry-atmosphere.uklance.cloudbees.net/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.73.11 ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- page.tml --> | |
<t:grid source="myCustomGridDataSource" ... /> | |
// Page.java | |
public GridDataSource getMyCustomGridDataSource() { | |
final List<Document> docs = documentDAO.getAll(); | |
GridDataSource wrapper = new CollectionGridDataSource(docs) { | |
public int getAvailableRows() { | |
return super.getAvailableRows() + 1; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Property | |
private Country country; | |
@Property | |
private City city; | |
public Country[] getCountries() { | |
return new Country[] { ... }; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LazyTreeModel<T> implements TreeModel<T> { | |
private final ValueEncoder<T> encoder; | |
private final LazyTreeModelSource<T> source; | |
public LazyTreeModel<T>(ValueEncoder<T> encoder, LazyTreeModelSource<T> source) { | |
this.encoder = encoder; | |
this.source = source; | |
} | |
@Override |