Package org.itsnat.core.event

Examples of org.itsnat.core.event.NodePropertyTransport


    public void load()
    {
        Document doc = itsNatDoc.getDocument();
        this.listElem = doc.getElementById("listId");
        itsNatDoc.addEventListener((EventTarget)listElem,"select",this,false,new NodePropertyTransport("selectedIndex",false));

        this.buttonRemove = doc.getElementById("removeItemId");
        ((EventTarget)buttonRemove).addEventListener("command",this,false);

        this.valueElem = doc.getElementById("valueItemId");
        itsNatDoc.addEventListener((EventTarget)valueElem,"change",this,false,new NodePropertyTransport("value",false));

        this.posElem = doc.getElementById("posItemId");
        itsNatDoc.addEventListener((EventTarget)posElem,"change",this,false,new NodePropertyTransport("value",false));

        this.buttonUpdate = doc.getElementById("updateItemId");
        ((EventTarget)buttonUpdate).addEventListener("command",this,false);

        this.buttonAdd = doc.getElementById("addItemId");
View Full Code Here


        this.reinsertElem = doc.getElementById("reinsertId");
        ((EventTarget)reinsertElem).addEventListener("click",this,false);

        this.useSVGLoadElem = (HTMLInputElement)doc.getElementById("useSVGLoadId");
        itsNatDoc.addEventListener((EventTarget)useSVGLoadElem,"click",this,false,new NodePropertyTransport("checked",boolean.class));
    }
View Full Code Here

        this.url = ((HTMLIFrameElement)container).getAttribute("src");

        this.circleSelected = (HTMLElement)doc.getElementById("circleSelectedId");

        this.inputRadio = (HTMLInputElement)doc.getElementById("radioId");
        itsNatDoc.addEventListener((EventTarget)inputRadio,"change",this,false,new NodePropertyTransport("value"));

        this.updateButton = (HTMLInputElement)doc.getElementById("updateId");
        ((EventTarget)updateButton).addEventListener("click",this,false);

        itsNatDoc.addUserEventListener(null,"update",this);

        this.selectContainer = (HTMLSelectElement)doc.getElementById("selectContId");
        itsNatDoc.addEventListener((EventTarget)selectContainer,"change",this,false,new NodePropertyTransport("selectedIndex"));
    }
View Full Code Here

        this.url = param.getAttribute("value"); // <param name="src" value="url" />

        this.circleSelected = (HTMLElement)doc.getElementById("circleSelectedId");

        this.inputRadio = (HTMLInputElement)doc.getElementById("radioId");
        itsNatDoc.addEventListener((EventTarget)inputRadio,"change",this,false,new NodePropertyTransport("value"));

        this.updateButton = (HTMLInputElement)doc.getElementById("updateId");
        ((EventTarget)updateButton).addEventListener("click",this,false);

        itsNatDoc.addUserEventListener(null,"update",this);

        this.selectContainer = (HTMLSelectElement)doc.getElementById("selectContId");
        itsNatDoc.addEventListener((EventTarget)selectContainer,"change",this,false,new NodePropertyTransport("selectedIndex"));
    }
View Full Code Here

        }

        this.circleSelected = (HTMLElement)doc.getElementById("circleSelectedId");

        this.inputRadio = (HTMLInputElement)doc.getElementById("radioId");
        itsNatDoc.addEventListener((EventTarget)inputRadio,"change",this,false,new NodePropertyTransport("value"));

        this.updateButton = (HTMLInputElement)doc.getElementById("updateId");
        ((EventTarget)updateButton).addEventListener("click",this,false);

        itsNatDoc.addUserEventListener(null,"update",this);

        this.selectContainer = (HTMLSelectElement)doc.getElementById("selectContId");
        itsNatDoc.addEventListener((EventTarget)selectContainer,"change",this,false,new NodePropertyTransport("selectedIndex"));
    }
View Full Code Here

    {
    }

    public String getCodeToSend(ParamTransport param)
    {
        NodePropertyTransport item = (NodePropertyTransport)param;
        StringBuilder code = new StringBuilder();
        code.append("    var value = event.getCurrentTarget()." + item.getName() + ";\n " );
        code.append("    if (value != null) event.setExtraParam(\"" + item.getName() + "\",value);\n" );
        return code.toString();
    }
View Full Code Here

        Element elem = (Element)event.getCurrentTarget();

        String name = ((SingleParamTransport)param).getName();
        String value = request.getAttrOrParam(name);

        NodePropertyTransport prop = (NodePropertyTransport)param;
        String attrName = prop.getAttrName();
        if (attrName != null)
        {
            // Sincronizamos la propiedad como un atributo del elemento en el servidor
            if (value != null)
                DOMUtilInternal.setAttribute(elem,attrName,value);
            else
                elem.removeAttribute(attrName)// Si es null lo indicamos eliminando el atributo
        }
        else
        {
            // Ej. si name es "data" => "setData"
            Class<?> type = prop.getType();
            String methodName = prop.getJavaSetMethodName();
            Class<?> nodeClass = elem.getClass();
            try
            {
                Method method = nodeClass.getMethod(methodName,new Class<?>[]{type});
                Object valueArg = StringToObjectConverter.convert(value,type);
View Full Code Here

        this.linkToResolve = doc.getElementById("linkToResolveId");
        ((EventTarget)linkToResolve).addEventListener("click",this,false);

        this.inputElem = (HTMLInputElement)doc.getElementById("inputElemId");
        ParamTransport prop = new NodePropertyTransport("value");
        itsNatDoc.addEventListener((EventTarget)inputElem,"change",this,false,prop);

        ElementLabelRenderer renderer = new ElementLabelRenderer()
        {
            protected ItsNatVariableResolver resolver = itsNatDoc.createItsNatVariableResolver(true);
View Full Code Here

        this.shuffleButton = doc.getElementById("shuffleId");
        ((EventTarget)shuffleButton).addEventListener("click",this,false);

        this.masterCheckBox = (HTMLInputElement)doc.getElementById("masterId");
        itsNatDoc.addEventListener((EventTarget)masterCheckBox,"click",this,false,new NodePropertyTransport("checked",boolean.class));

        boolean master = masterCheckBox.getChecked();
        Element parent = doc.getElementById("elementListId");
        ElementGroupManager factory = itsNatDoc.getElementGroupManager();
        this.elemList = factory.createElementListFree(parent,master);
View Full Code Here

        this.linkToResolve = doc.getElementById("linkToResolveId");
        ((EventTarget)linkToResolve).addEventListener("click",this,false);

        this.inputElem = (HTMLInputElement)doc.getElementById("inputElemId");
        ParamTransport prop = new NodePropertyTransport("value");
        itsNatDoc.addEventListener((EventTarget)inputElem,"change",this,false,prop);

        ElementGroupManager factory = itsNatDoc.getElementGroupManager();
        this.label = factory.createElementLabel(doc.getElementById("elementId"),true,null);
    }
View Full Code Here

TOP

Related Classes of org.itsnat.core.event.NodePropertyTransport

Copyright © 2018 www.massapicom. 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.