Package org.itsnat.comp.text

Examples of org.itsnat.comp.text.ItsNatHTMLInputText


        return null;
    }

    public ItsNatHTMLInputText createItsNatHTMLInputTextDefault(HTMLInputElement element,NameValue[] artifacts,boolean execCreateFilters,ItsNatStfulDocComponentManagerImpl compMgr)
    {
        ItsNatHTMLInputText comp = null;
        boolean doFilters = hasBeforeAfterCreateItsNatComponentListener(execCreateFilters,compMgr);
        if (doFilters) comp = (ItsNatHTMLInputText)processBeforeCreateItsNatComponentListener(element,getCompType(),null,artifacts,compMgr);
        if (comp == null)
            comp = new ItsNatHTMLInputTextDefaultImpl(element,artifacts,compMgr);
        if (doFilters) comp = (ItsNatHTMLInputText)processAfterCreateItsNatComponentListener(comp,compMgr);
View Full Code Here


        {
            ItsNatHTMLLabel comp;

            comp = (ItsNatHTMLLabel)compMgr.createItsNatComponentById("labelId1");
            comp.setValue("Any Text");
            ItsNatHTMLInputText textInput = compMgr.createItsNatHTMLInputText(null,null);
            shared(0,comp,textInput);

            comp = (ItsNatHTMLLabel)compMgr.createItsNatComponentById("labelId2");
            comp.setValue(Boolean.TRUE);
            ItsNatHTMLInputCheckBox checkBox = compMgr.createItsNatHTMLInputCheckBox(null,null);
View Full Code Here

            {
                ItsNatComponentManager compMgr = listMult.getItsNatComponentManager();
                compMgr.buildItsNatComponents(cellContentElem);
            }

            final ItsNatHTMLInputText firstNameComp = getInputText("firstNameId",cellContentElem,listMult);
            final ItsNatHTMLInputText lastNameComp = getInputText("lastNameId",cellContentElem,listMult);

            firstNameComp.setText(person.getFirstName());
            lastNameComp.setText(person.getLastName());

            DocumentListener firstNameListener = new DocumentListener()
            {
                public void insertUpdate(DocumentEvent e)
                {
                    update();
                }

                public void removeUpdate(DocumentEvent e)
                {
                    update();
                }

                public void changedUpdate(DocumentEvent e)
                {
                    update();
                }

                public void update()
                {
                    person.setFirstName(firstNameComp.getText());
                }
            };

            firstNameComp.getDocument().addDocumentListener(firstNameListener);

            DocumentListener lastNameListener = new DocumentListener()
            {
                public void insertUpdate(DocumentEvent e)
                {
                    update();
                }

                public void removeUpdate(DocumentEvent e)
                {
                    update();
                }

                public void changedUpdate(DocumentEvent e)
                {
                    update();
                }

                public void update()
                {
                    person.setLastName(lastNameComp.getText());
                }

            };

            lastNameComp.getDocument().addDocumentListener(lastNameListener);
        }
        else
        {
            ItsNatHTMLInputText firstNameComp = getInputText("firstNameId",cellContentElem,listMult);
            ItsNatHTMLInputText lastNameComp = getInputText("lastNameId",cellContentElem,listMult);

            firstNameComp.setText(person.getFirstName());
            lastNameComp.setText(person.getLastName());
        }
    }
