Skip to content

Instantly share code, notes, and snippets.

View steinermatt's full-sized avatar

Matthias Steiner steinermatt

View GitHub Profile
@steinermatt
steinermatt / tiles-defs.xml
Created September 14, 2013 16:17
pjax-tiles / src / main / webapp / WEB-INF / tiles-defs.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
"http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
<definition name="default.definition" template="/WEB-INF/layouts/default.jsp">
<put-attribute name="meta" value="/WEB-INF/views/tiles/meta.jsp" />
<put-attribute name="js" value="/WEB-INF/views/tiles/js.jsp" />
<put-attribute name="stylesheets" value="/WEB-INF/views/tiles/stylesheets.jsp" />
<put-attribute name="header" value="/WEB-INF/views/tiles/header.jsp" />
@steinermatt
steinermatt / PJAXViewPreparer.java
Created September 14, 2013 16:16
pjax-tiles / src / main / java / net / inscope / sandbox / pjax / web / PJAXViewPreparer.java
package net.inscope.sandbox.pjax.web;
import org.apache.tiles.Attribute;
import org.apache.tiles.AttributeContext;
import org.apache.tiles.context.TilesRequestContext;
import org.apache.tiles.preparer.PreparerException;
import org.apache.tiles.preparer.ViewPreparer;
public class PJAXViewPreparer implements ViewPreparer
{
@steinermatt
steinermatt / pjax.jsp
Created September 14, 2013 16:14
pjax-tiles / src / main / webapp / WEB-INF / layouts / pjax.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertAttribute name="content" />
@steinermatt
steinermatt / default.jsp
Created September 14, 2013 16:11
pjax-tiles / src / main / webapp / WEB-INF / layouts / default.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE html>
<html lang="en">
<head>
<title><tiles:getAsString name="title"/></title>
<tiles:insertAttribute name="meta"/>
<tiles:insertAttribute name="stylesheets"/>