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

Java ComponentFeedbackMessageFilter类代码示例

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

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



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

示例1: initLayout

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(IModel<String> label, String labelSize, String textSize, boolean required) {
    Label l = new Label(ID_LABEL, label);
    if (StringUtils.isNotEmpty(labelSize)) {
        l.add(AttributeAppender.prepend("class", labelSize));
    }
    add(l);

    WebMarkupContainer dateWrapper = new WebMarkupContainer(ID_DATE_WRAPPER);
    if (StringUtils.isNotEmpty(textSize)) {
        dateWrapper.add(AttributeAppender.prepend("class", textSize));
    }
    add(dateWrapper);

    DateInput date = new DateInput(ID_DATE, new XmlGregorianCalendarModel(getModel()));
    date.setRequired(required);
    date.setLabel(label);
    dateWrapper.add(date);

    FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(date));
    dateWrapper.add(feedback);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:22,代码来源:DateFormGroup.java


示例2: afterRender

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
@Override
public void afterRender(Component component) {
    FormComponent<?> fc = (FormComponent<?>) component;
    Response r = component.getResponse();

    r.write("</span>");

    if (fc.hasFeedbackMessage()) {
        r.write("<span class=\"feedbackPanelTextField\">");

        IFeedbackMessageFilter filter = new ComponentFeedbackMessageFilter(component);

        for (FeedbackMessage message : fc.getFeedbackMessages().messages(filter)) {
            r.write("<span class=\"feedbackPanel");
            r.write(message.getLevelAsString().toUpperCase());
            r.write("\">");
            r.write(Strings.escapeMarkup(message.getMessage().toString()));
        }

        r.write("</span>");
    }
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:23,代码来源:FieldFeedbackDecorator.java


示例3: onInitialize

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
@Override
protected void onInitialize() {
    super.onInitialize();
    Form form1 = new Form("form1") {
        @Override
        protected void onSubmit() {
            success("Success");
            Session.get().invalidateNow();
        }
    };
    form1.add(new FeedbackPanel("feedback", new ComponentFeedbackMessageFilter(form1)));
    add(form1);
    WebMarkupContainer c = new WebMarkupContainer("cont");
    c.setOutputMarkupId(true);
    Form form2 = new Form("form2");
    form2.add(new FeedbackPanel("feedback", new ComponentFeedbackMessageFilter(form2)));
    form2.add(new AjaxSubmitLink("submit") {
        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            super.onSubmit(target, form);
            form.success("Ajax success");
            target.add(form2);
        }
    });
    c.add(form2);
    add(c);
}
 
开发者ID:merzlikinvs,项目名称:cas-playground,代码行数:28,代码来源:ExamplePage.java


示例4: initLayout

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(final IModel<T> value, final List<PrismReferenceValue> values,
	final boolean required, Collection<Class<? extends O>> types) {

WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);

textWrapper.setOutputMarkupId(true);

TextField<String> text = new TextField<String>(ID_TEXT, createTextModel(value));
text.add(new AjaxFormComponentUpdatingBehavior("blur") {
	private static final long serialVersionUID = 1L;

	@Override
	protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
	}
});
text.setRequired(required);
text.setEnabled(false);
textWrapper.add(text);

FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(text));
textWrapper.add(feedback);

AjaxLink<String> edit = new AjaxLink<String>(ID_EDIT) {
	private static final long serialVersionUID = 1L;

	@Override
	public void onClick(AjaxRequestTarget target) {
		editValuePerformed(values, target);
	}
};
textWrapper.add(edit);
add(textWrapper);

      initButtons();
  }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:36,代码来源:ValueChoosePanel.java


示例5: BasePage

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
/**
 *
 * @param parameters
 */