View Full Code Here

        model.addElement("Five " + zIndex);

        NodeList inputList = elem.getElementsByTagName("input");

        final HTMLInputElement inputText = (HTMLInputElement)inputList.item(0);
        final ItsNatHTMLInputText inputTextComp = (ItsNatHTMLInputText)compMgr.createItsNatComponent(inputText);
        inputTextComp.setText("Hello");

        final HTMLTextAreaElement textArea = (HTMLTextAreaElement)elem.getElementsByTagName("textarea").item(0);
        final ItsNatHTMLTextArea textAreaComp = (ItsNatHTMLTextArea)compMgr.createItsNatComponent(textArea);
        textAreaComp.setText("Hello");

        final HTMLInputElement inputCheck = (HTMLInputElement)inputList.item(1);
        final ItsNatHTMLInputCheckBox inputCheckComp = (ItsNatHTMLInputCheckBox)compMgr.createItsNatComponent(inputCheck);
        inputCheckComp.setSelected(false);

        final HTMLInputElement inputRadio1 = (HTMLInputElement)inputList.item(2);
        final ItsNatHTMLInputRadio inputRadioComp1 = (ItsNatHTMLInputRadio)compMgr.createItsNatComponent(inputRadio1);
        inputRadioComp1.setSelected(false);

        final HTMLInputElement inputRadio2 = (HTMLInputElement)inputList.item(3);
        final ItsNatHTMLInputRadio inputRadioComp2 = (ItsNatHTMLInputRadio)compMgr.createItsNatComponent(inputRadio2);
        inputRadioComp2.setSelected(false);

        EventListener listenerExit = new EventListenerSerial()
        {
            public void handleEvent(Event evt)
            {
                selectComp.dispose();
                inputTextComp.dispose();
                textAreaComp.dispose();
                inputCheckComp.dispose();
                inputRadioComp1.dispose();
                inputRadioComp2.dispose();
View Full Code Here

        freeRadioButtonLabel.setLabelValue("Free Radio Button Label");


        // Text Fields

        ItsNatHTMLInputText inputText = (ItsNatHTMLInputText)compMgr.findItsNatComponentById("inputTextId");
        check(inputText);
        inputText.setText("Input Text");

        ItsNatHTMLInputPassword inputPassword = (ItsNatHTMLInputPassword)compMgr.findItsNatComponentById("inputPasswordId");
        check(inputPassword);
        inputPassword.setText("Input Password");
View Full Code Here

    public void initInputText(ItsNatServletRequest request)
    {
        org.w3c.dom.Document doc = itsNatDoc.getDocument();
        HTMLInputElement inputElem = (HTMLInputElement)doc.getElementById("textFieldId");
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        ItsNatHTMLInputText input = (ItsNatHTMLInputText)componentMgr.findItsNatComponent(inputElem);
        PlainDocument dataModel = new PlainDocument();
        input.setDocument(dataModel);

        input.setText("Initial Text");

        input.addEventListener("change",this);
        if (!BrowserUtil2.isS60WebKit(request)) // Symbian detecta como teclas los movimientos del cursor, al final no se env�a el change
            input.addEventListener("keydown",this);
        input.addEventListener("keyup",this);
        input.addEventListener("keypress", this);
       
        dataModel.addDocumentListener(this);
    }
View Full Code Here

        {
            ItsNatFreeLabel comp;

            comp = (ItsNatFreeLabel)compMgr.createItsNatComponentById("labelId1","freeLabel",null);
            comp.setValue("Any Text");
            ItsNatHTMLInputText textInput = compMgr.createItsNatHTMLInputText(null,null);
            shared(0,comp,textInput);

            comp = (ItsNatFreeLabel)compMgr.createItsNatComponentById("labelId2","freeLabel",null);
            comp.setValue(Boolean.TRUE);
            ItsNatHTMLInputCheckBox checkBox = compMgr.createItsNatHTMLInputCheckBox(null,null);
View Full Code Here

        ItsNatComponentManager componentMgr = comp.getItsNatComponentManager();
        if (!itsNatDoc.getItsNatDocumentTemplate().isAutoBuildComponents())
            componentMgr.buildItsNatComponents(cellElem);

        final ItsNatHTMLInputText firstNameComp = (ItsNatHTMLInputText)componentMgr.findItsNatComponentById("firstName_" + index);
        final ItsNatHTMLInputText lastNameComp = (ItsNatHTMLInputText)componentMgr.findItsNatComponentById("lastName_" + index);

        final Person person = (Person)value;

        firstNameComp.setText(person.getFirstName());

        DocumentListener firstNameListener = new DocumentListenerSerializable()
        {
            public void insertUpdate(DocumentEvent e)
            {
                update();
            }

            public void removeUpdate(DocumentEvent e)
            {
                update();
            }

            public void changedUpdate(DocumentEvent e)
            {
                update();
            }

            public void update()
            {
                person.setFirstName(firstNameComp.getText());
            }

        };

        firstNameComp.getDocument().addDocumentListener(firstNameListener);



        lastNameComp.setText(person.getLastName());

        DocumentListener lastNameListener = new DocumentListenerSerializable()
        {
            public void insertUpdate(DocumentEvent e)
            {
                update();
            }

            public void removeUpdate(DocumentEvent e)
            {
                update();
            }

            public void changedUpdate(DocumentEvent e)
            {
                update();
            }

            public void update()
            {
                person.setLastName(lastNameComp.getText());
            }

        };

        lastNameComp.getDocument().addDocumentListener(lastNameListener);
    }
View Full Code Here

    public void label1(String id) throws PropertyVetoException
    {
        ItsNatLabel label = getItsNatLabel(id);
        label.setValue("Any Text");
        ItsNatHTMLInputText textInput = getComponentMgr().createItsNatHTMLInputText(null,null);
        labelShared(1,label,textInput);
    }
View Full Code Here

                processAction(action);

            int selectedIndex = listComp.getSelectedIndex();
            if (selectedIndex != -1)
            {
                ItsNatHTMLInputText itemComp = (ItsNatHTMLInputText)compMgr.addItsNatComponentById("itemId");
                itemComp.setText(listComp.getListModel().getElementAt(listComp.getSelectedIndex()).toString());

                ItsNatHTMLInputText posComp = (ItsNatHTMLInputText)compMgr.addItsNatComponentById("posId");
                posComp.setText(Integer.toString(listComp.getSelectedIndex()));
            }
        }
        finally
        {
            saveDocumentToSession();
View Full Code Here

TOP

Related Classes of org.itsnat.comp.text.ItsNatHTMLInputText

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.