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

Java ContainerFeedbackMessageFilter类代码示例

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

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



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

示例1: initInputProperties

import org.apache.wicket.feedback.ContainerFeedbackMessageFilter; //导入依赖的package包/类
private void initInputProperties(FeedbackPanel feedback, TextPanel<String> input) {
	input.getBaseFormComponent().add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
	input.getBaseFormComponent().setRequired(true);
	feedback.setFilter(new ContainerFeedbackMessageFilter(input.getBaseFormComponent()));

	input.add(new VisibleEnableBehaviour() {

		private static final long serialVersionUID = 1L;

		@Override
		public boolean isEnabled() {
			return getOidFromParams(getPageParameters()) == null;
		}

	});

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


示例2: initComponents

import org.apache.wicket.feedback.ContainerFeedbackMessageFilter; //导入依赖的package包/类
private void initComponents() {
    NavigationMenuFirstLevel navFirstLvl = new NavigationMenuFirstLevel();
    add(navFirstLvl);
    /* set head page title to display in browser title bar */
    add(new Label("head_page_title", getString("portal.design.web.title.homepage")));

    List<BreadcrumbsItem> breadcrumbsItems = new ArrayList<BreadcrumbsItem>();
    breadcrumbsItems.add(new BreadcrumbsItem(this.getClass(), "portal.design.breadcrumbs.homepage", null, true));
    Breadcrumbs breadcrumbs = new Breadcrumbs("breadcrumbs", breadcrumbsItems);
    add(breadcrumbs);

    feedback = new FeedbackPanel("feedback", new ContainerFeedbackMessageFilter(this));
    feedback.setOutputMarkupId(true);
    add(feedback);

    add(new ManageStatsForm("manageStatsForm"));

    StatsTablePanel statsTablePanel = new StatsTablePanel("statsTablePanel");
    add(statsTablePanel);

}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:22,代码来源:AdminHomePage.java


示例3: CaptchaPanel

import org.apache.wicket.feedback.ContainerFeedbackMessageFilter; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param id
 *            The component id
 */
public CaptchaPanel(String id) {
	super(id);

	FeedbackPanel feedback = new FeedbackPanel("feedback",
			new ContainerFeedbackMessageFilter(CaptchaPanel.this));
	add(feedback);

	captchaImageResource = createCaptchImageResource();
	final Image captchaImage = new Image("image", captchaImageResource);
	captchaImage.setOutputMarkupId(true);
	add(captchaImage);

	AjaxLink<Void> changeCaptchaLink = new AjaxLink<Void>("changeLink") {
				private static final long serialVersionUID = 1L;

		@Override
		public void onClick(AjaxRequestTarget target) {
			captchaImageResource.invalidate();
			target.add(captchaImage);
		}
	};
	add(changeCaptchaLink);

	add(new RequiredTextField<String>("text",
			new PropertyModel<String>(CaptchaPanel.this, "captchaText"), String.class) {
							private static final long serialVersionUID = 1L;

		@Override
		protected final void onComponentTag(final ComponentTag tag) {
			super.onComponentTag(tag);
			// clear the field after each render
			tag.put("value", "");
		}
	});
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:42,代码来源:CaptchaPanel.java


示例4: SignInForm

import org.apache.wicket.feedback.ContainerFeedbackMessageFilter; //导入依赖的package包/类
public SignInForm(String id) { 
  super(id); 
  setDefaultModel(new CompoundPropertyModel<SignInForm>(this)); 
  
  add(new FeedbackPanel("feedback", new ContainerFeedbackMessageFilter(this)));
  
  add(new TextField<String>("username")); 
  add(new PasswordTextField("password"));   
}
 
开发者ID:ontopia,项目名称:ontopia,代码行数:10,代码来源:SignInPage.java


示例5: InputBorder

import org.apache.wicket.feedback.ContainerFeedbackMessageFilter; //导入依赖的package包/类
/**
 * Constructor.
 * 
 * @param id
 * @param inputComponent
 * @param labelModel
 *            optional
 * @param helpModel
 *            optional
 */
public InputBorder(final String id, final FormComponent<T> inputComponent,
		final IModel<String> labelModel, final IModel<String> helpModel) {
	super(id);

	Args.notNull(labelModel, "labelModel");
	Args.notNull(helpModel, "helpModel");

	// set html id so that this border can be refreshed by ajax
	this.setOutputMarkupId(true);

	// add the form component to the border
	this.inputComponent = inputComponent;
	add(this.inputComponent);

	
	// add the label
	WebMarkupContainer labelContainer = new WebMarkupContainer(labelContainerID);
	Label label = new Label(labelID, labelModel);
	label.setEscapeModelStrings(false);
	labelContainer.add(new AttributeModifier("for", Model.of(inputComponent.getMarkupId())));
	labelContainer.add(label);
	addToBorder(labelContainer);

	// add the help label
	addToBorder(new Label(helpID, helpModel).setEscapeModelStrings(false));

	// add the feedback panel with filter so that it only shows messages
	// relevant for this input component
	this.feedback = new FeedbackPanel(feedbackPanelID,
			new ContainerFeedbackMessageFilter(this));
	addToBorder(this.feedback.setOutputMarkupId(true));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:43,代码来源:InputBorder.java


示例6: CaptchaPanel

import org.apache.wicket.feedback.ContainerFeedbackMessageFilter; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param id
 *            The component id
 */
public CaptchaPanel(String id) {
	super(id);

	FeedbackAlerts feedback = new FeedbackAlerts("feedback");
	feedback.setFilter(new ContainerFeedbackMessageFilter(CaptchaPanel.this));
	add(feedback);
	
	captchaImageResource = createCaptchImageResource();
	final Image captchaImage = new Image("image", captchaImageResource);
	captchaImage.setOutputMarkupId(true);
	add(captchaImage);

	AjaxLink<Void> changeCaptchaLink = new AjaxLink<Void>("changeLink") {
				private static final long serialVersionUID = 1L;

		@Override
		public void onClick(AjaxRequestTarget target) {
			captchaImageResource.invalidate();
			target.add(captchaImage);
		}
	};
	add(changeCaptchaLink);

	add(new RequiredTextField<String>("text",
			new PropertyModel<String>(CaptchaPanel.this, "captchaText"), String.class) {
							private static final long serialVersionUID = 1L;

		@Override
		protected final void onComponentTag(final ComponentTag tag) {
			super.onComponentTag(tag);
			// clear the field after each render
			tag.put("value", "");
		}
	});
}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:42,代码来源:CaptchaPanel.java


示例7: initLayout

import org.apache.wicket.feedback.ContainerFeedbackMessageFilter; //导入依赖的package包/类
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize, String textSize, final boolean required,
	final boolean markAsRequired) {
      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 markAsRequired;
	}
});
labelContainer.add(requiredContainer);

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

      TextField text = createText(getModel(), label, required);
      text.setLabel(label);
      textWrapper.add(text);

      FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ContainerFeedbackMessageFilter(this));
      feedback.setOutputMarkupId(true);
      textWrapper.add(feedback);
  }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:55,代码来源:TextFormGroup.java


