Package org.apache.wicket.feedback

Examples of org.apache.wicket.feedback.FeedbackMessage


        }

        @Override
        public void onComplete(File file) {
            String message = String.format("File '%s' was successfully converted.", inputName);
            feedbackMessage = new FeedbackMessage(DemoPage.this, message, FeedbackMessage.SUCCESS);
            LOGGER.info(message);
        }
View Full Code Here


        }

        @Override
        public void onCancel(File file) {
            String message = String.format("File conversion of '%s' was cancelled.", inputName);
            feedbackMessage = new FeedbackMessage(DemoPage.this, message, FeedbackMessage.ERROR);
            LOGGER.error(message);
        }
View Full Code Here

        @Override
        public void onException(File file, Exception e) {
            String message = String.format("Could not convert file '%s'. Did you provide a valid MS Word file as input? [%s: %s]",
                    inputName, e.getClass().getSimpleName(), e.getMessage());
            feedbackMessage = new FeedbackMessage(DemoPage.this, message, FeedbackMessage.ERROR);
            LOGGER.error(message, e);
        }
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)
     */
    @Override
    protected void populateItem(final ListItem listItem)
    {
      final FeedbackMessage message = (FeedbackMessage)listItem.getModelObject();
      message.markRendered();
      final IModel<String> replacementModel = new Model<String>()
      {
        private static final long serialVersionUID = 1L;

        /**
 
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

                for (Map.Entry<Integer, String> levelEntry : fieldLevels
                        .entrySet()) {
                    String message = getMessageForLevel(levelEntry.getKey(), levelEntry.getValue());
                    if (message != null && !message.isEmpty()) {
                        outMessages.add(new FeedbackMessage(
                                GeneralFeedbackPanel.this, message, levelEntry
                                        .getKey()));
                    }
                }
View Full Code Here

                            return super.accept(message);
                        }
                    });
           
            if(messages != null && !messages.isEmpty()) {
                FeedbackMessage message = messages.iterator().next();
                Serializable messageObject = message.getMessage();
                return messageObject == null ? null : messageObject.toString();
            }
        }
        return null;
    }
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

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.