You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Doug Leeper <do...@yahoo.com> on 2009/12/02 19:11:24 UTC

Customized FeedbackPanel question

We have a requirement to render the offending FormComponent with a visual change (not an indicator...but a style change such as background is red) and show the error message below the component.
I have created a customized FeedbackPanel for this so this is not a problem.

The problem we have is that we also have a FeedbackPanel at the top of the page which renders the error message as well.  We don't the message to be rendered twice.

I have attempted this behavior by playing around with the IFeedbackMessageFilter, onBeforeRenderer and markRendered method but my efforts have failed.  I was hoping that there was a onBeforeXXX method that can be called so I can determine if what messages are to be renderered in the FeedbackPanel before they are actually renderered.  It appears that the component is rendered right after onBeforeRender before moving on to the next child component.

Has anyone else come into this requirement and have found an acceptable solution?  Is there another onBeforeXXX method that is called before rendering and traverses the entire component graph that I may override and mark messages as rendrered?

Thanks in advance.
- Doug


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized FeedbackPanel question

Posted by Doug Leeper <do...@yahoo.com>.
That is my backup plan.
-- 
View this message in context: http://old.nabble.com/Customized-FeedbackPanel-question-tp26613644p26614645.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized FeedbackPanel question

Posted by Igor Vaynberg <ig...@gmail.com>.
you are welcome to build whatever strategy you want.

for example you can create two classes: local and global feedback
panel, and in the global one when you filter a message you are visit
all local panels and see if theyve accepted or would accept that
message using their filter.

-igor

On Thu, Dec 3, 2009 at 5:58 AM, Leszek Gawron <lg...@apache.org> wrote:
> Igor Vaynberg wrote:
>>
>> why dont you simply check in your filter if the reporter component is
>> a descendant of the form and then ignore the message?
>
> I have the same problem. If you build a heavy componentized page with lots
> of panels your solution is hard to implement.
>
> Lets say there are on the page:
>  - some panels has it's own FeedbackPanel (properly filtered)
>  - some panels with no FeedbackPanel
>
> Is there a possibility to put a "global" FeedbackPanel on the page and put
> in it ONLY the messages that have been filtered out by every "local"
>  FeedbackPanel?
>
> Or the other way around: global FeedbackPanel filters out anything that
>  local FeedbackPanels accept.
>
>        lg
> --
> Leszek Gawron                              http://lgawron.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized FeedbackPanel question

Posted by Leszek Gawron <lg...@apache.org>.
Igor Vaynberg wrote:
> why dont you simply check in your filter if the reporter component is
> a descendant of the form and then ignore the message?

I have the same problem. If you build a heavy componentized page with 
lots of panels your solution is hard to implement.

Lets say there are on the page:
  - some panels has it's own FeedbackPanel (properly filtered)
  - some panels with no FeedbackPanel

Is there a possibility to put a "global" FeedbackPanel on the page and 
put in it ONLY the messages that have been filtered out by every "local" 
  FeedbackPanel?

Or the other way around: global FeedbackPanel filters out anything that 
  local FeedbackPanels accept.

	lg
-- 
Leszek Gawron                              http://lgawron.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized FeedbackPanel question

Posted by Igor Vaynberg <ig...@gmail.com>.
why dont you simply check in your filter if the reporter component is
a descendant of the form and then ignore the message?

-igor

On Wed, Dec 2, 2009 at 10:11 AM, Doug Leeper <do...@yahoo.com> wrote:
> We have a requirement to render the offending FormComponent with a visual change (not an indicator...but a style change such as background is red) and show the error message below the component.
> I have created a customized FeedbackPanel for this so this is not a problem.
>
> The problem we have is that we also have a FeedbackPanel at the top of the page which renders the error message as well.  We don't the message to be rendered twice.
>
> I have attempted this behavior by playing around with the IFeedbackMessageFilter, onBeforeRenderer and markRendered method but my efforts have failed.  I was hoping that there was a onBeforeXXX method that can be called so I can determine if what messages are to be renderered in the FeedbackPanel before they are actually renderered.  It appears that the component is rendered right after onBeforeRender before moving on to the next child component.
>
> Has anyone else come into this requirement and have found an acceptable solution?  Is there another onBeforeXXX method that is called before rendering and traverses the entire component graph that I may override and mark messages as rendrered?
>
> Thanks in advance.
> - Doug
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org