Multiple Data Providers for DataTable

2011-09-28 Thread codix
Is it possible to implement one table with different providers? My problem is
that there are some entries in my table with values coming from different
POJOs. I don't have any idea how to mix different POJOs in one data
provider.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Multiple-Data-Providers-for-DataTable-tp3849652p3849652.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: Multiple Data Providers for DataTable

2011-09-28 Thread Martin Grigorov
Can you use a compound provider which delegates the logic to N other
providers and collects their responses into one ?

On Wed, Sep 28, 2011 at 2:44 AM, codix jackeblag...@yahoo.com wrote:
 Is it possible to implement one table with different providers? My problem is
 that there are some entries in my table with values coming from different
 POJOs. I don't have any idea how to mix different POJOs in one data
 provider.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Multiple-Data-Providers-for-DataTable-tp3849652p3849652.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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Wicket 1.5.0 and ResourceReferences

2011-09-28 Thread Arne And
As far as I understand, both suggested solutions work on the entire
application, right? Is there no way to define a particular resource
caching strategy for a particular resource or set of resources, e.g.
set a resource strategy for all javascript resources, but leave
everything else default?

A

On Tue, Sep 27, 2011 at 5:40 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 switch to QueryStringWithVersionResourceCachingStrategy, it does not
 modify file names

 -igor


 On Tue, Sep 27, 2011 at 3:03 AM, Arne And arne@gmail.com wrote:
 How do I avoid the -ver-XXX version number from my resource reference
 in Wicket 1.5.0?

 More details:

 I want to use Scriptaculous, and have a AbstractDefaultAjaxBehavior
 that does a renderHead(...) { response.renderJavaScriptReference(new
 JavaScriptResourceReference(this.getClass(), scriptaculous.js); }

 This adds the script src ...  to the header section, however, the
 url to the scriptaculous includes the Wickek -ver-XXX rewrite. This in
 turn results in the scriptaculous auto include
 builder,effects,dragdrop etc not to load properly, due to how the
 script determines the base path.

 I can of course fix the way scriptaculous determines the path, but the
 best way would be to have wicket serve this up as scriptaculous.js.

 What am I doing wrong? Can it be fixed?

 I've looked at the FilenameWithVersionResourceCachingStrategy, and I
 know I can change that for the application, but won't I then change it
 for all the resources? I would like only this to _not_ have the
 version information.

 Thanks in advance.

 A

 -
 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: Wicket 1.5.0 and ResourceReferences

2011-09-28 Thread Martin Grigorov
On Wed, Sep 28, 2011 at 9:58 AM, Arne And arne@gmail.com wrote:
 As far as I understand, both suggested solutions work on the entire
 application, right? Is there no way to define a particular resource
 caching strategy for a particular resource or set of resources, e.g.
 set a resource strategy for all javascript resources, but leave
 everything else default?
Of course there is :-)
You can roll your own strategy that delegates to X strategy for some
resources and to Y strategy for other resources.

 A

 On Tue, Sep 27, 2011 at 5:40 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 switch to QueryStringWithVersionResourceCachingStrategy, it does not
 modify file names

 -igor


 On Tue, Sep 27, 2011 at 3:03 AM, Arne And arne@gmail.com wrote:
 How do I avoid the -ver-XXX version number from my resource reference
 in Wicket 1.5.0?

 More details:

 I want to use Scriptaculous, and have a AbstractDefaultAjaxBehavior
 that does a renderHead(...) { response.renderJavaScriptReference(new
 JavaScriptResourceReference(this.getClass(), scriptaculous.js); }

 This adds the script src ...  to the header section, however, the
 url to the scriptaculous includes the Wickek -ver-XXX rewrite. This in
 turn results in the scriptaculous auto include
 builder,effects,dragdrop etc not to load properly, due to how the
 script determines the base path.

 I can of course fix the way scriptaculous determines the path, but the
 best way would be to have wicket serve this up as scriptaculous.js.

 What am I doing wrong? Can it be fixed?

 I've looked at the FilenameWithVersionResourceCachingStrategy, and I
 know I can change that for the application, but won't I then change it
 for all the resources? I would like only this to _not_ have the
 version information.

 Thanks in advance.

 A

 -
 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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



java.lang.IllegalStateException: STREAMED - Consuming JSON fails

2011-09-28 Thread Tate Jones
Hi Group,

I am new to Wicket and I am attempting to read some JSON data posted from a 
wicket page.

The following exception occurs with Wicket 1.4.18 and Jetty 6.1.x when 
attempting to read the servlet request - BufferedReader br = hsr.getReader().

Sep 28, 2011 8:50:48 AM org.apache.wicket.RequestCycle logRuntimeException
SEVERE: STREAMED
java.lang.IllegalStateException: STREAMED
at org.mortbay.jetty.Request.getReader(Request.java:935)
at tunechipsapp.web.pages.LoginPage$2.onRequest(LoginPage.java:64)
at 
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1252)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:546)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
at 
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
at 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

The code was source from 
https://cwiki.apache.org/WICKET/how-to-handle-jqueryajax-json-request-.html

   AbstractAjaxBehavior ajaxSaveBehaviour = new AbstractAjaxBehavior() {
private static final long serialVersionUID = 1L;

@SuppressWarnings(unchecked)
public void onRequest() {
log.info(* onRequest *);

//get parameters
final RequestCycle requestCycle = RequestCycle.get();

WebRequest wr = (WebRequest) requestCycle.getRequest();

HttpServletRequest hsr = wr.getHttpServletRequest();

try {
BufferedReader br = hsr.getReader();   Exception

String jsonString = br.readLine();
if ((jsonString == null) || jsonString.isEmpty()) {
log.error( no json found);
} else {
log.info( json  is : + jsonString);
}


} catch (IOException ex) {
log.error(ex.toString());
}

// json string to retir to the jQuery onSuccess function
String data = {};

log.info(returning json : + data);
IRequestTarget t = new StringRequestTarget(application/json, 
UTF-8, data);
getRequestCycle().setRequestTarget(t);
//requestCycle.setRequestTarget(new 
StringRequestTarget(application/json, utf-8, data));
}
};
add(ajaxSaveBehaviour);
 
