Package org.apache.wicket.feedback

Examples of org.apache.wicket.feedback.FeedbackMessage


  public Result hasNoFeedbackMessage(int level)
  {
    List<Serializable> messages = getMessages(level);
    return isTrue(
        String.format("expected no %s message, but contains\n%s",
            new FeedbackMessage(null, "", level).getLevelAsString().toLowerCase(Locale.ENGLISH), WicketTesterHelper.asLined(messages)),
        messages.isEmpty());
  }
View Full Code Here


        {
          return getCSSClass(listItem.getModelObject());
        }
      };

      final FeedbackMessage message = listItem.getModelObject();
      message.markRendered();
      final Component label = newMessageDisplayComponent("message", message);
      final AttributeModifier levelModifier = new AttributeModifier("class", replacementModel);
      label.add(levelModifier);
      listItem.add(levelModifier);
      listItem.add(label);
View Full Code Here

    }

    @Override
    protected void populateItem(final ListItem<FeedbackMessage> listItem)
    {
      final FeedbackMessage message = listItem.getModelObject();
      message.markRendered();
      final Component label = newMessageDisplayComponent("message", message);
      final AttributeModifier levelModifier = AttributeModifier.append("class",
        getCSSClass(message));
      listItem.add(levelModifier);
      listItem.add(label);
View Full Code Here

    Session session = Session.get();
    session.info("Message");
    session.info("Not rendered");
    FeedbackMessages feedbackMessages = session.getFeedbackMessages();
    Iterator iterator = feedbackMessages.iterator();
    FeedbackMessage message = (FeedbackMessage)iterator.next();
    message.markRendered();
    feedbackMessages.clear(RENDERED_MESSAGES);
    assertEquals(1, feedbackMessages.size());
    message = (FeedbackMessage)iterator.next();
    message.markRendered();
    feedbackMessages.clear(RENDERED_MESSAGES);
    assertEquals(0, feedbackMessages.size());
  }
View Full Code Here

  {
    List msgs = getCurrentMessages();

    for (Iterator i = msgs.iterator(); i.hasNext();)
    {
      FeedbackMessage msg = (FeedbackMessage)i.next();
      if (msg.isLevel(level))
      {
        return true;
      }
    }
View Full Code Here

    /**
     * @see org.apache.wicket.markup.html.list.ListView#populateItem(org.apache.wicket.markup.html.list.ListItem)
     */
    protected void populateItem(final ListItem listItem)
    {
      final FeedbackMessage message = (FeedbackMessage)listItem.getModelObject();
      message.markRendered();
      final IModel replacementModel = new Model()
      {
        private static final long serialVersionUID = 1L;

        /**
 
View Full Code Here

        // print(page, true, true);
        // simulate clicking on the refresh button
        String submitLink = base + "tableNamePanel:refresh";
        tester.executeAjaxEvent(submitLink, "onclick");
        FeedbackMessage feedbackMessage = formTester.getForm().getFeedbackMessage();
        assertNotNull(feedbackMessage);
        Serializable message = feedbackMessage.getMessage();
        assertNotNull(message);
        String expectedMessage = "Refreshing raster tables list: can't connect for some reason";
        assertEquals(expectedMessage, message.toString());
    }
View Full Code Here

        assertTrue(choice.getChoices().isEmpty());

        // simulate clicking on the refresh button
        String submitLink = base + "tableNamePanel:refresh";
        tester.executeAjaxEvent(submitLink, "onclick");
        FeedbackMessage feedbackMessage = formTester.getForm().getFeedbackMessage();
        assertNull(feedbackMessage);

        assertEquals(rasterColumns, choice.getChoices());
    }
View Full Code Here

     *      .list.ListItem)
     */
    @Override
    protected void populateItem(final ListItem<FeedbackMessage> listItem)
    {
      final FeedbackMessage message = listItem.getModelObject();
      message.markRendered();
      final IModel<String> replacementModel = new Model<String>()
      {
        private static final long serialVersionUID = 1L;

        /**
 
View Full Code Here

     *      .list.ListItem)
     */
    @Override
    protected void populateItem(final ListItem<FeedbackMessage> listItem)
    {
      final FeedbackMessage message = listItem.getModelObject();
      message.markRendered();
      final IModel<String> replacementModel = new Model<String>()
      {
        private static final long serialVersionUID = 1L;

        /**
 
View Full Code Here

TOP

Related Classes of org.apache.wicket.feedback.FeedbackMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.