Package nextapp.echo2.webrender

Examples of nextapp.echo2.webrender.ServerMessage.addLibrary()


     */
    public void testAddLibrary() {
        NodeList libraryNodeList;
        ServerMessage message = new ServerMessage();
       
        message.addLibrary("service1");
        libraryNodeList = message.getDocument().getElementsByTagName("library");
        assertEquals(1, libraryNodeList.getLength());
       
        message.addLibrary("service2");
        libraryNodeList = message.getDocument().getElementsByTagName("library");
View Full Code Here


       
        message.addLibrary("service1");
        libraryNodeList = message.getDocument().getElementsByTagName("library");
        assertEquals(1, libraryNodeList.getLength());
       
        message.addLibrary("service2");
        libraryNodeList = message.getDocument().getElementsByTagName("library");
        assertEquals(2, libraryNodeList.getLength());
       
        message.addLibrary("service1");
        libraryNodeList = message.getDocument().getElementsByTagName("library");
View Full Code Here

       
        message.addLibrary("service2");
        libraryNodeList = message.getDocument().getElementsByTagName("library");
        assertEquals(2, libraryNodeList.getLength());
       
        message.addLibrary("service1");
        libraryNodeList = message.getDocument().getElementsByTagName("library");
        assertEquals(2, libraryNodeList.getLength());
    }
   
    /**
 
View Full Code Here

     * @param rc the relevant <code>RenderContext</code>
     * @param command the command
     */
    private void renderOpenWindow(RenderContext rc, BrowserOpenWindowCommand command) {
        ServerMessage serverMessage = rc.getServerMessage();
        serverMessage.addLibrary(BROWSER_COMMAND_SERVICE.getId());
        Element openWindowElement = serverMessage.appendPartDirective(ServerMessage.GROUP_ID_POSTUPDATE,
                "EchoBrowserCommand.MessageProcessor", "open-window");
        openWindowElement.setAttribute("uri", command.getUri());
        if (command.getName() != null) {
            openWindowElement.setAttribute("name", command.getName());
View Full Code Here

     * @param rc the relevant <code>RenderContext</code>
     * @param command the command
     */
    private void renderRedirect(RenderContext rc, BrowserRedirectCommand command) {
        ServerMessage serverMessage = rc.getServerMessage();
        serverMessage.addLibrary(BROWSER_COMMAND_SERVICE.getId());
        Element redirectElement = serverMessage.appendPartDirective(ServerMessage.GROUP_ID_POSTUPDATE,
                "EchoBrowserCommand.MessageProcessor", "redirect");
        redirectElement.setAttribute("uri", command.getUri());
    }
}
View Full Code Here

     * @see nextapp.echo2.webcontainer.DomUpdateSupport#renderHtml(nextapp.echo2.webcontainer.RenderContext,
     *      nextapp.echo2.app.update.ServerComponentUpdate, org.w3c.dom.Node, nextapp.echo2.app.Component)
     */
    public void renderHtml(RenderContext rc, ServerComponentUpdate update, Node parentNode, Component component) {
        ServerMessage serverMessage = rc.getServerMessage();
        serverMessage.addLibrary(TABLE_SERVICE.getId());
        Table table = (Table) component;
       
        renderInitDirective(rc, table);
       
        Border border = (Border) table.getRenderProperty(Table.PROPERTY_BORDER);
View Full Code Here

     * @see nextapp.echo2.webcontainer.ComponentSynchronizePeer#renderAdd(nextapp.echo2.webcontainer.RenderContext,
     *      nextapp.echo2.app.update.ServerComponentUpdate, java.lang.String, nextapp.echo2.app.Component)
     */
    public void renderAdd(RenderContext rc, ServerComponentUpdate update, String targetId, Component component) {
        ServerMessage serverMessage = rc.getServerMessage();
        serverMessage.addLibrary(SPLIT_PANE_SERVICE.getId());
        SplitPane splitPane = (SplitPane) component;
        renderInitDirective(rc, splitPane, targetId);
        Component[] children = splitPane.getVisibleComponents();
        for (int i = 0; i < children.length; ++i) {
            renderChild(rc, update, splitPane, children[i]);
View Full Code Here

     * @see nextapp.echo2.webcontainer.ComponentSynchronizePeer#renderDispose(nextapp.echo2.webcontainer.RenderContext,
     *      nextapp.echo2.app.update.ServerComponentUpdate, nextapp.echo2.app.Component)
     */
    public void renderDispose(RenderContext rc, ServerComponentUpdate update, Component component) {
        ServerMessage serverMessage = rc.getServerMessage();
        serverMessage.addLibrary(SPLIT_PANE_SERVICE.getId());
        renderDisposeDirective(rc, (SplitPane) component);
    }

    /**
     * Renders a directive to the outgoing <code>ServerMessage</code> to
View Full Code Here

     */
    public void renderHtml(RenderContext rc, ServerComponentUpdate update, Node parentNode, Component component) {
        ContentPane contentPane = (ContentPane) component;
       
        ServerMessage serverMessage = rc.getServerMessage();
        serverMessage.addLibrary(CONTENT_PANE_SERVICE.getId());

        Document document = parentNode.getOwnerDocument();
        Element divElement = document.createElement("div");
        divElement.setAttribute("id", ContainerInstance.getElementId(component));
       
View Full Code Here

    public void renderHtml(RenderContext rc, ServerComponentUpdate addUpdate, Node parentNode, Component component) {
        TextArea textArea = (TextArea) component;
        String elementId = ContainerInstance.getElementId(component);
       
        ServerMessage serverMessage = rc.getServerMessage();
        serverMessage.addLibrary(TEXT_COMPONENT_SERVICE.getId());
       
        Element textAreaElement = parentNode.getOwnerDocument().createElement("textarea");
        textAreaElement.setAttribute("id", elementId);
       
        if (textArea.isFocusTraversalParticipant()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.