I have read some posts about this in different forms (eg. pushing content), but 
I haven't found a solution at this point.

Cheers in advance
Tate 

Re: Multiple Data Providers for DataTable

2011-09-28 Thread codix
I'm sorry but I don't get your statement. Currently, I have one data provider
and a data table. To populate the rows, I call another panel where a Label
is added. Currently I am using a POJO with a particular type. Unfortunately,
other data calls for other POJOs with different types. Trying to cast them
in a getDefaultModel() method returns an error that it cannot be casted.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Multiple-Data-Providers-for-DataTable-tp3849652p3850446.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: java.lang.IllegalStateException: STREAMED - Consuming JSON fails

2011-09-28 Thread Martin Grigorov
This exception says Don't use the reader but use the input stream
because something (maybe header) has been already read from the
stream.

On Wed, Sep 28, 2011 at 10:59 AM, Tate Jones t...@bluedog.com.au wrote:
 Hi Group,

 I am new to Wicket and I am attempting to read some JSON data posted from a 
 wicket page.

 The following exception occurs with Wicket 1.4.18 and Jetty 6.1.x when 
 attempting to read the servlet request - BufferedReader br = hsr.getReader().

 Sep 28, 2011 8:50:48 AM org.apache.wicket.RequestCycle logRuntimeException
 SEVERE: STREAMED
 java.lang.IllegalStateException: STREAMED
        at org.mortbay.jetty.Request.getReader(Request.java:935)
        at tunechipsapp.web.pages.LoginPage$2.onRequest(LoginPage.java:64)
        at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157)
        at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
        at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1252)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:546)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
        at 
 com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
        at 
 com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

 The code was source from 
 https://cwiki.apache.org/WICKET/how-to-handle-jqueryajax-json-request-.html

   AbstractAjaxBehavior ajaxSaveBehaviour = new AbstractAjaxBehavior() {
            private static final long serialVersionUID = 1L;

            @SuppressWarnings(unchecked)
            public void onRequest() {
                log.info(* onRequest *);

                //get parameters
                final RequestCycle requestCycle = RequestCycle.get();

                WebRequest wr = (WebRequest) requestCycle.getRequest();

                HttpServletRequest hsr = wr.getHttpServletRequest();

                try {
                    BufferedReader br = hsr.getReader();   Exception

                    String jsonString = br.readLine();
                    if ((jsonString == null) || jsonString.isEmpty()) {
                        log.error( no json found);
                    } else {
                        log.info( json  is : + jsonString);
                    }


                } catch (IOException ex) {
                    log.error(ex.toString());
                }

                // json string to retir to the jQuery onSuccess function
                String data = {};

                log.info(returning json : + data);
                IRequestTarget t = new StringRequestTarget(application/json, 
 UTF-8, data);
                getRequestCycle().setRequestTarget(t);
                //requestCycle.setRequestTarget(new 
 StringRequestTarget(application/json, utf-8, data));
            }
        };
        add(ajaxSaveBehaviour);

 I have read some posts about this in different forms (eg. pushing content), 
 but I haven't found a solution at this point.

 Cheers in advance
 Tate



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Servlet and Wicket

2011-09-28 Thread Pointbreak
No that was not was I was saying. I am just advising you to let Wicket
manage complete pages, instead of parts of pages composed within another
servlet architecture. I would give you the same advise if you were using
JSF instead.

On Tuesday, September 27, 2011 11:58 AM, koha...@gmail.com
koha...@gmail.com wrote:
 Are you saying that I can either use Wicket without Servlet or use
 Servlet
 with JSP/JSF just like our previous implementation?
 
 I thought Wicket components would work under a Servlet environment. If
 Wicket cannot run under Servlet then, I would like to know now so that we
 can consider JSF instead. Your response is appreciated.
 
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3848610.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
 
 

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



filter feedback messages

2011-09-28 Thread Miroslav F.
hi folks,

i have this problem:

have panel:
wicket:panel
ba href=cart.htmlcart:/a/b
span wicket:id=cartItems[0]/span
items,nbsp;nbsp;nbsp;bspan 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



how to use getAjaxCallDecorator with AjaxButton ?

2011-09-28 Thread Mathilde Pellerin
Hi all,

I want to generate a Line chart (from Google Visualization API) when I
submit a form.
To do that, I used getAjaxCallDecorator like this :

AjaxButton submit = new AjaxButton(submit) {
private int agePersonne;
private double risque;

@Override
protected void onSubmit(AjaxRequestTarget target, Form? form)
{
agePersonne = age.getModelObject();

//Récupération du risque via le DAO auquel on passe les
valeurs du formulaire
//les valeurs doivent donc avoir été validées avant
risque = risqueDao.getOneByProfil(agePersonne,
agePremieresRegles.getModelObject(),
nbParentsAtteints.getModelObject(),
nbBiopsies.getModelObject(),
menopauseGroupe.getModelObject(),
ageMenopause.getModelObject(), statutTHS.getModelObject());

}

@Override
protected void onError(AjaxRequestTarget target, Form? form) {
target.add(feedback);
}

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
public CharSequence decorateScript(Component c,
CharSequence script){
return JavascriptUtils.genererScriptLine(risque,
agePersonne, risque) + script;
}
};
}
};
form.add(submit);

