• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AutoCompleteSettings类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



AutoCompleteSettings类属于org.apache.wicket.extensions.ajax.markup.html.autocomplete包,在下文中一共展示了AutoCompleteSettings类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: newAutoCompleteBehavior

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
@Override
protected AutoCompleteBehavior<T> newAutoCompleteBehavior(IAutoCompleteRenderer<T> renderer,
        AutoCompleteSettings settings) {
    return new AutoCompleteBehavior<T>(renderer, settings) {

        @Override
        public void renderHead(Component component, IHeaderResponse response) {
            super.renderHead(component, response);
            response.renderJavaScriptReference(AUTOCOMPLETE_JS);
        }

        @Override
        protected Iterator<T> getChoices(String input) {
            return ImprovedAutoCompleteTextField.this.getChoices(input);
        }
    };
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:18,代码来源:ImprovedAutoCompleteTextField.java


示例2: 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


示例3: 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


示例4: AssigneeLabel

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
public AssigneeLabel(String id, String docId, Document docData, DocumentTabs tabs) {
    super(id, new Model(docData.getWorkflow().getAssignment().getAssignee()));

    this.tabs = tabs;
    this.docData = docData;
    Set<String> permissions = workflowService.getPermissionsFromDoc(docData);
    
    AutoCompleteSettings settings = new AutoCompleteSettings();		
    settings.setThrottleDelay(400);
    autocomplete = new UserAutoCompleteBehavior(settings, permissions, true);
    add(new AssigneeValidator(authClient));
}
 
开发者ID:martin-kanis,项目名称:relax-dms,代码行数:13,代码来源:AssigneeLabel.java


示例5: ImprovedAutoCompleteTextField

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
public ImprovedAutoCompleteTextField(String id, IModel<T> model, Class<T> type, IAutoCompleteRenderer<T> renderer,
        AutoCompleteSettings settings) {
    super(id, model, type, renderer, settings);

    add(new CssClass("text autocomplete"));
    add(new AttributeModifier("autocomplete", "off"));
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:8,代码来源:ImprovedAutoCompleteTextField.java


示例6: 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


示例7: IndicatorAutoCompleteBehavior

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
public IndicatorAutoCompleteBehavior(
        final IAutoCompleteRenderer<T> renderer,
        final AutoCompleteSettings settings,
        final String indicator) {
    super(renderer, settings);
    this.indicator = indicator;
}
 
开发者ID:apache,项目名称:syncope,代码行数:8,代码来源:IndicatorAutoCompleteBehavior.java


示例8: settings

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
private static AutoCompleteSettings settings(){
	return new AutoCompleteSettings().setMinInputLength(MINIMUM_INPUT_LENGTH);
}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:4,代码来源:UsernameSearchTextField.java


示例9: AutoCompleteTextField

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
public AutoCompleteTextField(String id, AutoCompleteSettings settings) {
	super(id, settings);
}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:4,代码来源:AutoCompleteTextField.java


示例10: createPermissionsForm

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
private void createPermissionsForm() {
    final Set<String> permissions = workflowService.getPermissionsFromDoc(docData);
    userValues = convert.docPermissionsToString(permissions);
    final IModel<String> model = new IModel<String>() {
        private String value = null;

        @Override
        public String getObject() {
            return value;
        }

        @Override
        public void setObject(String object) {
            value = object;
            if (object != null) {
                if (!permissions.contains(value)) {
                    userValues.append("\n");
                    userValues.append(value);
                }
            }
        }

        @Override
        public void detach() {
            
        }
    };
    
    textField = new TextField("users", model);
    AutoCompleteSettings settings = new AutoCompleteSettings();		
    settings.setThrottleDelay(400);
    textField.add(new UserAutoCompleteBehavior(settings, permissions, false));
    
    final MultiLineLabel label = new MultiLineLabel("selectedUsers", new PropertyModel<>(this,
        "userValues"));
    label.setOutputMarkupId(true);
    
    Form<?> form = new Form<Void>("form") {
        @Override
        protected void onSubmit() {
            if (textField.getModelObject() == null)
                return;
            workflowService.addPermissionsToDoc(docData, textField.getModelObject().toString());

            // clear the textfield
            textField.setModelObject(null);
        }
    };
    add(form);
    form.add(textField);
    form.add(label);
}
 
开发者ID:martin-kanis,项目名称:relax-dms,代码行数:53,代码来源:DocumentWorkflow.java


示例11: UserAutoCompleteBehavior

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
public UserAutoCompleteBehavior(AutoCompleteSettings settings) {
    super(StringAutoCompleteRenderer.INSTANCE, settings);
    filter = Collections.EMPTY_SET;
}
 
开发者ID:martin-kanis,项目名称:relax-dms,代码行数:5,代码来源:UserAutoCompleteBehavior.java


示例12: AssociationFieldAutoCompleteTextField

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
public AssociationFieldAutoCompleteTextField(String id, IModel<Topic> model, final RoleFieldModel valueFieldModel) {
  super(id);
      
  AutoCompleteSettings opts = new AutoCompleteSettings();
  opts.setCssClassName("ontopoly-autocompleter");
  opts.setAdjustInputWidth(false);
  opts.setPreselect(true);
  
  this.textField = new AutoCompleteTextField<Topic>("autoComplete", model, Topic.class, new AbstractAutoCompleteRenderer<Topic>() {
      @Override
      protected String getTextValue(Topic o) {
        return TOPIC_CONVERTER.convertToString(o);
      }
      @Override
      protected void renderChoice(Topic o, Response response, String criteria) {
        response.write(o.getName());
      }}, opts) {

    @Override
    public IConverter getConverter(Class<?> type) {
      if (Topic.class.equals(type)) {
        return new TopicConverter();
      } else {
        return super.getConverter(type);
      }
    }
  
    @Override
    protected Iterator<Topic> getChoices(String input) {
      List<Topic> result = new ArrayList<Topic>(valueFieldModel.getRoleField().searchAllowedPlayers(input));
      filterPlayers(result);
      Collections.sort(result, TopicComparator.INSTANCE);
      return result.iterator();
    }
    
    @Override
    protected void onModelChanged() {
  	super.onModelChanged();
      Topic topic = getModelObject();
      if (topic != null) {
        AssociationFieldAutoCompleteTextField.this.onTopicSelected(topic);
      }
    }
  };    
  add(textField);
}
 
开发者ID:ontopia,项目名称:ontopia,代码行数:47,代码来源:AssociationFieldAutoCompleteTextField.java


示例13: getDefaultAutoCompleteSettings

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
public static AutoCompleteSettings getDefaultAutoCompleteSettings() {
       return new AutoCompleteSettings()
               .setPreselect(true)
               .setThrottleDelay(100)
               .setShowListOnFocusGain(true);
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:7,代码来源:WebConstants.java


示例14: 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


示例15: PartAutoCompleteText

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
public PartAutoCompleteText(String id, IModel<CustomerProjectPartDto> model, IModel<List<CustomerProjectPartDto>> allChoices) {
    super(id, model, CustomerProjectPartDto.class, new PartAutoCompleteConverter(allChoices), new AutoCompleteSettings());

    this.allChoices = allChoices;
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:6,代码来源:PartAutoCompleteText.java


示例16: TextAndValueAutoCompleteTextField

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
public TextAndValueAutoCompleteTextField(String id, IModel model,
		Class<? extends Object> type, AutoCompleteSettings settings) {
	super(id, model, type, new WordsAndValueAutoCompleteRenderer(), settings);
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:5,代码来源:TextAndValueAutoCompleteTextField.java


示例17: IndicatingAjaxAutoCompleteTextField

import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; //导入依赖的package包/类
/**
 * Constructor for the given type with default settings.
 *
 * @param id component id
 * @param type model objec type
 */
public IndicatingAjaxAutoCompleteTextField(final String id, final Class<T> type) {
	this(id, null, type, new AutoCompleteSettings());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:10,代码来源:IndicatingAjaxAutoCompleteTextField.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java KeyBag类代码示例发布时间:2022-05-22
下一篇:
Java DeleteIndex类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap