本文整理匯總了Java中org.apache.wicket.markup.html.panel.FeedbackPanel類的典型用法代碼示例。如果您正苦於以下問題:Java FeedbackPanel類的具體用法?Java FeedbackPanel怎麽用?Java FeedbackPanel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FeedbackPanel類屬於org.apache.wicket.markup.html.panel包,在下文中一共展示了FeedbackPanel類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: PostmanConvertPanel
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
public PostmanConvertPanel(String id) {
super(id);
setDefaultModel(new CompoundPropertyModel(this));
Form form = new Form("form") {
@Override
protected void onSubmit() {
logger.debug("text is: {}", text);
List<PostmanRequest> requests = ConvertUtils.readPostmanJson(text);
String feature = ConvertUtils.toKarateFeature(requests);
KarateSession session = service.createSession("dev", feature);
setResponsePage(new FeaturePage(session.getId()));
}
};
form.add(new TextArea("text"));
add(form);
add(new FeedbackPanel("feedback"));
text = "Paste your postman collection here.";
}
示例2: initLayout
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的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);
}
示例3: initInputProperties
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的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;
}
});
}
示例4: getFeedbackPanel
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
@Override
public FeedbackPanel getFeedbackPanel(String id, int level, MarkupContainer component) {
return new ErrorLevelFeedbackPanel(id, level) {
private static final long serialVersionUID = 4843857703266180362L;
private boolean visible = false;
@Override
public boolean isVisible() {
return visible;
}
@Override
protected void onConfigure() {
// cf WICKET-4536 : ceci dit, même après mise à jour, on a encore eu des cas avec le problème
// du coup, on laisse comme ça
super.onConfigure();
visible = anyMessage(level);
}
};
}
示例5: initComponents
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的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);
}
示例6: init
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
private void init() {
add(userContainer("user-container"));
add(new BookmarkablePageLink<Void>("self-link", getApplication().getHomePage()));
add(new Label("page-title", getTitle()));
add(new Label("page-head-title", getHeadTitle()));
add(new Label("superfly-version", settingsService.getSuperflyVersion()));
feedbackPanel = new FeedbackPanel("feedback");
feedbackPanel.setOutputMarkupId(true);
add(feedbackPanel);
addNavBarItem("subsystems", ListSubsystemsPage.class);
addNavBarItem("actions", ListActionsPage.class);
addNavBarItem("groups", ListGroupsPage.class);
addNavBarItem("users", ListUsersPage.class);
addNavBarItem("roles", ListRolesPage.class);
addNavBarItem("sessions", ListSessionsPage.class);
addNavBarItem("smtp", ListSmtpServersPage.class);
}
示例7: FieldInstanceErrorPanel
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
public FieldInstanceErrorPanel(String id, final FieldInstanceModel fieldInstanceModel, Exception e) {
super(id, fieldInstanceModel);
FieldInstance fieldInstance = fieldInstanceModel.getFieldInstance();
FieldAssignment fieldAssignment = fieldInstance.getFieldAssignment();
FieldDefinition fieldDefinition = fieldAssignment.getFieldDefinition();
add(new FieldDefinitionLabel("fieldLabel", new FieldDefinitionModel(fieldDefinition)));
error(AbstractFieldInstancePanel.createErrorMessage(fieldInstanceModel, e));
// set up container
this.fieldValuesContainer = new WebMarkupContainer("fieldValuesContainer");
fieldValuesContainer.setOutputMarkupId(true);
add(fieldValuesContainer);
// add feedback panel
this.feedbackPanel = new FeedbackPanel("feedback", new AbstractFieldInstancePanelFeedbackMessageFilter());
feedbackPanel.setOutputMarkupId(true);
fieldValuesContainer.add(feedbackPanel);
}
示例8: AbstractDemoPage
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
public AbstractDemoPage() {
add(new BookmarkablePageLink<String>("list", NotesPage.class) {
@Override
public boolean isVisible() {
return AbstractDemoPage.this.getSession().isLoggedIn();
}
});
add(new BookmarkablePageLink<String>("newNote", NotePage.class) {
@Override
public boolean isVisible() {
return AbstractDemoPage.this.getSession().isLoggedIn();
}
});
add(new Label("user", new PropertyModel<String>(this,
"session.user.name")) {
@Override
public boolean isVisible() {
return AbstractDemoPage.this.getSession().isLoggedIn();
}
});
add(new FeedbackPanel("feedback"));
}
示例9: setupPage
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
protected void setupPage(String repositoryName, String pageName) {
String siteName = GitBlit.getString(Keys.web.siteName, Constants.NAME);
if (StringUtils.isEmpty(siteName)) {
siteName = Constants.NAME;
}
if (repositoryName != null && repositoryName.trim().length() > 0) {
add(new Label("title", repositoryName + " - " + siteName));
} else {
add(new Label("title", siteName));
}
ExternalLink rootLink = new ExternalLink("rootLink", urlFor(GitBlitWebApp.HOME_PAGE_CLASS, null).toString());
WicketUtils.setHtmlTooltip(rootLink, GitBlit.getString(Keys.web.siteName, Constants.NAME));
add(rootLink);
// Feedback panel for info, warning, and non-fatal error messages
add(new FeedbackPanel("feedback"));
add(new Label("gbVersion", "v" + Constants.getVersion()));
if (GitBlit.getBoolean(Keys.web.aggressiveHeapManagement, false)) {
System.gc();
}
}
示例10: RechnungCostEditTablePanel
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
/**
* @param id
*/
@SuppressWarnings("serial")
public RechnungCostEditTablePanel(final String id)
{
super(id);
feedbackPanel = new FeedbackPanel("feedback");
ajaxComponents.register(feedbackPanel);
add(feedbackPanel);
this.form = new Form<AbstractRechnungsPositionDO>("form") {
@Override
protected void onSubmit()
{
super.onSubmit();
csrfTokenHandler.onSubmit();
}
};
add(form);
csrfTokenHandler = new CsrfTokenHandler(form);
rows = new RepeatingView("rows");
form.add(rows);
}
示例11: init
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
@SuppressWarnings("serial")
protected void init()
{
add(new FeedbackPanel("feedback").setOutputMarkupId(true));
final SubmitLink submitButton = new SubmitLink("submitButton") {
@Override
public final void onSubmit()
{
parentPage.save();
}
};
final RepeatingView flowform = new RepeatingView("flowform");
add(flowform);
gridBuilder = newGridBuilder(flowform);
add(submitButton);
if (isNew() == true) {
submitButton.add(new Label("label", getString("create")));
} else {
submitButton.add(new Label("label", getString("update")));
}
}
示例12: InsertContact
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
public InsertContact() {
add(new FeedbackPanel("feedback"));
insertForm = new Form<Contact>("insertForm") {
@Override
protected void onSubmit() {
contactDao.addContact(name, email);
setResponsePage(ListContacts.class);
}
};
insertForm.add(new RequiredTextField<String>("name",
new PropertyModel<String>(this, "name")));
insertForm.add(new RequiredTextField<String>("email", new PropertyModel<String>(this,
"email")));
add(insertForm);
}
示例13: InsertContact
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
public InsertContact() {
add(new FeedbackPanel("feedback"));
insertForm = new Form<Contact>("insertForm") {
@Override
protected void onSubmit() {
contactDao.addContact(name, email);
setResponsePage(ListContacts.class);
}
};
insertForm.add(new RequiredTextField<String>("name", new PropertyModel<String>(this, "name")));
insertForm.add(new RequiredTextField<String>("email", new PropertyModel<String>(this, "email")));
add(insertForm);
}
示例14: DynamicForm
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
public DynamicForm(final String id, final IModel<Form> model, PanelFactory panelFactory,
Submittable submittable) {
super(id, model);
this.submittable = submittable;
Form form = model.getObject();
FeedbackPanel feedbackPanel = new FeedbackPanel("feedback") {
@Override
public boolean isVisible() {
return hasError();
}
};
add(feedbackPanel);
add(new Label("formTitle", form.getLabel()));
add(new SectionPanel("sectionPanel", form.getMainSection(), panelFactory));
for (FormValidator formValidator : form.getValidators()) {
add(new WickedFormValidator(formValidator, this));
}
}
示例15: DynamicForm
import org.apache.wicket.markup.html.panel.FeedbackPanel; //導入依賴的package包/類
public DynamicForm(final String id, final IModel<Form> model, PanelFactory panelFactory,
Submittable submittable, boolean showSubmitButton) {
super(id, model);
this.submittable = submittable;
Form formModel = model.getObject();
FeedbackPanel feedbackPanel = new FeedbackPanel("feedback") {
@Override
public boolean isVisible() {
return hasError();
}
};
add(feedbackPanel);
add(new Label("formTitle", formModel.getLabel()));
add(new SectionPanel("sectionPanel", formModel.getMainSection(), panelFactory));
for (FormValidator formValidator : formModel.getValidators()) {
add(new WickedFormValidator(formValidator, this));
}
WebMarkupContainer submittableContainer = new WebMarkupContainer("submittableContainer");
submittableContainer.setVisible(showSubmitButton);
add(submittableContainer);
}