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

Reply via email to