本文整理汇总了Java中org.apache.wicket.extensions.markup.html.form.select.IOptionRenderer类的典型用法代码示例。如果您正苦于以下问题:Java IOptionRenderer类的具体用法?Java IOptionRenderer怎么用?Java IOptionRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IOptionRenderer类属于org.apache.wicket.extensions.markup.html.form.select包,在下文中一共展示了IOptionRenderer类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getOptionRendererComparator
import org.apache.wicket.extensions.markup.html.form.select.IOptionRenderer; //导入依赖的package包/类
public static final Comparator<Object> getOptionRendererComparator(final Collator collator, final IOptionRenderer renderer){
return new Comparator<Object>(){
public int compare(Object o1, Object o2) {
return collator.compare(
renderer.getDisplayValue(o1),
renderer.getDisplayValue(o2)
);
}
};
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:11,代码来源:ReportsEditPage.java
示例2: newSelectOptions
import org.apache.wicket.extensions.markup.html.form.select.IOptionRenderer; //导入依赖的package包/类
/**
*
* @param wicketId
* @param selections
* @return
*/
private SelectOptions<String> newSelectOptions(String wicketId, final List<String> selections){
// IModel<List<String>> model = new Model<List<String>>();
SelectOptions<String> selectOptions = new SelectOptions<>(
wicketId,
Model.ofList(selections),
new IOptionRenderer<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getDisplayValue(String object) {
return object;
}
@Override
public IModel<String> getModel(String value) {
return new Model<>(value);
}
}
);
selectOptions.setRecreateChoices(true);
selectOptions.setOutputMarkupId(true);
return selectOptions;
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:34,代码来源:UqasarDataVisualizationSettingsPanel.java
示例3: newSelectOptions
import org.apache.wicket.extensions.markup.html.form.select.IOptionRenderer; //导入依赖的package包/类
/**
*
* @param wicketId
* @param selections
* @return
*/
private SelectOptions<String> newSelectOptions(String wicketId, final List<String> selections){
// IModel<List<String>> model = new Model<List<String>>();
SelectOptions<String> selectOptions = new SelectOptions<>(
wicketId,
Model.ofList(selections),
new IOptionRenderer<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getDisplayValue(String object) {
return object;
}
@Override
public IModel<String> getModel(String value) {
return new Model<>(value);
}
}
);
selectOptions.setRecreateChoices(true);
selectOptions.setOutputMarkupId(true);
return selectOptions;
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:34,代码来源:DataDeviationSettingsPanel.java
示例4: addOrReplaceOptions
import org.apache.wicket.extensions.markup.html.form.select.IOptionRenderer; //导入依赖的package包/类
/**
* @param list
* @param renderer
* @return this for chaining.
*/
public SelectPanel<T> addOrReplaceOptions(final List<T> list, final IOptionRenderer<T> renderer) {
final SelectOptions<T> options = new SelectOptions<T>(OPTIONS_WICKET_ID, list, renderer);
select.addOrReplace(options);
return this;
}
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:11,代码来源:SelectPanel.java
注:本文中的org.apache.wicket.extensions.markup.html.form.select.IOptionRenderer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论