btw, it's a total hack and an ugly cast, but we should be able to support backwards compatibility with the current Form(... IFeedback) constructor by simply adding the form to the feedback.
/**
*
* @deprecated ...
*/
public Form(String id, ..., IFeedback feedback)
{
   ...

   ((AbstractFeedback)feedback).add(this);
}


Phil Kulak wrote:

Yea, I like that too. How do we deal with multiple forms, each with a
panel just before it in the tree? Do we just require that you put the
panel inside each form in that case? I'm fine with that, unless it
could break (X)HTML compliance or layouts for some people.

On 7/30/05, Jonathan Locke <[EMAIL PROTECTED]> wrote:
actually, i think it would be better to have a base class for feedback
components that
implements the recursive message gathering and which can be given a
Class at which to
stop.  it could also include a filter method to allow the feedback to
filter components
in terms of which components get included in the message gathering and
also in terms
of which components are recursed into.  so it would be something like:

public class AbstractFeedback implements IFeedback
{
   final Class feedbackBoundary;

   public AbstractFeedback(String id)
   {
      super(id);
      this.feedbackBoundary = null;
   }

   public AbstractFeedback(String id, Class feedbackBoundary)
   {
      super(id);
      this.feedbackBoundary = feedbackBoundary;
   }

   protected boolean recurseInto(Component component)
   {
      return feedbackBoundary == null ||
feedbackBoundary.isInstance(component);
   }

   protected boolean includeMessagesFrom(Component component)
   {
      return true;
   }
}

public class FeedbackPanel extends AbstractFeedback
{
   ...
}

public class FeedbackLabel extends AbstractFeedback
{
   ...
}

public class MyPage
{
   public MyPage()
   {
      // Add feedback panel for page that does not include messages
from the embedded form
      add(new FeedbackPanel("feedback", Form.class));
   }
}


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&opÌk
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to