Re: filter feedback messages

2011-09-28 Thread Andrea Del Bene
I've practically made a carbon copy of your code, but everything seems 
work well (tested also with wicket 1.4.13). Can you attach the full code 
(markup included) of your panel and pages?

hmm, stil no succes, still trying. again recap:

public class PageBase extends WebPage
{
public PageBase()
{
this.add(new PanelCart("cart").setRenderBodyOnly(true));
}
}

public class PageOrder extends PageBase
{
public PageOrder()
{
Form  form = new Form("formOrder")
{
@Override
protected void onSubmit()
{
//...do_something..
}
};
this.add(form);
TextField formOrderName = new TextField("formOrderName");

form.add(formOrderName.setRequired(true).add(StringValidator.lengthBetween(2
, 35)));
form.add(new FeedbackPanel("feedback"));
}
}

public class PanelCart extends Panel
{
public PanelCart(String id)
{
super(id);
//...do_something...
this.add(new FeedbackPanel("feedback", new
ComponentFeedbackMessageFilter(this)));
}
}

on pageorder when i put value long 1 character then there is error message -
but one on pageorder
and one on panelcart. message is on panelcart and it seems that
add(new FeedbackPanel("feedback", new
ComponentFeedbackMessageFilter(this)));
is on panelcart. not know what doing wrong.






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



RE: filter feedback messages

2011-09-28 Thread Miroslav F.
hmm, stil no succes, still trying. again recap:

public class PageBase extends WebPage
{
public PageBase()
{
this.add(new PanelCart("cart").setRenderBodyOnly(true));
}
}

public class PageOrder extends PageBase
{
public PageOrder()
{
Form form = new Form("formOrder")
{
@Override
protected void onSubmit()
{
//...do_something..
}
};
this.add(form);
TextField formOrderName = new TextField("formOrderName");

form.add(formOrderName.setRequired(true).add(StringValidator.lengthBetween(2
, 35)));
form.add(new FeedbackPanel("feedback"));
}
}

public class PanelCart extends Panel
{
public PanelCart(String id)
{
super(id);
//...do_something...
this.add(new FeedbackPanel("feedback", new
ComponentFeedbackMessageFilter(this)));
}
}

on pageorder when i put value long 1 character then there is error message -
but one on pageorder
and one on panelcart. message is on panelcart and it seems that
add(new FeedbackPanel("feedback", new
ComponentFeedbackMessageFilter(this)));
is on panelcart. not know what doing wrong.




