well, its not the default because this is a tiny subset of what wicket's feedback system is capable of.

now if it is a common usecase in your app you can craete a BoundedFeedbackPanel given the code i gave you previously. its a 10 line component that you can then reuse in your app - this is the power of wicket. we give you the tools that make it easy to adapt the functionality to many situations. if we started to provide impls for all common usecases the api would be too big and you would have a hard time finding what you needed anyways.

-Igor


On 8/13/06, Predrag Spasojevic <[EMAIL PROTECTED]> wrote:
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



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