Hello once again,

I've been coding some Panels that might (or might not) use a FeedbackPanel to inform about their states, these panels are Ajax enabled. Since the feedbackPanel does not reside on the panel itself (it is added to the panels parent component), I've decided to come out with a wrapper panel that should support this out of the box (shown below), the problem is that after calling "infoFeedback("some msg", target)" I don't see the message displayed in the Parent component (a WebPage). I thought calling FeedbackPanel#getParent()#info(String msg) will do the trick, but I guess I was wrong. I would really appreciate any help.

public abstract class FeedbackHolderPanel extends Panel {
   private FeedbackPanel feedbackPanel;
public FeedbackHolderPanel(String id) {
       super(id);
   }
public Panel addFeedbackPanel(FeedbackPanel feedbackPanel) { this.feedbackPanel = feedbackPanel;
       feedbackPanel.setOutputMarkupId(true);
return this;
   }
protected void infoFeedback(String msg, AjaxRequestTarget target) {
       if (feedbackPanel != null) {
           feedbackPanel.getParent().info(msg);
addToTarget(target); }
   }
.. {same goes for warn and error} ... protected FeedbackPanel getFeedbackPanel() {
       return feedbackPanel;
   }
private void addToTarget(AjaxRequestTarget target) {
       if (target != null) {
           target.addComponent(feedbackPanel);
       }
   }
}

Thanks in advance
Edgar Merino

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to