> -Original Message-
> From: Miroslav F. [mailto:mir...@seznam.cz] 
> Sent: 28. September 2011 14:46
> To: users@wicket.apache.org
> Subject: FW: filter feedback messages
> 
> same with 1.4.18 
> 
> > -Original Message-
> > From: Miroslav F. [mailto:mir...@seznam.cz]
> > Sent: 28. September 2011 13:26
> > To: users@wicket.apache.org
> > Subject: RE: filter feedback messages
> > 
> > 1.4.13
> > 
> > > -Original Message-
> > > From: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
> > > Sent: 28. September 2011 13:00
> > > To: users@wicket.apache.org
> > > Subject: Re: filter feedback messages
> > > 
> > > Which version of Wicket are you using? I'm trying to
> > reproducing the
> > > bug wit 1.4.17 but without success.
> > > > at the moment o don't deal with form filter, i deal with
> > > problem how
> > > > to filter in PanelCart messages not produced in PanelCart
> > > and how to
> > > > set it in PanelCart -see below ;-)
> > > >
> > > >> -Original Message-
> > > >> From: manuelbarzi [mailto:manuelba...@gmail.com]
> > > >> Sent: 28. September 2011 12:39
> > > >> To: users@wicket.apache.org
> > > >> Subject: Re: filter feedback messages
> > > >>
> > > >> form may need a filter too.
> > > >>
> > > >>
> > > >> 2011/9/28 Miroslav F.:
> > > >>> i think that form doesn't need filter - or to be precise i
> > > >> don't want
> > > >>> to filter messages in form.
> > > >>>
> > > >>> i only need to filter messages in panelcart (which
> > extends panel):
> > > >>>
> > > >>> public class PanelCart extends Panel {
> > > >>> public PanelCart(String id)
> > > >>> {
> > > >>> super(id);
> > > >>> ...do_something...
> > > >>> --->  //this don't work, the panel still shows
> > > >> messages from
> > > >>> another page components
> > > >>> this.add(new FeedbackPanel("feedback", new 
> > > >>> ContainerFeedbackMessageFilter(this)));
> > > >>> }
> > > >>> }
> > > >>>
> > > >>> public class PageObjednavka extends PageBase {
> > > >>> public PageObjednavka()
> > > >>> {
> > > >>> Form  form = new
> > Form("formOrder")
> > > >>>     {
> > > >>> ...set_form... (own code)
> > > >>> };
> > > >>> this.add(form);
> > > >>>
> > > >>>
> > > >> 
> > > 
> > 
> form.add(formOrderName.setRequired(true).add(StringValidator.lengthBe
> > > >> t
> > > >>> ween(2
> > > >>> , 35)));
> > > >>>

RE: filter feedback messages

2011-09-28 Thread Miroslav F.
1.4.13 

> -Original Message-
> From: Andrea Del Bene [mailto:adelb...@ciseonweb.it] 
> Sent: 28. September 2011 13:00
> To: users@wicket.apache.org
> Subject: Re: filter feedback messages
> 
> Which version of Wicket are you using? I'm trying to 
> reproducing the bug wit 1.4.17 but without success.
> > at the moment o don't deal with form filter, i deal with 
> problem how 
> > to filter in PanelCart messages not produced in PanelCart 
> and how to 
> > set it in PanelCart -see below ;-)
> >
> >> -Original Message-
> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
> >> Sent: 28. September 2011 12:39
> >> To: users@wicket.apache.org
> >> Subject: Re: filter feedback messages
> >>
> >> form may need a filter too.
> >>
> >>
> >> 2011/9/28 Miroslav F.:
> >>> i think that form doesn't need filter - or to be precise i
> >> don't want
> >>> to filter messages in form.
> >>>
> >>> i only need to filter messages in panelcart (which extends panel):
> >>>
> >>> public class PanelCart extends Panel {
> >>> public PanelCart(String id)
> >>> {
> >>> super(id);
> >>> ...do_something...
> >>> --->  //this don't work, the panel still shows
> >> messages from
> >>> another page components
> >>> this.add(new FeedbackPanel("feedback", new 
> >>> ContainerFeedbackMessageFilter(this)));
> >>> }
> >>> }
> >>>
> >>> public class PageObjednavka extends PageBase {
> >>> public PageObjednavka()
> >>> {
> >>> Form  form = new Form("formOrder")
> >>> {
> >>> ...set_form... (own code)
> >>> };
> >>> this.add(form);
> >>>
> >>>
> >> 
> form.add(formOrderName.setRequired(true).add(StringValidator.lengthBe
> >> t
> >>> ween(2
> >>> , 35)));
> >>> //if validation faild show message from property 
> >>> file
> >>> --->  form.add(new FeedbackPanel("feedback"));
> >>> }
> >>> }
> >>>
> >>> public class PageBase extends WebPage {
> >>> public PageBase()
> >>> {
> >>> this.add(new PanelCart("cart")); }
> >>>
> >>>
> >>>> -Original Message-
> >>>> From: manuelbarzi [mailto:manuelba...@gmail.com]
> >>>> Sent: 28. September 2011 12:22
> >>>> To: users@wicket.apache.org
> >>>> Subject: Re: filter feedback messages
> >>>>
> >>>> what's the feedback message filter you've added to the form?
> >>>>
> >>>>
> >>>> 2011/9/28 Miroslav F.:
> >>>>> yes. it doesn't matter if i do:
> >>>>> this.add(new FeedbackPanel("feedback", new
> >>>>> ComponentFeedbackMessageFilter(this)));
> >>>>> or
> >>>>> this.add(new FeedbackPanel("feedback", new
> >>>>> ContainerFeedbackMessageFilter(this)));
> >>>>> in PanelCart.class, panel still show messages produced in form.
> >>>>>
> >>>>>
> >>>>>> -Original Message-
> >>>>>> From: manuelbarzi [mailto:manuelba...@gmail.com]
> >>>>>> Sent: 28. September 2011 12:02
> >>>>>> To: users@wicket.apache.org
> >>>>>> Subject: Re: filter feedback messages
> >>>>>>
> >>>>>> have you tried ContainerFeedbackMessageFilter instead?
> >>>>>>
> >>>>>>
> >>>>>> 2011/9/28 Miroslav F.:
> >>>>>>>Page1
> >>>>>>>  \
> >>>>>>>  +--- PanelCart
> >>>>>>>  |
> >>>>>>>  +--- Form
> >>>>>>>
> >>>>>>> i know all fedback panels displays all feedback messages
> >>>>>> and i have to
> >>>>>>> filter them. what i don't know is how to tell in

Re: filter feedback messages

2011-09-28 Thread Andrea Del Bene
Which version of Wicket are you using? I'm trying to reproducing the bug 
wit 1.4.17 but without success.

at the moment o don't deal with form filter, i deal with problem
how to filter in PanelCart messages not produced in PanelCart and
how to set it in PanelCart -see below ;-)


-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 12:39
To: users@wicket.apache.org
Subject: Re: filter feedback messages

form may need a filter too.


2011/9/28 Miroslav F.:

i think that form doesn't need filter - or to be precise i

don't want

to filter messages in form.

i only need to filter messages in panelcart (which extends panel):

public class PanelCart extends Panel
{
public PanelCart(String id)
{
super(id);
...do_something...
--->  //this don't work, the panel still shows

messages from

another page components
this.add(new FeedbackPanel("feedback", new
ContainerFeedbackMessageFilter(this)));
}
}

public class PageObjednavka extends PageBase {
public PageObjednavka()
{
Form  form = new Form("formOrder")
{
...set_form... (own code)
};
this.add(form);



form.add(formOrderName.setRequired(true).add(StringValidator.lengthBet

ween(2
, 35)));
//if validation faild show message from property file
--->  form.add(new FeedbackPanel("feedback"));
}
}

public class PageBase extends WebPage
{
public PageBase()
{
this.add(new PanelCart("cart")); }



-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 12:22
To: users@wicket.apache.org
Subject: Re: filter feedback messages

what's the feedback message filter you've added to the form?


2011/9/28 Miroslav F.:

yes. it doesn't matter if i do:
this.add(new FeedbackPanel("feedback", new
ComponentFeedbackMessageFilter(this)));
or
this.add(new FeedbackPanel("feedback", new
ContainerFeedbackMessageFilter(this)));
in PanelCart.class, panel still show messages produced in form.



-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 12:02
To: users@wicket.apache.org
Subject: Re: filter feedback messages

have you tried ContainerFeedbackMessageFilter instead?


2011/9/28 Miroslav F.:

   Page1
 \
 +--- PanelCart
 |
 +--- Form

i know all fedback panels displays all feedback messages

and i have to

filter them. what i don't know is how to tell in PanelCart

to display

only messages produced in PanelCart and ignore others

messages?




-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 11:51
To: users@wicket.apache.org
Subject: Re: filter feedback messages

how is your composite?

page
|-Form (with own FeedbackPanel)
||-Panel (with own FeedbackPanel)
|
|-Other stuff

?




On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
  wrote:

hi folks,

i have this problem:

have panel:

cart:
[0]
items,   
wicket:id="cartPrice">[0]

$




then implementing class:
package cz.mineralshop;

import java.util.ArrayList;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;



@SuppressWarnings("serial")
public class PanelCart extends Panel {
public PanelCart(String id)
{
super(id);
ArrayList cart = (new

ModelPanelCart()).load();

this.add(new Label("cartItems", (new
Integer(cart.size())).toString()));
Integer cartPrice = new Integer(0);
for(int i = 0; i<  cart.size(); i++)
{
ArrayList polozka = (ArrayList)

cart.get(i);

Integer cenaPolozky = new

Integer((String)

polozka.get(2));
cenaCelkova = cenaCelkova +

cenaPolozky;

}
this.add(new Label("cartPrice",
cenaCelkova.toString()));
}
}

panel works fine (implementation is ugly, i know..)

on one page i have form with validators, again works fine.

problem is

with panel above: it shows feedback messages of the form

so final

result is that on page i have feedback messages twice:
in form (which is correct) and in panel above (which

is wrong).

i know it has what to do with feedback message filter - but

how to set

it for the panel? simply do:
this.add(new FeedbackPanel("feedback", new
ComponentFeedbackMessageFilter(this)));
in PanelCart.class don't work.

can you someone help me please?

miro




-

RE: filter feedback messages

2011-09-28 Thread Miroslav F.
at the moment o don't deal with form filter, i deal with problem
how to filter in PanelCart messages not produced in PanelCart and
how to set it in PanelCart -see below ;-) 

> -Original Message-
> From: manuelbarzi [mailto:manuelba...@gmail.com] 
> Sent: 28. September 2011 12:39
> To: users@wicket.apache.org
> Subject: Re: filter feedback messages
> 
> form may need a filter too.
> 
> 
> 2011/9/28 Miroslav F. :
> > i think that form doesn't need filter - or to be precise i 
> don't want 
> > to filter messages in form.
> >
> > i only need to filter messages in panelcart (which extends panel):
> >
> > public class PanelCart extends Panel
> > {
> >        public PanelCart(String id)
> >        {
> >                super(id);
> >                ...do_something...
> > --->            //this don't work, the panel still shows 
> messages from
> > another page components
> >                this.add(new FeedbackPanel("feedback", new 
> > ContainerFeedbackMessageFilter(this)));
> >        }
> > }
> >
> > public class PageObjednavka extends PageBase {
> >        public PageObjednavka()
> >        {
> >                Form form = new Form("formOrder")
> >                {
> >                        ...set_form... (own code)
> >                };
> >                this.add(form);
> >
> > 
> form.add(formOrderName.setRequired(true).add(StringValidator.lengthBet
> > ween(2
> > , 35)));
> >                //if validation faild show message from property file
> > --->            form.add(new FeedbackPanel("feedback"));
> >        }
> > }
> >
> > public class PageBase extends WebPage
> > {
> >        public PageBase()
> >        {
> >                this.add(new PanelCart("cart")); }
> >
> >
> >> -Original Message-
> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
> >> Sent: 28. September 2011 12:22
> >> To: users@wicket.apache.org
> >> Subject: Re: filter feedback messages
> >>
> >> what's the feedback message filter you've added to the form?
> >>
> >>
> >> 2011/9/28 Miroslav F. :
> >> > yes. it doesn't matter if i do:
> >> > this.add(new FeedbackPanel("feedback", new
> >> > ComponentFeedbackMessageFilter(this)));
> >> > or
> >> > this.add(new FeedbackPanel("feedback", new
> >> > ContainerFeedbackMessageFilter(this)));
> >> > in PanelCart.class, panel still show messages produced in form.
> >> >
> >> >
> >> >> -Original Message-
> >> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
> >> >> Sent: 28. September 2011 12:02
> >> >> To: users@wicket.apache.org
> >> >> Subject: Re: filter feedback messages
> >> >>
> >> >> have you tried ContainerFeedbackMessageFilter instead?
> >> >>
> >> >>
> >> >> 2011/9/28 Miroslav F. :
> >> >> >   Page1
> >> >> >     \
> >> >> >     +--- PanelCart
> >> >> >     |
> >> >> >     +--- Form
> >> >> >
> >> >> > i know all fedback panels displays all feedback messages
> >> >> and i have to
> >> >> > filter them. what i don't know is how to tell in PanelCart
> >> >> to display
> >> >> > only messages produced in PanelCart and ignore others 
> messages?
> >> >> >
> >> >> >
> >> >> >
> >> >> >> -Original Message-
> >> >> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
> >> >> >> Sent: 28. September 2011 11:51
> >> >> >> To: users@wicket.apache.org
> >> >> >> Subject: Re: filter feedback messages
> >> >> >>
> >> >> >> how is your composite?
> >> >> >>
> >> >> >> page
> >> >> >>    |-Form (with own FeedbackPanel)
> >> >> >>    |    |-Panel (with own FeedbackPanel)
> >> >> >>    |
> >> >> >>    |-Other stuff
> >> >> >>
> >> >> >> ?
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >

Re: filter feedback messages

2011-09-28 Thread manuelbarzi
form may need a filter too.


2011/9/28 Miroslav F. :
> i think that form doesn't need filter - or to be precise i don't want to
> filter messages in form.
>
> i only need to filter messages in panelcart (which extends panel):
>
> public class PanelCart extends Panel
> {
>        public PanelCart(String id)
>        {
>                super(id);
>                ...do_something...
> --->            //this don't work, the panel still shows messages from
> another page components
>                this.add(new FeedbackPanel("feedback", new
> ContainerFeedbackMessageFilter(this)));
>        }
> }
>
> public class PageObjednavka extends PageBase
> {
>        public PageObjednavka()
>        {
>                Form form = new Form("formOrder")
>                {
>                        ...set_form... (own code)
>                };
>                this.add(form);
>
> form.add(formOrderName.setRequired(true).add(StringValidator.lengthBetween(2
> , 35)));
>                //if validation faild show message from property file
> --->            form.add(new FeedbackPanel("feedback"));
>        }
> }
>
> public class PageBase extends WebPage
> {
>        public PageBase()
>        {
>                this.add(new PanelCart("cart"));
> }
>
>
>> -Original Message-
>> From: manuelbarzi [mailto:manuelba...@gmail.com]
>> Sent: 28. September 2011 12:22
>> To: users@wicket.apache.org
>> Subject: Re: filter feedback messages
>>
>> what's the feedback message filter you've added to the form?
>>
>>
>> 2011/9/28 Miroslav F. :
>> > yes. it doesn't matter if i do:
>> > this.add(new FeedbackPanel("feedback", new
>> > ComponentFeedbackMessageFilter(this)));
>> > or
>> > this.add(new FeedbackPanel("feedback", new
>> > ContainerFeedbackMessageFilter(this)));
>> > in PanelCart.class, panel still show messages produced in form.
>> >
>> >
>> >> -Original Message-
>> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
>> >> Sent: 28. September 2011 12:02
>> >> To: users@wicket.apache.org
>> >> Subject: Re: filter feedback messages
>> >>
>> >> have you tried ContainerFeedbackMessageFilter instead?
>> >>
>> >>
>> >> 2011/9/28 Miroslav F. :
>> >> >   Page1
>> >> >     \
>> >> >     +--- PanelCart
>> >> >     |
>> >> >     +--- Form
>> >> >
>> >> > i know all fedback panels displays all feedback messages
>> >> and i have to
>> >> > filter them. what i don't know is how to tell in PanelCart
>> >> to display
>> >> > only messages produced in PanelCart and ignore others messages?
>> >> >
>> >> >
>> >> >
>> >> >> -Original Message-
>> >> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
>> >> >> Sent: 28. September 2011 11:51
>> >> >> To: users@wicket.apache.org
>> >> >> Subject: Re: filter feedback messages
>> >> >>
>> >> >> how is your composite?
>> >> >>
>> >> >> page
>> >> >>    |-Form (with own FeedbackPanel)
>> >> >>    |    |-Panel (with own FeedbackPanel)
>> >> >>    |
>> >> >>    |-Other stuff
>> >> >>
>> >> >> ?
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
>> >> >>  wrote:
>> >> >> > hi folks,
>> >> >> >
>> >> >> > i have this problem:
>> >> >> >
>> >> >> > have panel:
>> >> >> > 
>> >> >> >        cart:
>> >> >> >                [0]
>> >> >> > items,   > >> wicket:id="cartPrice">[0]
>> >> >> > $
>> >> >> >                
>> >> >> >        
>> >> >> > 
>> >> >> >
>> >> >> > then implementing class:
>> >> >> > package cz.mineralshop;
>> >> >> >
>> >> >> > import java.util.ArrayList;
>> >> >> > im

RE: filter feedback messages

2011-09-28 Thread Miroslav F.
i think that form doesn't need filter - or to be precise i don't want to
filter messages in form.

i only need to filter messages in panelcart (which extends panel):

public class PanelCart extends Panel
{
public PanelCart(String id)
{
super(id);
...do_something...
--->//this don't work, the panel still shows messages from
another page components
this.add(new FeedbackPanel("feedback", new
ContainerFeedbackMessageFilter(this)));
}
}

public class PageObjednavka extends PageBase
{
public PageObjednavka()
{
Form form = new Form("formOrder")
{
...set_form... (own code)
};
this.add(form);

form.add(formOrderName.setRequired(true).add(StringValidator.lengthBetween(2
, 35)));
//if validation faild show message from property file
--->form.add(new FeedbackPanel("feedback"));
}
}

public class PageBase extends WebPage
{
public PageBase()
{
this.add(new PanelCart("cart"));
}


> -Original Message-
> From: manuelbarzi [mailto:manuelba...@gmail.com] 
> Sent: 28. September 2011 12:22
> To: users@wicket.apache.org
> Subject: Re: filter feedback messages
> 
> what's the feedback message filter you've added to the form?
> 
> 
> 2011/9/28 Miroslav F. :
> > yes. it doesn't matter if i do:
> > this.add(new FeedbackPanel("feedback", new 
> > ComponentFeedbackMessageFilter(this)));
> > or
> > this.add(new FeedbackPanel("feedback", new 
> > ContainerFeedbackMessageFilter(this)));
> > in PanelCart.class, panel still show messages produced in form.
> >
> >
> >> -----Original Message-
> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
> >> Sent: 28. September 2011 12:02
> >> To: users@wicket.apache.org
> >> Subject: Re: filter feedback messages
> >>
> >> have you tried ContainerFeedbackMessageFilter instead?
> >>
> >>
> >> 2011/9/28 Miroslav F. :
> >> >   Page1
> >> >     \
> >> >     +--- PanelCart
> >> >     |
> >> >     +--- Form
> >> >
> >> > i know all fedback panels displays all feedback messages
> >> and i have to
> >> > filter them. what i don't know is how to tell in PanelCart
> >> to display
> >> > only messages produced in PanelCart and ignore others messages?
> >> >
> >> >
> >> >
> >> >> -Original Message-
> >> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
> >> >> Sent: 28. September 2011 11:51
> >> >> To: users@wicket.apache.org
> >> >> Subject: Re: filter feedback messages
> >> >>
> >> >> how is your composite?
> >> >>
> >> >> page
> >> >>    |-Form (with own FeedbackPanel)
> >> >>    |    |-Panel (with own FeedbackPanel)
> >> >>    |
> >> >>    |-Other stuff
> >> >>
> >> >> ?
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
> >> >>  wrote:
> >> >> > hi folks,
> >> >> >
> >> >> > i have this problem:
> >> >> >
> >> >> > have panel:
> >> >> > 
> >> >> >        cart:
> >> >> >                [0] 
> >> >> > items,    >> wicket:id="cartPrice">[0]
> >> >> > $
> >> >> >                
> >> >> >        
> >> >> > 
> >> >> >
> >> >> > then implementing class:
> >> >> > package cz.mineralshop;
> >> >> >
> >> >> > import java.util.ArrayList;
> >> >> > import org.apache.wicket.markup.html.basic.Label;
> >> >> > import org.apache.wicket.markup.html.panel.Panel;
> >> >> >
> >> >> >
> >> >> >
> >> >> > @SuppressWarnings("serial")
> >> >> > public class PanelCart extends Panel {
> >> >> >        public PanelCart(String id)
> >> >> >        {
> >> >> >                super(id);
> >> >> >                ArrayLi

Re: filter feedback messages

2011-09-28 Thread Andrea Del Bene

Hi,

does form use PanelCart fields for validation?

yes. it doesn't matter if i do:
this.add(new FeedbackPanel("feedback", new
ComponentFeedbackMessageFilter(this)));
or
this.add(new FeedbackPanel("feedback", new
ContainerFeedbackMessageFilter(this)));
in PanelCart.class, panel still show messages produced in form.



-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 12:02
To: users@wicket.apache.org
Subject: Re: filter feedback messages

have you tried ContainerFeedbackMessageFilter instead?


2011/9/28 Miroslav F.:

   Page1
 \
 +--- PanelCart
 |
 +--- Form

i know all fedback panels displays all feedback messages

and i have to

filter them. what i don't know is how to tell in PanelCart

to display

only messages produced in PanelCart and ignore others messages?




-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 11:51
To: users@wicket.apache.org
Subject: Re: filter feedback messages

how is your composite?

page
|-Form (with own FeedbackPanel)
||-Panel (with own FeedbackPanel)
|
|-Other stuff

?




On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
  wrote:

hi folks,

i have this problem:

have panel:

cart:
[0]
items,   
wicket:id="cartPrice">[0]

$




then implementing class:
package cz.mineralshop;

import java.util.ArrayList;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;



@SuppressWarnings("serial")
public class PanelCart extends Panel {
public PanelCart(String id)
{
super(id);
ArrayList cart = (new ModelPanelCart()).load();
this.add(new Label("cartItems", (new
Integer(cart.size())).toString()));
Integer cartPrice = new Integer(0);
for(int i = 0; i<  cart.size(); i++)
{
ArrayList polozka = (ArrayList)

cart.get(i);

Integer cenaPolozky = new

Integer((String)

polozka.get(2));
cenaCelkova = cenaCelkova + cenaPolozky;
}
this.add(new Label("cartPrice",
cenaCelkova.toString()));
}
}

panel works fine (implementation is ugly, i know..)

on one page i have form with validators, again works fine.

problem is

with panel above: it shows feedback messages of the form

so final

result is that on page i have feedback messages twice:
in form (which is correct) and in panel above (which is wrong).

i know it has what to do with feedback message filter - but

how to set

it for the panel? simply do:
this.add(new FeedbackPanel("feedback", new
ComponentFeedbackMessageFilter(this)));
in PanelCart.class don't work.

can you someone help me please?

miro




-

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





-

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






-

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



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




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






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



Re: filter feedback messages

2011-09-28 Thread manuelbarzi
what's the feedback message filter you've added to the form?


2011/9/28 Miroslav F. :
> yes. it doesn't matter if i do:
> this.add(new FeedbackPanel("feedback", new
> ComponentFeedbackMessageFilter(this)));
> or
> this.add(new FeedbackPanel("feedback", new
> ContainerFeedbackMessageFilter(this)));
> in PanelCart.class, panel still show messages produced in form.
>
>
>> -Original Message-
>> From: manuelbarzi [mailto:manuelba...@gmail.com]
>> Sent: 28. September 2011 12:02
>> To: users@wicket.apache.org
>> Subject: Re: filter feedback messages
>>
>> have you tried ContainerFeedbackMessageFilter instead?
>>
>>
>> 2011/9/28 Miroslav F. :
>> >   Page1
>> >     \
>> >     +--- PanelCart
>> >     |
>> >     +--- Form
>> >
>> > i know all fedback panels displays all feedback messages
>> and i have to
>> > filter them. what i don't know is how to tell in PanelCart
>> to display
>> > only messages produced in PanelCart and ignore others messages?
>> >
>> >
>> >
>> >> -Original Message-
>> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
>> >> Sent: 28. September 2011 11:51
>> >> To: users@wicket.apache.org
>> >> Subject: Re: filter feedback messages
>> >>
>> >> how is your composite?
>> >>
>> >> page
>> >>    |-Form (with own FeedbackPanel)
>> >>    |    |-Panel (with own FeedbackPanel)
>> >>    |
>> >>    |-Other stuff
>> >>
>> >> ?
>> >>
>> >>
>> >>
>> >>
>> >> On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
>> >>  wrote:
>> >> > hi folks,
>> >> >
>> >> > i have this problem:
>> >> >
>> >> > have panel:
>> >> > 
>> >> >        cart:
>> >> >                [0]
>> >> > items,   > wicket:id="cartPrice">[0]
>> >> > $
>> >> >                
>> >> >        
>> >> > 
>> >> >
>> >> > then implementing class:
>> >> > package cz.mineralshop;
>> >> >
>> >> > import java.util.ArrayList;
>> >> > import org.apache.wicket.markup.html.basic.Label;
>> >> > import org.apache.wicket.markup.html.panel.Panel;
>> >> >
>> >> >
>> >> >
>> >> > @SuppressWarnings("serial")
>> >> > public class PanelCart extends Panel {
>> >> >        public PanelCart(String id)
>> >> >        {
>> >> >                super(id);
>> >> >                ArrayList cart = (new ModelPanelCart()).load();
>> >> >                this.add(new Label("cartItems", (new
>> >> > Integer(cart.size())).toString()));
>> >> >                Integer cartPrice = new Integer(0);
>> >> >                for(int i = 0; i < cart.size(); i++)
>> >> >                {
>> >> >                        ArrayList polozka = (ArrayList)
>> cart.get(i);
>> >> >                        Integer cenaPolozky = new
>> Integer((String)
>> >> > polozka.get(2));
>> >> >                        cenaCelkova = cenaCelkova + cenaPolozky;
>> >> >                }
>> >> >                this.add(new Label("cartPrice",
>> >> > cenaCelkova.toString()));
>> >> >        }
>> >> > }
>> >> >
>> >> > panel works fine (implementation is ugly, i know..)
>> >> >
>> >> > on one page i have form with validators, again works fine.
>> >> problem is
>> >> > with panel above: it shows feedback messages of the form
>> so final
>> >> > result is that on page i have feedback messages twice:
>> >> > in form (which is correct) and in panel above (which is wrong).
>> >> >
>> >> > i know it has what to do with feedback message filter - but
>> >> how to set
>> >> > it for the panel? simply do:
>> >> > this.add(new FeedbackPanel("feedback", new
>> >> > ComponentFeedbackMessageFilter(this)));
>> >> > in PanelCart.class don't work.
>> >> >
>> >> > can you someone help me please?
>> >> >
>> >> > miro
>> >> >
>> >> >
>> >> >
>> >>
>> -
>> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>> >
>> >
>> -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



RE: filter feedback messages

2011-09-28 Thread Miroslav F.
yes. it doesn't matter if i do:
this.add(new FeedbackPanel("feedback", new
ComponentFeedbackMessageFilter(this)));
or
this.add(new FeedbackPanel("feedback", new
ContainerFeedbackMessageFilter(this))); 
in PanelCart.class, panel still show messages produced in form.


> -Original Message-
> From: manuelbarzi [mailto:manuelba...@gmail.com] 
> Sent: 28. September 2011 12:02
> To: users@wicket.apache.org
> Subject: Re: filter feedback messages
> 
> have you tried ContainerFeedbackMessageFilter instead?
> 
> 
> 2011/9/28 Miroslav F. :
> >   Page1
> >     \
> >     +--- PanelCart
> >     |
> >     +--- Form
> >
> > i know all fedback panels displays all feedback messages 
> and i have to 
> > filter them. what i don't know is how to tell in PanelCart 
> to display 
> > only messages produced in PanelCart and ignore others messages?
> >
> >
> >
> >> -Original Message-
> >> From: manuelbarzi [mailto:manuelba...@gmail.com]
> >> Sent: 28. September 2011 11:51
> >> To: users@wicket.apache.org
> >> Subject: Re: filter feedback messages
> >>
> >> how is your composite?
> >>
> >> page
> >>    |-Form (with own FeedbackPanel)
> >>    |    |-Panel (with own FeedbackPanel)
> >>    |
> >>    |-Other stuff
> >>
> >> ?
> >>
> >>
> >>
> >>
> >> On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
> >>  wrote:
> >> > hi folks,
> >> >
> >> > i have this problem:
> >> >
> >> > have panel:
> >> > 
> >> >        cart:
> >> >                [0] 
> >> > items,    wicket:id="cartPrice">[0] 
> >> > $
> >> >                
> >> >        
> >> > 
> >> >
> >> > then implementing class:
> >> > package cz.mineralshop;
> >> >
> >> > import java.util.ArrayList;
> >> > import org.apache.wicket.markup.html.basic.Label;
> >> > import org.apache.wicket.markup.html.panel.Panel;
> >> >
> >> >
> >> >
> >> > @SuppressWarnings("serial")
> >> > public class PanelCart extends Panel {
> >> >        public PanelCart(String id)
> >> >        {
> >> >                super(id);
> >> >                ArrayList cart = (new ModelPanelCart()).load();
> >> >                this.add(new Label("cartItems", (new 
> >> > Integer(cart.size())).toString()));
> >> >                Integer cartPrice = new Integer(0);
> >> >                for(int i = 0; i < cart.size(); i++)
> >> >                {
> >> >                        ArrayList polozka = (ArrayList) 
> cart.get(i);
> >> >                        Integer cenaPolozky = new 
> Integer((String) 
> >> > polozka.get(2));
> >> >                        cenaCelkova = cenaCelkova + cenaPolozky;
> >> >                }
> >> >                this.add(new Label("cartPrice", 
> >> > cenaCelkova.toString()));
> >> >        }
> >> > }
> >> >
> >> > panel works fine (implementation is ugly, i know..)
> >> >
> >> > on one page i have form with validators, again works fine.
> >> problem is
> >> > with panel above: it shows feedback messages of the form 
> so final 
> >> > result is that on page i have feedback messages twice:
> >> > in form (which is correct) and in panel above (which is wrong).
> >> >
> >> > i know it has what to do with feedback message filter - but
> >> how to set
> >> > it for the panel? simply do:
> >> > this.add(new FeedbackPanel("feedback", new 
> >> > ComponentFeedbackMessageFilter(this)));
> >> > in PanelCart.class don't work.
> >> >
> >> > can you someone help me please?
> >> >
> >> > miro
> >> >
> >> >
> >> >
> >> 
> -
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >> >
> >>
> >> 
> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > 
> -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 


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



Re: filter feedback messages

2011-09-28 Thread Pranav kacholia
If you want to show the feedback messages for only PanelCart use 
ComponentFeedbackMessageFilter

If you want to show the messages for PanelCart and its sub-components , use
ContainerFeedbackMessageFilter

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/filter-feedback-messages-tp3850522p3850592.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: filter feedback messages

2011-09-28 Thread manuelbarzi
have you tried ContainerFeedbackMessageFilter instead?


2011/9/28 Miroslav F. :
>   Page1
>     \
>     +--- PanelCart
>     |
>     +--- Form
>
> i know all fedback panels displays all feedback messages and i have to
> filter them. what i don't know is how to tell in PanelCart to display
> only messages produced in PanelCart and ignore others messages?
>
>
>
>> -Original Message-
>> From: manuelbarzi [mailto:manuelba...@gmail.com]
>> Sent: 28. September 2011 11:51
>> To: users@wicket.apache.org
>> Subject: Re: filter feedback messages
>>
>> how is your composite?
>>
>> page
>>    |-Form (with own FeedbackPanel)
>>    |    |-Panel (with own FeedbackPanel)
>>    |
>>    |-Other stuff
>>
>> ?
>>
>>
>>
>>
>> On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
>>  wrote:
>> > hi folks,
>> >
>> > i have this problem:
>> >
>> > have panel:
>> > 
>> >        cart:
>> >                [0]
>> > items,   [0]
>> > $
>> >                
>> >        
>> > 
>> >
>> > then implementing class:
>> > package cz.mineralshop;
>> >
>> > import java.util.ArrayList;
>> > import org.apache.wicket.markup.html.basic.Label;
>> > import org.apache.wicket.markup.html.panel.Panel;
>> >
>> >
>> >
>> > @SuppressWarnings("serial")
>> > public class PanelCart extends Panel
>> > {
>> >        public PanelCart(String id)
>> >        {
>> >                super(id);
>> >                ArrayList cart = (new ModelPanelCart()).load();
>> >                this.add(new Label("cartItems", (new
>> > Integer(cart.size())).toString()));
>> >                Integer cartPrice = new Integer(0);
>> >                for(int i = 0; i < cart.size(); i++)
>> >                {
>> >                        ArrayList polozka = (ArrayList) cart.get(i);
>> >                        Integer cenaPolozky = new Integer((String)
>> > polozka.get(2));
>> >                        cenaCelkova = cenaCelkova + cenaPolozky;
>> >                }
>> >                this.add(new Label("cartPrice",
>> > cenaCelkova.toString()));
>> >        }
>> > }
>> >
>> > panel works fine (implementation is ugly, i know..)
>> >
>> > on one page i have form with validators, again works fine.
>> problem is
>> > with panel above: it shows feedback messages of the form so final
>> > result is that on page i have feedback messages twice:
>> > in form (which is correct) and in panel above (which is wrong).
>> >
>> > i know it has what to do with feedback message filter - but
>> how to set
>> > it for the panel? simply do:
>> > this.add(new FeedbackPanel("feedback", new
>> > ComponentFeedbackMessageFilter(this)));
>> > in PanelCart.class don't work.
>> >
>> > can you someone help me please?
>> >
>> > miro
>> >
>> >
>> >
>> -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



RE: filter feedback messages

2011-09-28 Thread Miroslav F.
   Page1
 \
 +--- PanelCart
 |
 +--- Form

i know all fedback panels displays all feedback messages and i have to
filter them. what i don't know is how to tell in PanelCart to display
only messages produced in PanelCart and ignore others messages?



> -Original Message-
> From: manuelbarzi [mailto:manuelba...@gmail.com] 
> Sent: 28. September 2011 11:51
> To: users@wicket.apache.org
> Subject: Re: filter feedback messages
> 
> how is your composite?
> 
> page
>|-Form (with own FeedbackPanel)
>||-Panel (with own FeedbackPanel)
>|
>|-Other stuff
> 
> ?
> 
> 
> 
> 
> On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F. 
>  wrote:
> > hi folks,
> >
> > i have this problem:
> >
> > have panel:
> > 
> >        cart:
> >                [0] 
> > items,   [0] 
> > $
> >                
> >        
> > 
> >
> > then implementing class:
> > package cz.mineralshop;
> >
> > import java.util.ArrayList;
> > import org.apache.wicket.markup.html.basic.Label;
> > import org.apache.wicket.markup.html.panel.Panel;
> >
> >
> >
> > @SuppressWarnings("serial")
> > public class PanelCart extends Panel
> > {
> >        public PanelCart(String id)
> >        {
> >                super(id);
> >                ArrayList cart = (new ModelPanelCart()).load();
> >                this.add(new Label("cartItems", (new 
> > Integer(cart.size())).toString()));
> >                Integer cartPrice = new Integer(0);
> >                for(int i = 0; i < cart.size(); i++)
> >                {
> >                        ArrayList polozka = (ArrayList) cart.get(i);
> >                        Integer cenaPolozky = new Integer((String) 
> > polozka.get(2));
> >                        cenaCelkova = cenaCelkova + cenaPolozky;
> >                }
> >                this.add(new Label("cartPrice", 
> > cenaCelkova.toString()));
> >        }
> > }
> >
> > panel works fine (implementation is ugly, i know..)
> >
> > on one page i have form with validators, again works fine. 
> problem is 
> > with panel above: it shows feedback messages of the form so final 
> > result is that on page i have feedback messages twice:
> > in form (which is correct) and in panel above (which is wrong).
> >
> > i know it has what to do with feedback message filter - but 
> how to set 
> > it for the panel? simply do:
> > this.add(new FeedbackPanel("feedback", new 
> > ComponentFeedbackMessageFilter(this)));
> > in PanelCart.class don't work.
> >
> > can you someone help me please?
> >
> > miro
> >
> >
> > 
> -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 


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



Re: filter feedback messages

2011-09-28 Thread manuelbarzi
how is your composite?

page
   |-Form (with own FeedbackPanel)
   ||-Panel (with own FeedbackPanel)
   |
   |-Other stuff

?




On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.  wrote:
> hi folks,
>
> i have this problem:
>
> have panel:
> 
>        cart:
>                [0]
> items,   [0] $
>                
>        
> 
>
> then implementing class:
> package cz.mineralshop;
>
> import java.util.ArrayList;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.panel.Panel;
>
>
>
> @SuppressWarnings("serial")
> public class PanelCart extends Panel
> {
>        public PanelCart(String id)
>        {
>                super(id);
>                ArrayList cart = (new ModelPanelCart()).load();
>                this.add(new Label("cartItems", (new
> Integer(cart.size())).toString()));
>                Integer cartPrice = new Integer(0);
>                for(int i = 0; i < cart.size(); i++)
>                {
>                        ArrayList polozka = (ArrayList) cart.get(i);
>                        Integer cenaPolozky = new Integer((String)
> polozka.get(2));
>                        cenaCelkova = cenaCelkova + cenaPolozky;
>                }
>                this.add(new Label("cartPrice", cenaCelkova.toString()));
>        }
> }
>
> panel works fine (implementation is ugly, i know..)
>
> on one page i have form with validators, again works fine. problem is with
> panel above: it shows feedback messages
> of the form so final result is that on page i have feedback messages twice:
> in form (which is correct) and in panel
> above (which is wrong).
>
> i know it has what to do with feedback message filter - but how to set it
> for the panel? simply do:
> this.add(new FeedbackPanel("feedback", new
> ComponentFeedbackMessageFilter(this)));
> in PanelCart.class don't work.
>
> can you someone help me please?
>
> miro
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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