Package de.jetwick.ui.util

Examples of de.jetwick.ui.util.MyAutoCompleteTextField


            }
        });
        add(form);
        AutoCompleteSettings config = new AutoCompleteSettings().setUseHideShowCoveredIEFix(false);
        config.setThrottleDelay(200);
        form.add(field = new MyAutoCompleteTextField("userName", new PropertyModel(this, "userName"), config) {

            @Override
            protected Iterator getChoices(String input) {
                return GrabTweetsDialog.this.getUserChoices(input).iterator();
            }
View Full Code Here


        AutoCompleteSettings config = new AutoCompleteSettings().setUseHideShowCoveredIEFix(false);
        config.setThrottleDelay(200);

        // connect the form's textfield with the java property       
        queryTF = new MyAutoCompleteTextField("textField",
                new PropertyModel(this, "query"), config) {

            @Override
            protected Iterator getChoices(String input) {
                return SearchBox.this.getQueryChoices(input).iterator();
            }

            @Override
            protected void onSelectionChange(AjaxRequestTarget target, String newValue) {
                SearchBox.this.onSelectionChange(target, newValue);
            }
        };
        queryTF.add(new DefaultFocusBehaviour());
        // autosubmit when user selects choice -> problem: the user text will be submitted although it should be cleared before submit
//        queryTF.add(new AjaxFormSubmitBehavior(form, "onchange") {
//
//            @Override
//            protected void onSubmit(AjaxRequestTarget target) {
//            }
//
//            @Override
//            protected void onError(AjaxRequestTarget target) {
//            }
//        });
        queryTF.setMarkupId("querybox");
        form.add(queryTF);

        MyAutoCompleteTextField userTF = new MyAutoCompleteTextField("userTextField",
                new PropertyModel(this, "userName"), config) {

            @Override
            protected Iterator getChoices(String input) {
                return SearchBox.this.getUserChoices(input).iterator();
            }

            @Override
            protected void onSelectionChange(AjaxRequestTarget target, String newValue) {
                //"Not supported yet."
            }
        };
        userTF.setMarkupId("userbox");

        rg.add(new Radio("0", new Model(0)).setMarkupId("sbnone"));
        rg.add(new Radio("1", new Model(1)).setMarkupId("sbfriends"));
        rg.add(new Radio("2", new Model(2)).setMarkupId("sbuser"));
        rg.add(userTF);
View Full Code Here

TOP

Related Classes of de.jetwick.ui.util.MyAutoCompleteTextField

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.