Why it isn't FeedbackPanel's default behavior?
 
I think that the common use is one FeedbackPanel per form, not per page

 
On 8/13/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
final Form form=.....
new FeedbackPanel("foo", new IFeedbackMessageFilter() {
    boolean accept(FeedbackMessage message) {
            // messages reported on the session have a null reporter
            if ( message.getreporter()!=null) {
                     // only accept messages coming from the children of the form
                     return form.contains(message.getreporter(), true);
            }
            return false;
    }
}

-Igor


On 8/13/06, Predrag Spasojevic < [EMAIL PROTECTED]> wrote:
Hi,
 
I have a page with 2 panels. Each panel has its own form and feedback panel. When any validator fails the same messages are displayed on both feedback panels.
 
I have looked into wicket source code and in the class FeedbackMessageModel there is a method for getting feedback messages:
 
 public final Object onGetObject(final Component component)
 {
  if (messages == null)
  {
   // Get filtered messages from page where component lives
   List pageMessages = component.getPage().getFeedbackMessages() .messages(filter);
 
 
It looks like when validator fails it adds feedback message to a page. And when feedback panel is displayed it calls page to get messages. I suppose that is the reason why both feedback panels shows the same messages.
 
Is there any way to have two feedback panels on one page that are not showing the same messages?

--
Regards,
Predrag Spasojevic

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
Pozdrav,
Predrag Spasojevic
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to