With this code, the static method genererScriptLine() is called on page
loading, so agePersonne and risque are not initialized because they will be
calculated only on form submitting. So when I submit the form, chart is
displayed but not with good values for agePersonne and risque.

I don't understand how to use getAjaxCallDecorator with AjaxButton to be
sure that decorateScript will be called after submitting, and not on page
loading?
What am I doing wrong?

Mathilde


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. mir...@seznam.cz wrote:
 hi folks,

 i have this problem:

 have panel:
 wicket:panel
        ba href=cart.htmlcart:/a/b
                span wicket:id=cartItems[0]/span
 items,nbsp;nbsp;nbsp;bspan 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



Re: how to use getAjaxCallDecorator with AjaxButton ?

2011-09-28 Thread Martin Grigorov
Move your code from IAjaxCallDecorator to onSubmit() and use
target.appendJavascript()

IAjaxCallDecorator is used to modify the javascript which is used to
in button onclick=HERE which is not what you want

On Wed, Sep 28, 2011 at 11:41 AM, Mathilde Pellerin
mathilde.pelle...@statlife.fr wrote:
 Hi all,

 I want to generate a Line chart (from Google Visualization API) when I
 submit a form.
 To do that, I used getAjaxCallDecorator like this :

        AjaxButton submit = new AjaxButton(submit) {
            private int agePersonne;
            private double risque;

            @Override
            protected void onSubmit(AjaxRequestTarget target, Form? form)
 {
                agePersonne = age.getModelObject();

                //Récupération du risque via le DAO auquel on passe les
 valeurs du formulaire
                //les valeurs doivent donc avoir été validées avant
                risque = risqueDao.getOneByProfil(agePersonne,
 agePremieresRegles.getModelObject(),
                        nbParentsAtteints.getModelObject(),
 nbBiopsies.getModelObject(),
                        menopauseGroupe.getModelObject(),
 ageMenopause.getModelObject(), statutTHS.getModelObject());

            }

            @Override
            protected void onError(AjaxRequestTarget target, Form? form) {
                target.add(feedback);
            }

            @Override
            protected IAjaxCallDecorator getAjaxCallDecorator() {
                return new AjaxCallDecorator() {
                    public CharSequence decorateScript(Component c,
 CharSequence script){
                        return JavascriptUtils.genererScriptLine(risque,
 agePersonne, risque) + script;
                    }
                };
            }
        };
        form.add(submit);

 With this code, the static method genererScriptLine() is called on page
 loading, so agePersonne and risque are not initialized because they will be
 calculated only on form submitting. So when I submit the form, chart is
 displayed but not with good values for agePersonne and risque.

 I don't understand how to use getAjaxCallDecorator with AjaxButton to be
 sure that decorateScript will be called after submitting, and not on page
 loading?
 What am I doing wrong?

 Mathilde




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.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 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. 
 mir...@seznam.cz wrote:
  hi folks,
 
  i have this problem:
 
  have panel:
  wicket:panel
         ba href=cart.htmlcart:/a/b
                 span wicket:id=cartItems[0]/span 
  items,nbsp;nbsp;nbsp;bspan 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



WicketTester#startPanel marked deprecated??

2011-09-28 Thread splitshade
Hi, 

I´m just upgrading a quire large Application to Wicket 1.5.
I just saw that the Method 
public final Panel startPanel(final ITestPanelSource testPanelSource)

is marked deprecated with the hint:

@deprecated since 1.5 use {@link #startComponentInPage(Class,
IMarkupFragment)} instead

But that does not make sense, since startComponentInPAge only allows the
Single-Argument-String-Constructor.
Or am I wrong?

Regards

Martin

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-startPanel-marked-deprecated-tp3850565p3850565.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. 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
         ba href=cart.htmlcart:/a/b
                 span wicket:id=cartItems[0]/span
  items,nbsp;nbsp;nbsp;bspan 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



Re: WicketTester#startPanel marked deprecated??

2011-09-28 Thread Martin Grigorov
Use org.apache.wicket.util.tester.BaseWicketTester.startComponentInPage(C)

On Wed, Sep 28, 2011 at 12:01 PM, splitshade
martin.dil...@googlemail.com wrote:
 Hi,

 I´m just upgrading a quire large Application to Wicket 1.5.
 I just saw that the Method
 public final Panel startPanel(final ITestPanelSource testPanelSource)

 is marked deprecated with the hint:

 @deprecated since 1.5 use {@link #startComponentInPage(Class,
 IMarkupFragment)} instead

 But that does not make sense, since startComponentInPAge only allows the
 Single-Argument-String-Constructor.
 Or am I wrong?

 Regards

 Martin

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/WicketTester-startPanel-marked-deprecated-tp3850565p3850565.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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.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 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 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. 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
          ba href=cart.htmlcart:/a/b
                  span wicket:id=cartItems[0]/span 
   items,nbsp;nbsp;nbsp;bspan 
 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



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. 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
          ba href=cart.htmlcart:/a/b
                  span wicket:id=cartItems[0]/span
   items,nbsp;nbsp;nbsp;bspan
 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



Divide an Ajax request into two parts

2011-09-28 Thread Pranav kacholia
Hi All, 

Suppose i have a textfield with and oncomponentchange behavior which is
being used to do a search. 

Now the search can be done in two ways, say 1 method is faster than the
other. 
The searrch results are displayed vide ajax in a table. 

Is there anyway to fire two consecutive ajax requests?

So when the textfield is updated, first the search is done using method 1,
the results table is updated. 
If the textfield is updated further within a certain interval then the cycle
restarts.
If the textfield is not updated, a second ajax request is made after an
interval. This does the search using method 2, and the new results are
appended to the table at the end of the results for search 1. 

