1 29 30 package nextapp.echo2.webrender.servermessage; 31 32 import nextapp.echo2.webrender.ServerMessage; 33 34 import org.w3c.dom.Element ; 35 36 41 public class WindowUpdate { 42 43 private static final String MESSAGE_PART_NAME = "EchoWindowUpdate"; 44 45 50 public static void renderReload(ServerMessage serverMessage) { 51 serverMessage.appendPartDirective(ServerMessage.GROUP_ID_POSTUPDATE, 52 MESSAGE_PART_NAME, "reload"); 53 } 54 55 62 public static void renderSetFocus(ServerMessage serverMessage, String elementId) { 63 Element element = serverMessage.appendPartDirective(ServerMessage.GROUP_ID_POSTUPDATE, 64 MESSAGE_PART_NAME, "set-focus"); 65 element.setAttribute("element-id", elementId); 66 } 67 68 75 public static void renderSetWindowTitle(ServerMessage serverMessage, String newValue) { 76 Element element = serverMessage.appendPartDirective(ServerMessage.GROUP_ID_UPDATE, 77 MESSAGE_PART_NAME, "set-title"); 78 element.setAttribute("title", newValue); 79 } 80 } 81 | Popular Tags |