Re: [Wicket-user] Two feedback panels on one page

2006-10-14 Thread Landry Soules
Thank you Igor for the precision.

This behaviour is perfectly logical, so the case i describe shouldn't arise.
However, you never know the crazy things users will do ! So i'll give 
your session solution a try.

Best regards.

Landry

Igor Vaynberg a écrit :
> the panels dont delete feedback messages.
>
> components raise feedback messages - which are kept at the page level
> panels render messages
> at the end of request the message are cleared - so if they werent 
> shown during the same request they are gone
>
> if you have messages that need to span requests then you need to raise 
> them on the session object - session.error() etc. those are kept in 
> session until they are rendered
>
> -Igor
>
>
> On 10/14/06, *Landry Soules* <[EMAIL PROTECTED] 
> > wrote:
>
> Hello,
>
> I put this thread back to the light because I had a similar problem :
> My site has a signin panel on the left side, and another form in the
> center. Each of them has a feedback panel.
> In order to avoid having the same messages displayed in the 2
> panels, i
> followed Igor's tip, but now every feedback in one panel deletes the
> other's content...
> Please how can i solve this ?
>
>
>
> Igor Vaynberg a écrit :
> > 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
> >   

Re: [Wicket-user] Two feedback panels on one page

2006-10-14 Thread Igor Vaynberg
the panels dont delete feedback messages.components raise feedback messages - which are kept at the page levelpanels render messagesat the end of request the message are cleared - so if they werent shown during the same request they are gone
if you have messages that need to span requests then you need to raise them on the session object - session.error() etc. those are kept in session until they are rendered-Igor
On 10/14/06, Landry Soules <[EMAIL PROTECTED]> wrote:
Hello,I put this thread back to the light because I had a similar problem :My site has a signin panel on the left side, and another form in thecenter. Each of them has a feedback panel.In order to avoid having the same messages displayed in the 2 panels, i
followed Igor's tip, but now every feedback in one panel deletes theother's content...Please how can i solve this ?Igor Vaynberg a écrit :> 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]> [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]> [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]> [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
> 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
> 

Re: [Wicket-user] Two feedback panels on one page

2006-10-14 Thread Landry Soules
Hello,

I put this thread back to the light because I had a similar problem :
My site has a signin panel on the left side, and another form in the 
center. Each of them has a feedback panel.
In order to avoid having the same messages displayed in the 2 panels, i 
followed Igor's tip, but now every feedback in one panel deletes the 
other's content...
Please how can i solve this ?



Igor Vaynberg a écrit :
> 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.n

Re: [Wicket-user] Two feedback panels on one page

2006-08-13 Thread Igor Vaynberg
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.
-IgorOn 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.nethttps://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.nethttps://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.nethttps://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


Re: [Wicket-user] Two feedback panels on one page

2006-08-13 Thread Predrag Spasojevic
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.nethttps://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.nethttps://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


Re: [Wicket-user] Two feedback panels on one page

2006-08-13 Thread Igor Vaynberg
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;
    }}-IgorOn 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.nethttps://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