The advantage of using this method is that 95% of the time the search will
yield results using search method 1 so hence it should not be slowed down by
having to do both the searches and then joining the two sets and displaying
the results together.

Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Divide-an-Ajax-request-into-two-parts-tp3850614p3850614.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 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.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
ba href=cart.htmlcart:/a/b
span wicket:id=cartItems[0]/span
items,nbsp;nbsp;nbsp;bspan

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



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()
{
FormObject form = new FormObject(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. 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
       ba href=cart.htmlcart:/a/b
               span wicket:id=cartItems[0]/span 
items,nbsp;nbsp;nbsp;bspan
  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
   
   
  
  
  
 -
  

Re: filter feedback messages

2011-09-28 Thread manuelbarzi
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()
        {
                FormObject form = new FormObject(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. 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
       ba href=cart.htmlcart:/a/b
               span wicket:id=cartItems[0]/span
items,nbsp;nbsp;nbsp;bspan
  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
   
   
  
  
 
 

Re: Divide an Ajax request into two parts

2011-09-28 Thread Martin Grigorov
Use OnChangeAjaxBehavior to fire request to method 1 and
AbstractAjaxTimerBehavior for method 2.
Override their #getChannel() method to return different name so they
are not queued at the client.

Have fun with synchronizing them...

On Wed, Sep 28, 2011 at 12:24 PM, Pranav kacholia
pranav.kacho...@gmail.com wrote:
 Hi All,

 Suppose i have a textfield with and oncomponentchange behavior which is
 being used to do a search.

 Now the search can be done in two ways, say 1 method is faster than the
 other.
 The searrch results are displayed vide ajax in a table.

 Is there anyway to fire two consecutive ajax requests?

 So when the textfield is updated, first the search is done using method 1,
 the results table is updated.
 If the textfield is updated further within a certain interval then the cycle
 restarts.
 If the textfield is not updated, a second ajax request is made after an
 interval. This does the search using method 2, and the new results are
 appended to the table at the end of the results for search 1.

 The advantage of using this method is that 95% of the time the search will
 yield results using search method 1 so hence it should not be slowed down by
 having to do both the searches and then joining the two sets and displaying
 the results together.

 Thanks.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Divide-an-Ajax-request-into-two-parts-tp3850614p3850614.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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.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 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. 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()
         {
                 FormObject form = new FormObject(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
        ba href=cart.htmlcart:/a/b
                span wicket:id=cartItems[0]/span
 items,nbsp;nbsp;nbsp;bspan
   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 

Re: WicketTester#startPanel marked deprecated??

2011-09-28 Thread splitshade
ah there you go, got it.
Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-startPanel-marked-deprecated-tp3850565p3850659.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: how to use getAjaxCallDecorator with AjaxButton ?

2011-09-28 Thread Mathilde Pellerin
Ok, I understand.

Thanks, it works well now.

2011/9/28 Mathilde Pellerin mathilde.pelle...@statlife.fr

 Hi all,

 I want to generate a Line chart (from Google Visualization API) when I
 submit a form.
 To do that, I used getAjaxCallDecorator like this :

 AjaxButton submit = new AjaxButton(submit) {
 private int agePersonne;
 private double risque;

 @Override
 protected void onSubmit(AjaxRequestTarget target, Form? form)
 {
 agePersonne = age.getModelObject();

 //Récupération du risque via le DAO auquel on passe les
 valeurs du formulaire
 //les valeurs doivent donc avoir été validées avant
 risque = risqueDao.getOneByProfil(agePersonne,
 agePremieresRegles.getModelObject(),
 nbParentsAtteints.getModelObject(),
 nbBiopsies.getModelObject(),
 menopauseGroupe.getModelObject(),
 ageMenopause.getModelObject(), statutTHS.getModelObject());

 }

 @Override
 protected void onError(AjaxRequestTarget target, Form? form)
 {
 target.add(feedback);
 }

 @Override
 protected IAjaxCallDecorator getAjaxCallDecorator() {
 return new AjaxCallDecorator() {
 public CharSequence decorateScript(Component c,
 CharSequence script){
 return JavascriptUtils.genererScriptLine(risque,
 agePersonne, risque) + script;
 }
 };
 }
 };
 form.add(submit);

 With this code, the static method genererScriptLine() is called on page
 loading, so agePersonne and risque are not initialized because they will be
 calculated only on form submitting. So when I submit the form, chart is
 displayed but not with good values for agePersonne and risque.

 I don't understand how to use getAjaxCallDecorator with AjaxButton to be
 sure that decorateScript will be called after submitting, and not on page
 loading?
 What am I doing wrong?

 Mathilde




-- 
*Mathilde Pellerin*
Ingénieur en développement de logiciel

STATLIFE
tel : 01.42.11.64.88
mail : mathilde.pelle...@statlife.fr


Re: Divide an Ajax request into two parts

2011-09-28 Thread Pranav kacholia
Yeah, that sounds like a synchronization headache 

i guess another way of phrasing this is whether there is anyway of making an
AjaxUpdate non-blocking. 
as data is available, it will constantly update. 
Be very useful for searches

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Divide-an-Ajax-request-into-two-parts-tp3850614p3850697.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 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.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()
  {
  FormObject  form = new FormObject(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.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
  ba href=cart.htmlcart:/a/b
  span wicket:id=cartItems[0]/span
  items,nbsp;nbsp;nbsp;bspan
  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 

Does PagingNavigation render the entire page and would AjaxPagingNavigation render only its assigned pageableView?

2011-09-28 Thread Martin A
Hello,
I've got a PagingNavigation on a PageableListView, contained in a parent
Page. To me it looks like it renders the whole page when paging its assigned
pageableView. I would like to know if AjaxPagingNavigation would refresh
only its assigned pageableView, because there are other components on the
page that I wouldn't like to get rendered?

Thank you,
Martin


Re: Does PagingNavigation render the entire page and would AjaxPagingNavigation render only its assigned pageableView?

2011-09-28 Thread Martin Grigorov
yes. this is how it works

On Wed, Sep 28, 2011 at 1:54 PM, Martin A wml...@gmail.com wrote:
 Hello,
 I've got a PagingNavigation on a PageableListView, contained in a parent
 Page. To me it looks like it renders the whole page when paging its assigned
 pageableView. I would like to know if AjaxPagingNavigation would refresh
 only its assigned pageableView, because there are other components on the
 page that I wouldn't like to get rendered?

 Thank you,
 Martin




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Does PagingNavigation render the entire page and would AjaxPagingNavigation render only its assigned pageableView?

2011-09-28 Thread Martin A
Thanks, but strangely, clicking on a AjaxNavigationLink returns empty
response. Do you have any ideas why this happens?

Thanks!

On Wed, Sep 28, 2011 at 3:01 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 yes. this is how it works

 On Wed, Sep 28, 2011 at 1:54 PM, Martin A wml...@gmail.com wrote:
  Hello,
  I've got a PagingNavigation on a PageableListView, contained in a parent
  Page. To me it looks like it renders the whole page when paging its
 assigned
  pageableView. I would like to know if AjaxPagingNavigation would refresh
  only its assigned pageableView, because there are other components on the
  page that I wouldn't like to get rendered?
 
  Thank you,
  Martin
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




FW: filter feedback messages

2011-09-28 Thread Miroslav F.
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.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()
   {
   FormObject  form = new 
 FormObject(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.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
   ba href=cart.htmlcart:/a/b
   span wicket:id=cartItems[0]/span 
   items,nbsp;nbsp;nbsp;bspan
   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)
   

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()
{
FormObject form = new FormObject(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.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()
{
FormObject  form = new
  FormObject(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.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 

CSS and JS references in wicket 1.4.18

2011-09-28 Thread Jeffrey Schneller
I know there is a current thread discussing how to remove the
wicket-ver-XXX from the url for a js file.  I was wondering if there was
a way to include the wicket-ver-XXX for all CSS and JS references in
wicket 1.4.18? 

 

I am sure it is probably something simple that I am overlooking.

 

Thanks.

 



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()
{
FormObject  form = new FormObject(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: adding resources after ajax swap

2011-09-28 Thread Igor Vaynberg
hrm. that seems pretty strange. might have had something to do with
WICKET-1623. something we should fix though...

-igor


On Wed, Sep 28, 2011 at 2:22 AM, Martin Grigorov mgrigo...@apache.org wrote:
 Actually it seems Wicket is to blame here.
 In wicket-ajax.js, line 1680 (processScript() method) there is the
 following line:
 var req = new Wicket.Ajax.Request(src, onLoad, false, false);
 where src is the src attribute of the contributed script element.

 Why Wicket tries to load the script body with Ajax and add it as
 script body here /script to the head ?
 It seems to be much more simpler just to add the contributed script
 src=... to the head.

 On Thu, Sep 22, 2011 at 11:23 PM, Pointbreak
 pointbreak+wicketst...@ml1.net wrote:
 Of course you could also just load the scripts in your page instead of
 via ajax... just my 2cnts.

 On Thursday, September 22, 2011 3:18 PM, Steve Lowery
 slow...@gatessolutions.com wrote:
 Is that a filter on my end?  Would that go before or after my wicket
 filter
 mapping?  Any helpful resources out there on this?  I haven't dealt with
 OPTIONS methods before.


 On Thu, Sep 22, 2011 at 2:28 PM, Steve Lowery
 slow...@gatessolutions.comwrote:

  I'm having an issue using resources after an ajax swap, in this case
  jquery.  My home page does not have anything jquery related on it.  There 
  is
  an AjaxFallbackLink which swaps out the main content.  The new content 
  Panel
  has a jquery header contributor.  I see this is being returned in the
  response to the AjaxFallbackLink click:
 
  ajax-responseheader-contribution encoding=wicket1 ![CDATA[head
  xmlns:wicket=http://wicket.apache.org;script type=text/javascript src
  =https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js;
  /script...
  /ajax-response
 
  However, I notice that the browser is attempting to retrieve the jquery
  resource via the OPTIONS method.  It does not appear to be getting added 
  to
  the head and therefore, my component fails because it tries to do some
  jQuery stuff but it isn't available.
 
  Is this the expected behavior or am I doing something wrong?  Do I have to
  load 3rd party libraries on the Page or register headerListener with the
  application?  I have seen the same behavior with other javascript 
  libraries
  (i.e. yui).
 
 
 
 


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





 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 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: CSS and JS references in wicket 1.4.18

2011-09-28 Thread Igor Vaynberg
this is a new feature in 1.5

-igor


On Wed, Sep 28, 2011 at 7:06 AM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 I know there is a current thread discussing how to remove the
 wicket-ver-XXX from the url for a js file.  I was wondering if there was
 a way to include the wicket-ver-XXX for all CSS and JS references in
 wicket 1.4.18?



 I am sure it is probably something simple that I am overlooking.



 Thanks.





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



pretty strange behavior with TextArea containing remaining output html code inside

2011-09-28 Thread manuelbarzi
this error happens on this simple composite (wicket 1.4.17):

Page
   |-Panel
  |-Form
 |-TextField
 |-TextField
 |-TextArea
 |-TextField
 |-TextField
 |-Button
 |-Button

when just rendering this simple page (no logic implemented yet), the
output html (reviewed on chrome and ie) renders ok until the TextArea,
and then, inside the TextArea content (visible text), there's all the
remaining of the output markup!

switching TextArea to a simple TextField does render ok.

known bug?

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



Re: pretty strange behavior with TextArea containing remaining output html code inside

2011-09-28 Thread Igor Vaynberg
sounds like a problem with your html...

-igor


On Wed, Sep 28, 2011 at 9:18 AM, manuelbarzi manuelba...@gmail.com wrote:
 this error happens on this simple composite (wicket 1.4.17):

 Page
   |-Panel
      |-Form
         |-TextField
         |-TextField
         |-TextArea
         |-TextField
         |-TextField
         |-Button
         |-Button

 when just rendering this simple page (no logic implemented yet), the
 output html (reviewed on chrome and ie) renders ok until the TextArea,
 and then, inside the TextArea content (visible text), there's all the
 remaining of the output markup!

 switching TextArea to a simple TextField does render ok.

 known bug?

 -
 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: pretty strange behavior with TextArea containing remaining output html code inside

2011-09-28 Thread manuelbarzi
TextArea is one-self-closed tag .../.

should TextArea  two-opening-closing tags ../... work fine.



On Wed, Sep 28, 2011 at 6:18 PM, manuelbarzi manuelba...@gmail.com wrote:
 this error happens on this simple composite (wicket 1.4.17):

 Page
   |-Panel
      |-Form
         |-TextField
         |-TextField
         |-TextArea
         |-TextField
         |-TextField
         |-Button
         |-Button

 when just rendering this simple page (no logic implemented yet), the
 output html (reviewed on chrome and ie) renders ok until the TextArea,
 and then, inside the TextArea content (visible text), there's all the
 remaining of the output markup!

 switching TextArea to a simple TextField does render ok.

 known bug?


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



Re: pretty strange behavior with TextArea containing remaining output html code inside

2011-09-28 Thread manuelbarzi
should a single closed textarea tag be a problem? neither html editor
nor wicket markup validation complains about it.
.



On Wed, Sep 28, 2011 at 6:26 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 sounds like a problem with your html...

 -igor


 On Wed, Sep 28, 2011 at 9:18 AM, manuelbarzi manuelba...@gmail.com wrote:
 this error happens on this simple composite (wicket 1.4.17):

 Page
   |-Panel
      |-Form
         |-TextField
         |-TextField
         |-TextArea
         |-TextField
         |-TextField
         |-Button
         |-Button

 when just rendering this simple page (no logic implemented yet), the
 output html (reviewed on chrome and ie) renders ok until the TextArea,
 and then, inside the TextArea content (visible text), there's all the
 remaining of the output markup!

 switching TextArea to a simple TextField does render ok.

 known bug?

 -
 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: pretty strange behavior with TextArea containing remaining output html code inside

2011-09-28 Thread Igor Vaynberg
per html spec textarea must have a closing tag...

-igor

On Wed, Sep 28, 2011 at 9:25 AM, manuelbarzi manuelba...@gmail.com wrote:
 TextArea is one-self-closed tag .../.

 should TextArea  two-opening-closing tags ../... work fine.



 On Wed, Sep 28, 2011 at 6:18 PM, manuelbarzi manuelba...@gmail.com wrote:
 this error happens on this simple composite (wicket 1.4.17):

 Page
   |-Panel
      |-Form
         |-TextField
         |-TextField
         |-TextArea
         |-TextField
         |-TextField
         |-Button
         |-Button

 when just rendering this simple page (no logic implemented yet), the
 output html (reviewed on chrome and ie) renders ok until the TextArea,
 and then, inside the TextArea content (visible text), there's all the
 remaining of the output markup!

 switching TextArea to a simple TextField does render ok.

 known bug?


 -
 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: pretty strange behavior with TextArea containing remaining output html code inside

2011-09-28 Thread manuelbarzi
confirmed: a single self-closed textarea tag (textarea... /) makes
rendering fail in this wicket version. it does not complain about
textarea markup (neither html editor), but renders it containing the
remaining html escaped inside, and setting a closing textarea tag at
the end.

only double opening-closing textarea tag
(textarea../textarea) is supported.

On Wed, Sep 28, 2011 at 6:25 PM, manuelbarzi manuelba...@gmail.com wrote:
 TextArea is one-self-closed tag .../.

 should TextArea  two-opening-closing tags ../... work fine.



 On Wed, Sep 28, 2011 at 6:18 PM, manuelbarzi manuelba...@gmail.com wrote:
 this error happens on this simple composite (wicket 1.4.17):

 Page
   |-Panel
      |-Form
         |-TextField
         |-TextField
         |-TextArea
         |-TextField
         |-TextField
         |-Button
         |-Button

 when just rendering this simple page (no logic implemented yet), the
 output html (reviewed on chrome and ie) renders ok until the TextArea,
 and then, inside the TextArea content (visible text), there's all the
 remaining of the output markup!

 switching TextArea to a simple TextField does render ok.

 known bug?



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



Re: pretty strange behavior with TextArea containing remaining output html code inside

2011-09-28 Thread manuelbarzi
right.

may wicket html validation complain in future version for this
particular case. low priority issue...
.



On Wed, Sep 28, 2011 at 6:42 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 per html spec textarea must have a closing tag...

 -igor

 On Wed, Sep 28, 2011 at 9:25 AM, manuelbarzi manuelba...@gmail.com wrote:
 TextArea is one-self-closed tag .../.

 should TextArea  two-opening-closing tags ../... work fine.



 On Wed, Sep 28, 2011 at 6:18 PM, manuelbarzi manuelba...@gmail.com wrote:
 this error happens on this simple composite (wicket 1.4.17):

 Page
   |-Panel
      |-Form
         |-TextField
         |-TextField
         |-TextArea
         |-TextField
         |-TextField
         |-Button
         |-Button

 when just rendering this simple page (no logic implemented yet), the
 output html (reviewed on chrome and ie) renders ok until the TextArea,
 and then, inside the TextArea content (visible text), there's all the
 remaining of the output markup!

 switching TextArea to a simple TextField does render ok.

 known bug?


 -
 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: pretty strange behavior with TextArea containing remaining output html code inside

2011-09-28 Thread Igor Vaynberg
file a jira issue

-igor

On Wed, Sep 28, 2011 at 9:52 AM, manuelbarzi manuelba...@gmail.com wrote:
 right.

 may wicket html validation complain in future version for this
 particular case. low priority issue...
 .



 On Wed, Sep 28, 2011 at 6:42 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 per html spec textarea must have a closing tag...

 -igor

 On Wed, Sep 28, 2011 at 9:25 AM, manuelbarzi manuelba...@gmail.com wrote:
 TextArea is one-self-closed tag .../.

 should TextArea  two-opening-closing tags ../... work fine.



 On Wed, Sep 28, 2011 at 6:18 PM, manuelbarzi manuelba...@gmail.com wrote:
 this error happens on this simple composite (wicket 1.4.17):

 Page
   |-Panel
      |-Form
         |-TextField
         |-TextField
         |-TextArea
         |-TextField
         |-TextField
         |-Button
         |-Button

 when just rendering this simple page (no logic implemented yet), the
 output html (reviewed on chrome and ie) renders ok until the TextArea,
 and then, inside the TextArea content (visible text), there's all the
 remaining of the output markup!

 switching TextArea to a simple TextField does render ok.

 known bug?


 -
 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



How to set Cookie on Redirect to URL

2011-09-28 Thread bht
Hi,

How do I add a cookie to a URL redirect response? I started with the
following class:

public class RedirectToUrlWithHandlerException extends
ReplaceHandlerException {
...

public RedirectToUrlWithHandlerException(final String redirectUrl,
final int statusCode, final IRequestHandler handler) {
super(new RedirectRequestHandler(redirectUrl, statusCode){
@Override
public void detach(IRequestCycle requestCycle) {
super.detach(requestCycle);
handler.detach(requestCycle);
}
@Override
public void respond(IRequestCycle requestCycle) {
super.respond(requestCycle);
handler.respond(requestCycle);
}
}, true);
}
}


and in the page:

throw new RedirectToUrlWithHandlerException(targetUrl, new
IRequestHandler(){
@Override
public void respond(IRequestCycle requestCycle) {
// Set cookie
cookieUtils.save(name, value);
}

@Override
public void detach(IRequestCycle requestCycle) { }
});

with cookieUtils:

instance.cookieUtils = new CookieUtils(cookieDefaults){
@Override
protected void initializeCookie(Cookie cookie) {
super.initializeCookie(cookie);
cookie.setPath(/);
}
};


Still no cookie in the response.

I know this is a tricky issue where older browsers don't always
cooperate, but the page being redirected to can't set the cookie
because the cookie is used to transfer information to it.

Many thanks,

Bernard

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



Tracking Memory Usage

2011-09-28 Thread Dawid Dudzinski
Hello,

We are running into memory usage problems in our Wicket application. The
team has identified several areas worth of improving. However we were only
able to do that by looking at our code and not by profiling the jvm. This
brings me to my actual questions:
1. Is there tool or method to determine Wicket's memory usage/session size?
2. Can anyone suggest a tool or a method to profile a jvm? (We use WebSphere
AS and RAD IDE - problem is that WAS simply crashes when attempting to run
in memory profiling mode)

I'm open to all suggestions - if anyone could give some hints I would truly
appreciate your help.

Thanks,
Dave


Dynamic Markup Content in Wicket (1.4+)

2011-09-28 Thread Brown, Berlin [GCG-PFS]
Does anyone have an article on how to add dynamic content such that the
content isn't defined in the markup at compile time.  It is generated at
runtime.
 
For example.
 
Old Way - Listing1
 
div wicket:id=containers 
  div wicket:id=container1
  /div
  div wicket:id=container2 
  /div
/div
 
...
With dynamic content - Listing2
 
div wicket:id=containers 
   !-- Dynamic Content Wicket Ids, container1, container2 --
/div
...
 
I could use an offline, compile time tool to generate the markup and
then add it to my project. But I wanted to see if there is something
more dynamic.
 
I also, could use something like a ListView or Repeater, but I wanted to
avoid that because of legacy java code.  
 
The Java code is structured such that 'containers' has sub-components
'container1' ***
 
It is easier refactor the Java code or have some system to add some kind
of dynamic content that would look like the HTML in Listing1.
 
UseCase: For Igor,
 
The use-case is just as I described, there are some cases where you have
legacy Wicket Java code.   It costs more to modify the Java code and
retest the logic so I wanted to be able to 'refactor' my markup and
clean at least the markup without making major changes to the Java
hierarchy structure.
 
 I want to have a HTML markup that looks like this but would act like
the listing in listing1 above. 
div wicket:id=containers 
   !-- Dynamic Content Wicket Ids, container1, container2 --
/div
 
 
 
 


Re: Authorization using JAAS and getting the Principal.

2011-09-28 Thread amateo
Hi, I have the same problem but I'm getting the request in a different way:  

(HttpServletRequest)
PolicyContext.getContext(javax.servlet.http.HttpServletRequest)

Did you find a solution?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Authorization-using-JAAS-and-getting-the-Principal-tp3398135p3854205.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



ModalWindow in IE6, IE7, IE8 browser issues

2011-09-28 Thread nhsoft.yhw
Q1:
After the upgrade to 1.5 version , I found that the ModalWindow appear in IE
Page Expired error, but in  Chrome browser to normal.

Same Code for ModalWindow works for Firefox, IE, Chrome with wicket 1.4.18
version.

My ModalWindow Use WebPage Mode, not Page Mode.

Q2:
sometimes Modalwindow did not display for Firefox 6, but always works for
firefox private browse mode.

I found an article about wicket1.5's page cache changes
(https://cwiki.apache.org/WICKET/caching-in-wicket-15.html), whether this
claim?





-
http://www.517wm.com
外卖订餐分享工具
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ModalWindow-in-IE6-IE7-IE8-browser-issues-tp3854296p3854296.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: Tracking Memory Usage

2011-09-28 Thread Igor Vaynberg
yourkit is an excellent profiler...

-igor

On Wed, Sep 28, 2011 at 6:04 PM, Dawid Dudzinski dawi...@gmail.com wrote:
 Hello,

 We are running into memory usage problems in our Wicket application. The
 team has identified several areas worth of improving. However we were only
 able to do that by looking at our code and not by profiling the jvm. This
 brings me to my actual questions:
 1. Is there tool or method to determine Wicket's memory usage/session size?
 2. Can anyone suggest a tool or a method to profile a jvm? (We use WebSphere
 AS and RAD IDE - problem is that WAS simply crashes when attempting to run
 in memory profiling mode)

 I'm open to all suggestions - if anyone could give some hints I would truly
 appreciate your help.

 Thanks,
 Dave


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



Re: Dynamic Markup Content in Wicket (1.4+)

2011-09-28 Thread Martin Makundi
I remember we discussed it before:

http://apache-wicket.1842946.n4.nabble.com/Wicket-MashUpContainer-td1893282.html



2011/9/29 Brown, Berlin [GCG-PFS] berlin.br...@primerica.com:
 Does anyone have an article on how to add dynamic content such that the
 content isn't defined in the markup at compile time.  It is generated at
 runtime.

 For example.

 Old Way - Listing1

 div wicket:id=containers
  div wicket:id=container1
  /div
  div wicket:id=container2
  /div
 /div

 ...
 With dynamic content - Listing2

 div wicket:id=containers
   !-- Dynamic Content Wicket Ids, container1, container2 --
 /div
 ...

 I could use an offline, compile time tool to generate the markup and
 then add it to my project. But I wanted to see if there is something
 more dynamic.

 I also, could use something like a ListView or Repeater, but I wanted to
 avoid that because of legacy java code.

 The Java code is structured such that 'containers' has sub-components
 'container1' ***

 It is easier refactor the Java code or have some system to add some kind
 of dynamic content that would look like the HTML in Listing1.

 UseCase: For Igor,

 The use-case is just as I described, there are some cases where you have
 legacy Wicket Java code.   It costs more to modify the Java code and
 retest the logic so I wanted to be able to 'refactor' my markup and
 clean at least the markup without making major changes to the Java
 hierarchy structure.

  I want to have a HTML markup that looks like this but would act like
 the listing in listing1 above.
 div wicket:id=containers
   !-- Dynamic Content Wicket Ids, container1, container2 --
 /div






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



Re: Dynamic Markup Content in Wicket (1.4+)

2011-09-28 Thread Igor Vaynberg
any component can implement IMarkupResourceStreamProvider and return
whatever markup it wants wicket to use. If you need a fine-tuned
control over the caching mechanism for this markup you can also let
your components implement IMarkupCacheKeyProvider.

-igor


On Wed, Sep 28, 2011 at 8:05 PM, Brown, Berlin [GCG-PFS]
berlin.br...@primerica.com wrote:
 Does anyone have an article on how to add dynamic content such that the
 content isn't defined in the markup at compile time.  It is generated at
 runtime.

 For example.

 Old Way - Listing1

 div wicket:id=containers
  div wicket:id=container1
  /div
  div wicket:id=container2
  /div
 /div

 ...
 With dynamic content - Listing2

 div wicket:id=containers
   !-- Dynamic Content Wicket Ids, container1, container2 --
 /div
 ...

 I could use an offline, compile time tool to generate the markup and
 then add it to my project. But I wanted to see if there is something
 more dynamic.

 I also, could use something like a ListView or Repeater, but I wanted to
 avoid that because of legacy java code.

 The Java code is structured such that 'containers' has sub-components
 'container1' ***

 It is easier refactor the Java code or have some system to add some kind
 of dynamic content that would look like the HTML in Listing1.

 UseCase: For Igor,

 The use-case is just as I described, there are some cases where you have
 legacy Wicket Java code.   It costs more to modify the Java code and
 retest the logic so I wanted to be able to 'refactor' my markup and
 clean at least the markup without making major changes to the Java
 hierarchy structure.

  I want to have a HTML markup that looks like this but would act like
 the listing in listing1 above.
 div wicket:id=containers
   !-- Dynamic Content Wicket Ids, container1, container2 --
 /div






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



Re: ModalWindow in IE6, IE7, IE8 browser issues

2011-09-28 Thread Igor Vaynberg
please create a quickstart that reproduces the issue and attach it to
a jira issue.

-igor


On Wed, Sep 28, 2011 at 8:54 PM, nhsoft.yhw nhsoft@gmail.com wrote:
 Q1:
 After the upgrade to 1.5 version , I found that the ModalWindow appear in IE
 Page Expired error, but in  Chrome browser to normal.

 Same Code for ModalWindow works for Firefox, IE, Chrome with wicket 1.4.18
 version.

 My ModalWindow Use WebPage Mode, not Page Mode.

 Q2:
 sometimes Modalwindow did not display for Firefox 6, but always works for
 firefox private browse mode.

 I found an article about wicket1.5's page cache changes
 (https://cwiki.apache.org/WICKET/caching-in-wicket-15.html), whether this
 claim?





 -
 http://www.517wm.com
 外卖订餐分享工具
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/ModalWindow-in-IE6-IE7-IE8-browser-issues-tp3854296p3854296.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



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