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

Reply via email to