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.<mir...@seznam.cz>:
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<Object>  form = new Form<Object>("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.<mir...@seznam.cz>:
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.<mir...@seznam.cz>:
   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.
<mir...@seznam.cz>  wrote:
hi folks,

i have this problem:

have panel:
<wicket:panel>
        <b><a href="cart.html">cart:</a></b>
                <span wicket:id="cartItems">[0]</span>
items,&nbsp;&nbsp;&nbsp;<b><span
wicket:id="cartPrice">[0]</span>
$</b>
                </span>
        </div>
</wicket:panel>

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




---------------------------------------------------------------------
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

Reply via email to