1 15 package org.apache.tapestry.script; 16 17 import org.apache.hivemind.Location; 18 19 27 28 class InitToken extends AbstractToken 29 { 30 private int _bufferLengthHighwater = 100; 31 32 public InitToken(Location location) 33 { 34 super(location); 35 } 36 37 public void write(StringBuffer buffer, ScriptSession session) 38 { 39 if (buffer != null) 40 throw new IllegalArgumentException (); 41 42 buffer = new StringBuffer (_bufferLengthHighwater); 43 44 writeChildren(buffer, session); 45 46 session.addInitializationScript(buffer.toString()); 47 48 51 _bufferLengthHighwater = Math.max(_bufferLengthHighwater, buffer.length()); 52 } 53 } | Popular Tags |