本文整理汇总了Java中org.apache.wicket.extensions.markup.html.form.palette.Palette类的典型用法代码示例。如果您正苦于以下问题:Java Palette类的具体用法?Java Palette怎么用?Java Palette使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Palette类属于org.apache.wicket.extensions.markup.html.form.palette包,在下文中一共展示了Palette类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createPalette
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
private Palette<T> createPalette(
final String id,
final IModel<List<T>> model,
final ListModel<T> choices,
final IChoiceRenderer renderer) {
final Palette<T> palette = new Palette(
"paletteField",
model,
choices,
renderer,
8,
false);
return palette;
}
开发者ID:ilgrosso,项目名称:oldSyncopeIdM,代码行数:17,代码来源:AjaxPalettePanel.java
示例2: resetPanel
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
private void resetPanel(AjaxRequestTarget target,
final TextField<String> siteNameField,
final Palette<Person> palette, Label formFeedback) {
siteNameField.setModelObject("");
// there is quite possibly a better way of doing this
List<Person> remove = new ArrayList<Person>();
for (Person person : palette.getModelCollection()) {
remove.add(person);
}
palette.getModelCollection().removeAll(remove);
formFeedback.setVisible(false);
target.add(siteNameField);
target.appendJavaScript("$('#" + CreateWorksitePanel.this.getMarkupId()
+ "').slideUp();");
target.appendJavaScript("fixWindowVertical();");
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:21,代码来源:CreateWorksitePanel.java
示例3: component
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
public void component(FormComponent<?> object, IVisit<Void> visit) {
Palette<?> palette = object.findParent(Palette.class);
Component comp;
if (palette != null) {
comp = palette;
} else {
comp = object;
}
if (!visited.contains(comp)) {
visited.add(comp);
/*
if (isValidComponent(c)) {
AdvancedFormComponentLabel label = new AdvancedFormComponentLabel(getLabelId(c), c);
c.getParent().add(label);
c.setLabel(new Model<String>(c.getId()));
}
*/
// c.setComponentBorder(new RequiredBorder());
comp.add(new ValidationMessageBehavior());
comp.add(new ErrorHighlightBehavior());
}
}
开发者ID:nextreports,项目名称:nextreports-server,代码行数:25,代码来源:AdvancedFormVisitor.java
示例4: afterRender
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
@Override
public void afterRender(Component component) {
super.afterRender(component);
FormComponent<?> fc = null;
if (component instanceof Palette) {
fc = ((Palette<?>) component).getRecorderComponent();
} else if (component instanceof FormComponent) {
fc = (FormComponent<?>) component;
}
if ((fc != null) && !fc.isValid() ) {
String error;
if (fc.hasFeedbackMessage()) {
error = fc.getFeedbackMessages().first().getMessage().toString();
} else {
error = "Your input is invalid.";
}
component.getResponse().write("<div class=\"validationMessage\">" + error + "</div>");
}
}
开发者ID:nextreports,项目名称:nextreports-server,代码行数:22,代码来源:ValidationMessageBehavior.java
示例5: isEagerAllowed
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
@Override
public boolean isEagerAllowed(final IHtmlElement<?, ?> element, final Component component) {
if (component instanceof Palette) {
return false;
}
return true;
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:8,代码来源:EagerBehavior.java
示例6: createPalette
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private Palette createPalette(QueryParameter parameter, IModel listModel, AjaxFormComponentUpdatingBehavior ajaxUpdate) {
ParameterPalette parameterPalette = new ParameterPalette(parameter, listModel, 10);
parameterPalette.setUpdatingBehavior(ajaxUpdate);
return parameterPalette;
}
开发者ID:nextreports,项目名称:nextreports-server,代码行数:8,代码来源:ParameterRuntimePanel.java
示例7: onComponentTag
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
@Override
public void onComponentTag(Component c, ComponentTag tag) {
FormComponent fc = null;
if (c instanceof Palette) {
fc = ((Palette) c).getRecorderComponent();
} else if (c instanceof FormComponent) {
fc = (FormComponent) c;
}
if ((fc != null) && !fc.isValid() ) {
tag.addBehavior(new AttributeAppender("class", new Model<String>("error"), " "));
}
}
开发者ID:nextreports,项目名称:nextreports-server,代码行数:14,代码来源:ErrorHighlightBehavior.java
示例8: addRelevantEventTypeColumnsPalette
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
private Component addRelevantEventTypeColumnsPalette() {
final IModel<List<? extends TypeTreeNode>> eventTypeAttributeModel = new AbstractReadOnlyModel<List<? extends TypeTreeNode>>() {
@Override
public List<TypeTreeNode> getObject() {
// in the columnsPalette should only be attributes, that are
// contained in all selected event Types
final Set<TypeTreeNode> attributes = new HashSet<TypeTreeNode>();
boolean first = true;
for (final EapEventType eventType : ExistingEventTypeEditor.this.selectedEventTypes) {
if (eventType != null) {
if (first) {
attributes.addAll(eventType.getValueTypes());
first = false;
} else {
attributes.retainAll(eventType.getValueTypes());
}
}
}
return new ArrayList<TypeTreeNode>(attributes);
}
};
this.relevantEventTypeColumnsPalette = new Palette<TypeTreeNode>("relevantEventTypePalette", new ListModel<TypeTreeNode>(new ArrayList<TypeTreeNode>()), eventTypeAttributeModel, new ChoiceRenderer(), 5, false) {
private static final long serialVersionUID = 1L;
@Override
protected Recorder newRecorderComponent() {
final Recorder recorder = super.newRecorderComponent();
recorder.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
final Iterator<TypeTreeNode> selectedColumns = getSelectedChoices();
ExistingEventTypeEditor.this.selectedEventTypeAttributes = new ArrayList<TypeTreeNode>();
while (selectedColumns.hasNext()) {
final TypeTreeNode eventTypeAttribute = selectedColumns.next();
ExistingEventTypeEditor.this.selectedEventTypeAttributes.add(eventTypeAttribute);
}
}
});
return recorder;
}
};
this.relevantEventTypeColumnsPalette.setOutputMarkupId(true);
return this.relevantEventTypeColumnsPalette;
}
开发者ID:bptlab,项目名称:Unicorn,代码行数:50,代码来源:ExistingEventTypeEditor.java
示例9: RoleAttributesPanel
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
public RoleAttributesPanel(final String id,
final Form form, final RoleTO roleTO) {
super(id);
//--------------------------------
// Attributes panel
//--------------------------------
final AjaxTextFieldPanel name = new AjaxTextFieldPanel(
"name", "name",
new PropertyModel<String>(roleTO, "name"), false);
name.addRequiredLabel();
this.add(name);
this.add(new AttributesPanel("attributes", roleTO, form, false));
final AjaxCheckBoxPanel inhAttributes = new AjaxCheckBoxPanel(
"inheritAttributes",
"inheritAttributes",
new PropertyModel<Boolean>(roleTO, "inheritAttributes"),
false);
this.add(inhAttributes);
//--------------------------------
//--------------------------------
// Derived attributes container
//--------------------------------
this.add(new DerivedAttributesPanel("derivedAttributes", roleTO));
final AjaxCheckBoxPanel inhDerivedAttributes = new AjaxCheckBoxPanel(
"inheritDerivedAttributes",
"inheritDerivedAttributes",
new PropertyModel<Boolean>(roleTO, "inheritDerivedAttributes"),
false);
inhDerivedAttributes.setOutputMarkupId(true);
this.add(inhDerivedAttributes);
//--------------------------------
//--------------------------------
// Virtual attributes container
//--------------------------------
this.add(new VirtualAttributesPanel("virtualAttributes", roleTO,
false));
final AjaxCheckBoxPanel inhVirtualAttributes = new AjaxCheckBoxPanel(
"inheritVirtualAttributes",
"inheritVirtualAttributes",
new PropertyModel<Boolean>(roleTO, "inheritVirtualAttributes"),
false);
inhVirtualAttributes.setOutputMarkupId(true);
this.add(inhVirtualAttributes);
//--------------------------------
//--------------------------------
// Security container
//--------------------------------
this.add(new RoleSecurityPanel("security", roleTO));
//--------------------------------
//--------------------------------
// Resources container
//--------------------------------
this.add(new ResourcesPanel("resources", roleTO));
//--------------------------------
ListModel<String> selectedEntitlements =
new ListModel<String>(roleTO.getEntitlements());
ListModel<String> availableEntitlements =
new ListModel<String>(
entitlementRestClient.getAllEntitlements());
entitlementsPalette = new Palette(
"entitlementsPalette", selectedEntitlements,
availableEntitlements, new SelectChoiceRenderer(), 20, false);
this.add(entitlementsPalette);
}
开发者ID:ilgrosso,项目名称:oldSyncopeIdM,代码行数:81,代码来源:RoleAttributesPanel.java
示例10: getEntitlementsPalette
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
public Palette<String> getEntitlementsPalette() {
return this.entitlementsPalette;
}
开发者ID:ilgrosso,项目名称:oldSyncopeIdM,代码行数:4,代码来源:RoleAttributesPanel.java
示例11: SelectableRecorder
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
public SelectableRecorder(final String id, final Palette<T> palette) {
super(id, palette);
}
开发者ID:apache,项目名称:syncope,代码行数:4,代码来源:SelectableRecorder.java
示例12: ConditionCodeChoices
import org.apache.wicket.extensions.markup.html.form.palette.Palette; //导入依赖的package包/类
public ConditionCodeChoices(String id, Palette palette){
super(id, palette);
}
开发者ID:nextreports,项目名称:nextreports-server,代码行数:4,代码来源:ExtendedPalette.java
注:本文中的org.apache.wicket.extensions.markup.html.form.palette.Palette类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论