当前位置: 首页>>代码示例>>Java>>正文


Java AutoCompleteSettings.setShowListOnEmptyInput方法代码示例

本文整理汇总了Java中org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings.setShowListOnEmptyInput方法的典型用法代码示例。如果您正苦于以下问题:Java AutoCompleteSettings.setShowListOnEmptyInput方法的具体用法?Java AutoCompleteSettings.setShowListOnEmptyInput怎么用?Java AutoCompleteSettings.setShowListOnEmptyInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings的用法示例。


在下文中一共展示了AutoCompleteSettings.setShowListOnEmptyInput方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initTextField

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入方法依赖的package包/类
private TextField initTextField() {
//        IModel data = new PropertyModel(getModel(), SearchValue.F_VALUE);

        if (lookup == null) {
            return new TextField(ID_TEXT_INPUT, new PropertyModel(getModel(), SearchValue.F_VALUE));
        }
        
        LookupPropertyModel<String> lookupPropertyModel = new LookupPropertyModel<String>(getModel(), SearchValue.F_VALUE, lookup.asObjectable()) {
        	
        	private static final long serialVersionUID = 1L;

			@Override
        	public boolean isSupportsDisplayName() {
        		return true;
        	}
        };

        AutoCompleteSettings settings = new AutoCompleteSettings();
        settings.setShowListOnEmptyInput(true);

        return new AutoCompleteTextField<String>(ID_TEXT_INPUT, lookupPropertyModel, settings) {

        	private static final long serialVersionUID = 1L;
            @Override
            protected Iterator<String> getChoices(String input) {
                return prepareAutoCompleteList(input).iterator();
            }

            
            
        };
    }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:33,代码来源:TextPopupPanel.java

示例2: createAutoCompleteSettings

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入方法依赖的package包/类
protected AutoCompleteSettings createAutoCompleteSettings() {
       AutoCompleteSettings autoCompleteSettings = new AutoCompleteSettings();
       autoCompleteSettings.setShowListOnEmptyInput(true);
       autoCompleteSettings.setShowListOnFocusGain(true);
       autoCompleteSettings.setMaxHeightInPx(200);
       autoCompleteSettings.setShowCompleteListOnFocusGain(true);
       return autoCompleteSettings;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:9,代码来源:AbstractAutoCompletePanel.java

示例3: initTextField

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入方法依赖的package包/类
private TextField initTextField() {
//        IModel data = new PropertyModel(getModel(), SearchValue.F_VALUE);

        if (lookup == null) {
            return new TextField(ID_TEXT_INPUT, new PropertyModel(getModel(), SearchValue.F_VALUE));
        }

        LookupPropertyModel<String> lookupPropertyModel = new LookupPropertyModel<String>(getModel(), SearchValue.F_VALUE, lookup.asObjectable()) {

        	private static final long serialVersionUID = 1L;

			@Override
        	public boolean isSupportsDisplayName() {
        		return true;
        	}
        };

        AutoCompleteSettings settings = new AutoCompleteSettings();
        settings.setShowListOnEmptyInput(true);

        return new AutoCompleteTextField<String>(ID_TEXT_INPUT, lookupPropertyModel, settings) {

        	private static final long serialVersionUID = 1L;
            @Override
            protected Iterator<String> getChoices(String input) {
                return prepareAutoCompleteList(input).iterator();
            }



        };
    }
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:33,代码来源:TextPopupPanel.java

示例4: AjaxTextFieldPanel

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入方法依赖的package包/类
public AjaxTextFieldPanel(
        final String id, final String name, final IModel<String> model, final boolean enableOnChange) {
    super(id, name, model);

    questionMarkJexlHelp = Constants.getJEXLPopover(this, TooltipConfig.Placement.right);
    add(questionMarkJexlHelp.setVisible(false));

    final AutoCompleteSettings settings = new AutoCompleteSettings();
    settings.setShowCompleteListOnFocusGain(true);
    settings.setShowListOnEmptyInput(true);
    settings.setCssClassName("custom-autocomplete-box");

    field = new AutoCompleteTextField<String>("textField", model, settings) {

        private static final long serialVersionUID = -6648767303091874219L;

        @Override
        protected Iterator<String> getChoices(final String input) {
            return AjaxTextFieldPanel.this.getChoices(input);
        }

        @Override
        protected AutoCompleteBehavior<String> newAutoCompleteBehavior(
                final IAutoCompleteRenderer<String> renderer, final AutoCompleteSettings settings) {
            return new IndicatorAutoCompleteBehavior<String>(renderer, settings) {

                private static final long serialVersionUID = 1070808433195962931L;

                @Override
                protected Iterator<String> getChoices(final String input) {
                    return AjaxTextFieldPanel.this.getChoices(input);
                }
            };
        }
    };
    add(field.setLabel(new ResourceModel(name, name)).setOutputMarkupId(true));

    if (enableOnChange && !isReadOnly()) {
        field.add(new IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                // nothing to do
            }
        });
    }
}
 
开发者ID:apache,项目名称:syncope,代码行数:50,代码来源:AjaxTextFieldPanel.java


注:本文中的org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings.setShowListOnEmptyInput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。