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 DomPropertyStore { 42 43 private static final String MESSAGE_PART_NAME = "EchoDomPropertyStore.MessageProcessor"; 44 private static final String [] PROPERTY_STORE_KEYS= new String []{"name", "value"}; 45 46 56 public static void renderSetProperty(ServerMessage serverMessage, String elementId, String propertyName, 57 String propertyValue) { 58 Element itemizedUpdateElement = serverMessage.getItemizedDirective(ServerMessage.GROUP_ID_POSTUPDATE, 59 MESSAGE_PART_NAME, "store-property", PROPERTY_STORE_KEYS, new String []{propertyName, propertyValue}); 60 Element itemElement = serverMessage.getDocument().createElement("item"); 61 itemElement.setAttribute("eid", elementId); 62 itemizedUpdateElement.appendChild(itemElement); 63 } 64 } 65 | Popular Tags |