public BasePage(final PageParameters parameters) {
	
	// add global feedback panel
	feedbackPanel = new StyledFeedbackPanel(FEEDBACKPANEL_ID, 
               new ComponentFeedbackMessageFilter(this));
	add(feedbackPanel.setOutputMarkupId(true));

	// display any message that may exist in the parameters
	displayMessage(parameters);
	// for IE compatibility ???
	add(new ChromeFrameMetaTag("chrome-frame"));

	// always add the bootstrap resources (css, js, icons)
	add(new BootstrapResourcesBehavior());

	// add js and css for tags input
	add(new MainBehavior());

	Bootstrap.getSettings().setThemeProvider(new BootswatchThemeProvider());
	Bootstrap.getSettings().getActiveThemeProvider()
			.setActiveTheme("cosmo");

	// begin conversation
	if (conversation.isTransient()) {
		conversation.begin();
	}

	// add the menu at the top
	add(navbar = new HeaderNavigationBar("navbar", this));
	setFooterYear();
	
	SERVERNAMEANDPORT = getServerNameAndPort();
	System.out.println("Current Server: "+SERVERNAMEANDPORT);
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:39,代码来源:BasePage.java


示例6: initLayout

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(IModel<String> labelModel, String labelSize, String textSize, String feedbackSize,
                        boolean required) {

    Label label = new Label(ID_LABEL, labelModel);
    if (StringUtils.isNotEmpty(labelSize)) {
        label.add(AttributeAppender.prepend("class", labelSize));
    }
    add(label);

    FormInput inputWrapper = createInput(ID_INPUT_WRAPPER, getModel(), labelModel);
    if (StringUtils.isNotEmpty(textSize)) {
        inputWrapper.add(AttributeAppender.prepend("class", textSize));
    }
    FormComponent input = inputWrapper.getFormComponent();
    input.setRequired(required);
    input.setLabel(labelModel);
    add(inputWrapper);

    WebMarkupContainer feedbackWrapper = new WebMarkupContainer(ID_FEEDBACK_WRAPPER);
    if (StringUtils.isNotEmpty(textSize)) {
        inputWrapper.add(AttributeAppender.prepend("class", feedbackSize));
    }
    add(feedbackWrapper);

    FormGroupFeedback feedback = new FormGroupFeedback(ID_FEEDBACK, new ComponentFeedbackMessageFilter(input));
    feedback.setOutputMarkupId(true);
    feedbackWrapper.add(feedback);
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:29,代码来源:HFormGroup.java


示例7: initLayout

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(IModel<String> labelModel, boolean required) {
    Component label = createLabel(ID_LABEL, labelModel);
    add(label);

    FormInput inputWrapper = createInput(ID_INPUT_WRAPPER, getModel(), labelModel);

    FormComponent input = inputWrapper.getFormComponent();
    input.setRequired(required);
    input.setLabel(labelModel);
    add(inputWrapper);

    FormGroupFeedback feedback = new FormGroupFeedback(ID_FEEDBACK, new ComponentFeedbackMessageFilter(input));
    feedback.setOutputMarkupId(true);
    add(feedback);
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:16,代码来源:FormGroup.java


示例8: initLayout

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(final IModel<List<T>> chosenValues, final List<PrismReferenceValue> filterValues,
	final boolean required, final boolean multiselect) {

AjaxLink<String> edit = new AjaxLink<String>(ID_EDIT) {
	private static final long serialVersionUID = 1L;

	@Override
	public void onClick(AjaxRequestTarget target) {
		editValuePerformed(chosenValues.getObject(), filterValues, target, multiselect);
	}
};
edit.setOutputMarkupPlaceholderTag(true);
add(edit);

ListView<T> selectedRowsList = new ListView<T>(ID_SELECTED_ROWS, chosenValues) {

	@Override
	protected void populateItem(ListItem<T> item) {
		WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
		
		textWrapper.setOutputMarkupPlaceholderTag(true);

		TextField<String> text = new TextField<String>(ID_TEXT, createTextModel(item.getModel())); //was value
		text.add(new AjaxFormComponentUpdatingBehavior("blur") {
			private static final long serialVersionUID = 1L;

			@Override
			protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
			}
		});
		text.setRequired(required);
		text.setEnabled(false);
		text.setOutputMarkupPlaceholderTag(true);
		textWrapper.add(text);

		FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(text));
		feedback.setOutputMarkupPlaceholderTag(true);
		textWrapper.add(feedback);

        initButtons(item, item);
        
        item.add(textWrapper);
	}
};
selectedRowsList.setReuseItems(true);
add(selectedRowsList);
  }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:48,代码来源:MultiValueChoosePanel.java


示例9: initLayout

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(final IModel<String> label, final String labelSize, final String textSize,
                        final boolean required) {
    Label l = new Label(ID_LABEL, label);
    if (StringUtils.isNotEmpty(labelSize)) {
        l.add(AttributeAppender.prepend("class", labelSize));
    }
    add(l);

    ListView repeater = new ListView<T>(ID_REPEATER, getModel()) {

        @Override
        protected void populateItem(final ListItem<T> item) {
            WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
            textWrapper.add(AttributeAppender.prepend("class", new AbstractReadOnlyModel<String>() {

                @Override
                public String getObject() {
                    StringBuilder sb = new StringBuilder();
                    if (StringUtils.isNotEmpty(textSize)) {
                        sb.append(textSize).append(' ');
                    }
                    if (item.getIndex() > 0 && StringUtils.isNotEmpty(getOffsetClass())) {
                        sb.append(getOffsetClass()).append(' ');
                        sb.append(CLASS_MULTI_VALUE);
                    }

                    return sb.toString();
                }
            }));
            item.add(textWrapper);

            TextField text = new TextField(ID_TEXT, createTextModel(item.getModel()));
            text.add(new AjaxFormComponentUpdatingBehavior("blur") {
                @Override
                protected void onUpdate(AjaxRequestTarget target) {
                }
            });
            text.setRequired(required);
            text.add(AttributeAppender.replace("placeholder", label));
            text.setLabel(label);
            textWrapper.add(text);

            FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(text));
            textWrapper.add(feedback);

            WebMarkupContainer buttonGroup = new WebMarkupContainer(ID_BUTTON_GROUP);
            buttonGroup.add(AttributeAppender.append("class", new AbstractReadOnlyModel<String>() {

                @Override
                public String getObject() {
                    if (item.getIndex() > 0 && StringUtils.isNotEmpty(labelSize)) {
                        return CLASS_MULTI_VALUE;
                    }

                    return null;
                }
            }));
            item.add(buttonGroup);

            initButtons(buttonGroup, item);
        }
    };
    add(repeater);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:65,代码来源:MultiValueTextFormGroup.java


示例10: initLayout

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(final IModel<PrismContainerValue<ShadowAssociationType>> value, 
 		final List<PrismPropertyValue> values, final boolean required, Class<C> type) {


     WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);

     textWrapper.setOutputMarkupId(true);

     TextField<String> text = new TextField<>(ID_TEXT, createTextModel(value));
     text.add(new AjaxFormComponentUpdatingBehavior("blur") {
private static final long serialVersionUID = 1L;

@Override
         protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
         }
     });
     text.setRequired(required);
     text.setEnabled(false);
     textWrapper.add(text);

     FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(text));
     feedback.setFilter(new ComponentFeedbackMessageFilter(text));
     textWrapper.add(feedback);

     AjaxLink edit = new AjaxLink(ID_EDIT) {
private static final long serialVersionUID = 1L;

@Override
         public void onClick(AjaxRequestTarget target) {
             editValuePerformed(target);
         }
     };
     edit.add(new VisibleEnableBehaviour() {
     	private static final long serialVersionUID = 1L;
     	
         @Override
         public boolean isVisible() {
             return model.getObject().isEmpty();
         }
     });
     textWrapper.add(edit);
     add(textWrapper);

     initDialog(type, values);

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