示例8: FormGroupBorder

import org.apache.wicket.feedback.ContainerFeedbackMessageFilter; //导入依赖的package包/类
public FormGroupBorder(String id, IModel<String> labelModel) {
    super(id);

    formComponent = new LoadableDetachableModel<FormComponent<?>>() {
        private static final long serialVersionUID = 1L;
        @Override
        protected FormComponent<?> load() {
            return getBodyContainer().visitChildren(FormComponent.class, new IVisitor<FormComponent<?>, FormComponent<?>>() {
                @Override
                public void component(FormComponent<?> object, IVisit<FormComponent<?>> visit) {
                    visit.stop(object);
                }
            });
        }
    };

    Label label;
    addToBorder(label = new Label("label", labelModel));

    label.add(new AttributeAppender("for", new PropertyModel<>(formComponent, "markupId")));

    addToBorder(feedbackPanel = new FeedbackPanel("feedback", new ContainerFeedbackMessageFilter(getBodyContainer())));

    WebMarkupContainer feedbackIcon;
    addToBorder(feedbackIcon = new WebMarkupContainer("feedbackIcon"));

    feedbackIcon.add(new AttributeAppender("class", new LoadableDetachableModel<String>() {
        private static final long serialVersionUID = 1L;
        @Override
        protected String load() {
            if (!feedbackPanel.anyMessage()) {
                return "";
            }
            return feedbackPanel.anyErrorMessage() ? "glyphicon-remove" : "glyphicon-ok";
        }
    }, " "));

    add(new AttributeAppender("class", new LoadableDetachableModel<String>() {
        private static final long serialVersionUID = 1L;
        @Override
        protected String load() {
            if (!feedbackPanel.anyMessage()) {
                return "";
            }
            return feedbackPanel.anyErrorMessage() ? "has-feedback has-error" : "has-feedback has-success";
        }
    }, " "));
}
 
开发者ID:nikfoundas,项目名称:etcd-viewer,代码行数:49,代码来源:FormGroupBorder.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java RefreshScope类代码示例发布时间:2022-05-23
下一篇:
Java CropImageIntentBuilder类代码示例发布时间: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