示例11: setFeedbackFor

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
public void setFeedbackFor(Component component){
	filter = new ComponentFeedbackMessageFilter(component);
}
 
开发者ID:premium-minds,项目名称:pm-wicket-utils,代码行数:4,代码来源:AjaxComponentFeedbackPanel.java


示例12: onInitialize

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
@Override
protected void onInitialize() {
	super.onInitialize();
	
	WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);

	textWrapper.setOutputMarkupId(true);

	TextField<String> text = new TextField<String>(ID_TEXT, createTextModel());
	text.add(new AjaxFormComponentUpdatingBehavior("blur") {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
		}
	});
	text.setRequired(isRequired());
	text.setEnabled(false);
	textWrapper.add(text);

	FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(text));
	textWrapper.add(feedback);

	AjaxLink<String> edit = new AjaxLink<String>(ID_EDIT) {
		private static final long serialVersionUID = 1L;

		@Override
		public void onClick(AjaxRequestTarget target) {
			editValuePerformed(target);
		}
	};
	
	edit.add(new VisibleEnableBehaviour() {
		
		private static final long serialVersionUID = 1L;
		@Override
		public boolean isEnabled() {
			return isEditButtonEnabled();
		}
	});
	textWrapper.add(edit);
	add(textWrapper);

       initButtons();
   }
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:46,代码来源:ValueChoosePanel.java


示例13: initLayout

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(IModel<List<T>> choices, IChoiceRenderer<T> renderer, IModel<String> label, final String tooltipKey,
                          boolean isTooltipInModal, String labelSize, String textSize, final boolean required) {
      WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
      add(labelContainer);

      Label l = new Label(ID_LABEL, label);
      if (StringUtils.isNotEmpty(labelSize)) {
          labelContainer.add(AttributeAppender.prepend("class", labelSize));
      }
      labelContainer.add(l);

Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {

	@Override
	public String getObject() {
		return getString(tooltipKey);
	}
}));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour() {

	@Override
	public boolean isVisible() {
		return tooltipKey != null;
	}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);

WebMarkupContainer requiredContainer = new WebMarkupContainer(ID_REQUIRED);
requiredContainer.add(new VisibleEnableBehaviour() {
	@Override
	public boolean isVisible() {
		return required;
	}
});
labelContainer.add(requiredContainer);

      WebMarkupContainer selectWrapper = new WebMarkupContainer(ID_SELECT_WRAPPER);
      if (StringUtils.isNotEmpty(textSize)) {
          selectWrapper.add(AttributeAppender.prepend("class", textSize));
      }
      add(selectWrapper);

      DropDownChoice select = createDropDown(ID_SELECT, choices, renderer, required);
      select.setLabel(label);
      selectWrapper.add(select);

      FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(select));
      feedback.setOutputMarkupId(true);
      selectWrapper.add(feedback);

Component additionalInfo = createAdditionalInfoComponent(ID_ADDITIONAL_INFO);
if (additionalInfo == null) {
	additionalInfo = new Label(ID_ADDITIONAL_INFO, "");
}
selectWrapper.add(additionalInfo);
  }
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:61,代码来源:DropDownFormGroup.java


示例14: initLayout

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(final IModel<List<T>> chosenValues, final List<PrismReferenceValue> filterValues,
	final boolean required, final boolean multiselect) {

AjaxLink<String> edit = new AjaxLink<String>(ID_EDIT) {
	private static final long serialVersionUID = 1L;

	@Override
	public void onClick(AjaxRequestTarget target) {
		editValuePerformed(chosenValues.getObject(), filterValues, target, multiselect);
	}
};
edit.setOutputMarkupPlaceholderTag(true);
add(edit);

ListView<T> selectedRowsList = new ListView<T>(ID_SELECTED_ROWS, chosenValues) {

	@Override
	protected void populateItem(ListItem<T> item) {
		WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);

		textWrapper.setOutputMarkupPlaceholderTag(true);

		TextField<String> text = new TextField<String>(ID_TEXT, createTextModel(item.getModel())); //was value
		text.add(new AjaxFormComponentUpdatingBehavior("blur") {
			private static final long serialVersionUID = 1L;

			@Override
			protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
			}
		});
		text.setRequired(required);
		text.setEnabled(false);
		text.setOutputMarkupPlaceholderTag(true);
		textWrapper.add(text);

		FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(text));
		feedback.setOutputMarkupPlaceholderTag(true);
		textWrapper.add(feedback);

        initButtons(item, item);

        item.add(textWrapper);
	}
};
selectedRowsList.setReuseItems(true);
add(selectedRowsList);
  }
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:48,代码来源:MultiValueChoosePanel.java


示例15: BootstrapFeedbackPanel

import org.apache.wicket.feedback.ComponentFeedbackMessageFilter; //导入依赖的package包/类
/**
 * Constructor. Builds a feedback panel which filters messages based on the component
 * 
 * @param id
 * 				the component id
 * @param level
 * 				the message level
 * @param componentToFilter
 * 				catch only feedback from this component
 * 
 * @see org.apache.wicket.markup.html.panel.ComponentFeedbackPanel
 */
public BootstrapFeedbackPanel(String id, final int level, final Component componentToFilter) {
	this(id, new AndComposedFeedbackMessageFilter(
				new ComponentFeedbackMessageFilter(componentToFilter),
				new FeedbackMessageLevelFilter(level)));
	return;
}
 
开发者ID:premium-minds,项目名称:pm-wicket-utils,代码行数:19,代码来源:BootstrapFeedbackPanel.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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