1.5 equivalent of setRedirect(false); ?

2011-09-02 Thread bht
Hi,

In 1.4, in a page constructor, we can call setRedirect(false);

What is the equivalent of this in Wicket 1.5?

The purpose of it is to avoid the creation of a new request. I am
aware of the consequences of doing this in 1.4, and I am prepared for
them in 1.5, too.

Many thanks.

Bernard

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



Re: On Label/Div or some other component, how to use setMarkupId and dynamic id

2011-09-02 Thread Robert Dahlström
If all you need is to scrape for them just give them a specific class. 
No need to use custom attributes.


Regards
Robert

On 09/01/2011 10:38 PM, Brown, Berlin [GCG-PFS] wrote:

Well setMarkId is already there.
And I have seen it done before, I think with the render Header?

I think I got what I needed.

-Original Message-
From: jcgarciam [mailto:jcgarc...@gmail.com]
Sent: Thursday, September 01, 2011 4:34 PM
To: users@wicket.apache.org
Subject: Re: On Label/Div or some other component, how to use
setMarkupId and dynamic id

I meant some specific custom attribute.

On Thu, Sep 1, 2011 at 5:33 PM, Juan Carlos Garcia
jcgarc...@gmail.comwrote:


Why not adding a behavior that output some specific custom tag using
the onComponentTag method? Will that work for you?



On Thu, Sep 1, 2011 at 4:54 PM, Brown, Berlin [GCG-PFS] [via Apache
Wicket]ml-node+3784600-559914674-65...@n4.nabble.com  wrote:


Strange but I may scrape the page and search for those particular
elements.  I want the prefix but I also want to keep uniqueness.



-Original Message-
From: Igor Vaynberg [mailto:[hidden
email]http://user/SendEmail.jtp?type=nodenode=3784600i=0]

Sent: Thursday, September 01, 2011 2:19 PM
To: [hidden email]
http://user/SendEmail.jtp?type=nodenode=3784600i=1
Subject: Re: On Label/Div or some other component, how to use
setMarkupId and dynamic id

i guess the question would be: why?

-igor

On Thu, Sep 1, 2011 at 10:57 AM, Brown, Berlin [GCG-PFS][hidden
email]http://user/SendEmail.jtp?type=nodenode=3784600i=2
wrote:


Is there a way to prefix a component with using setMarkupid but
also have the dynamic id.

I want my end output to have:

With Code:

x = new WebMarkupContainer(myId)
x.setMarkupId(myId);

div id=myId_id2323 /



-
To unsubscribe, e-mail: [hidden
email]http://user/SendEmail.jtp?type=nodenode=3784600i=3
For additional commands, e-mail: [hidden
email]http://user/SendEmail.jtp?type=nodenode=3784600i=4




-
To unsubscribe, e-mail: [hidden
email]http://user/SendEmail.jtp?type=nodenode=3784600i=5
For additional commands, e-mail: [hidden
email]http://user/SendEmail.jtp?type=nodenode=3784600i=6



--
  If you reply to this email, your message will be added to the
discussion
below:

http://apache-wicket.1842946.n4.nabble.com/On-Label-Div-or-some-other
-component-how-to-use-setMarkupId-and-dynamic-id-tp3784344p3784600.ht
ml  To start a new topic under Apache Wicket, email
ml-node+1842946-398011874-65...@n4.nabble.com
To unsubscribe from Apache Wicket, click

herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp
?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXw
xODQyOTQ2fDEyNTYxMzc3ODY=.







--

JC








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



Re: 1.5 equivalent of setRedirect(false); ?

2011-09-02 Thread Martin Grigorov
Wicket automatically decides whether redirect is needed for the
current request or not depending on the configured
org.apache.wicket.settings.IRequestCycleSettings.RenderStrategy and by
comparing the current url with the one that the IRequestMapper has
generated for the page that is going to be rendered.
I.e. if the current is: /my/mount/point and the page is stateful then
the new url should be /my/mount/point?0 and Wicket will need to do a
redirect. Otherwise Refresh button wont work, or at least wont refresh
the current page but will create a new one. If you need to always
create a new one then better make your page stateless or map this page
with a custom IRequestMapper based on the default MountedMapper but
not producing ?0.

On Fri, Sep 2, 2011 at 8:18 AM,  b...@actrix.gen.nz wrote:
 Hi,

 In 1.4, in a page constructor, we can call setRedirect(false);

 What is the equivalent of this in Wicket 1.5?

 The purpose of it is to avoid the creation of a new request. I am
 aware of the consequences of doing this in 1.4, and I am prepared for
 them in 1.5, too.

 Many thanks.

 Bernard

 -
 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: 1.5 equivalent of setRedirect(false); ?

2011-09-02 Thread bht
Martin,

Thanks very much, got the idea!

Regards,

Bernard

On Fri, 2 Sep 2011 09:31:39 +0200, you wrote:

Wicket automatically decides whether redirect is needed for the
current request or not depending on the configured
org.apache.wicket.settings.IRequestCycleSettings.RenderStrategy and by
comparing the current url with the one that the IRequestMapper has
generated for the page that is going to be rendered.
I.e. if the current is: /my/mount/point and the page is stateful then
the new url should be /my/mount/point?0 and Wicket will need to do a
redirect. Otherwise Refresh button wont work, or at least wont refresh
the current page but will create a new one. If you need to always
create a new one then better make your page stateless or map this page
with a custom IRequestMapper based on the default MountedMapper but
not producing ?0.

On Fri, Sep 2, 2011 at 8:18 AM,  b...@actrix.gen.nz wrote:
 Hi,

 In 1.4, in a page constructor, we can call setRedirect(false);

 What is the equivalent of this in Wicket 1.5?

 The purpose of it is to avoid the creation of a new request. I am
 aware of the consequences of doing this in 1.4, and I am prepared for
 them in 1.5, too.

 Many thanks.

 Bernard

 -
 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: UrlEncoder - question mark not encoded for parameter values

2011-09-02 Thread Martin Grigorov
Hi,

On Fri, Sep 2, 2011 at 2:12 AM, pasto peter.pastr...@gmail.com wrote:
 Hi,

 while patching the original portlet support in Wicket 1.4 to Wicket 1.5, I
 run into 2 problems:

 1) Url returned by the RequestMapper does not seem to be properly rendered,
 as it does not encode question mark character in the Url parameter value (I
 haven't checked the w3c spec, but at least Liferay Portal seems to require
 it to be encoded)

 The reason is this definition in the UrlEncoder:
                        case QUERY :
                                // to allow direct passing of URL in query
                                dontNeedEncoding.set('/');
                                // to allow direct passing of URL in query
                                dontNeedEncoding.set('?');
File a bug for this. We need to verify it.
I also found a bug there few months ago so it is not impossible.

 Is it a bug or (according to the comment) a feature?

 2) I could not find an easy way to make the markup ID unique across
 applications (multiple applications per page). The original portlet support
 adds a portlet identifier to the markup ID in the PortletRequestContext. Is
 there a way to do it in Wicket 1.5? (I haven't checked, if it's possible,
 but maybe a MarkupFilter?)
The unique id (its suffix) is generated by
org.apache.wicket.Session.nextSequenceValue().
Override it with something that will produce an unique id for your case.

 Thanks,
 Peter.


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785027.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



Reference to css outside classpath on wicket 1.5RC7

2011-09-02 Thread Sotil Bertanzetti, Matteo
Hello.
 
I'm tying to migrate a project from wicket 1.4.18 to 1.5rc7.
I have a problem trying to add css and javascript links to my html code;
css and javascript files are located outside classpath (outside
WEB-INF). 
 
 
In wicket 1.4.18 I do:
 
add(CSSPackageResource.getHeaderContribution(css/main.css));
 
and in html appears a relative css link like this:
 
link rel=stylesheet type=text/css href=../../css/main.css
view-source:http://10.128.28.213:8000/plash/css/main.css  /
 
wich is correct.
 
 
I want to do the same in wicket 1.5. I try
 
@Override
public void renderHead(final IHeaderResponse aResponse) {
super.renderHead(aResponse);
 
aResponse.renderCSSReference(RequestCycle.get().getUrlRenderer().renderC
ontextRelativeUrl(css/main.css));
}
 
It works in some url, but in others it puts too much .. to the url; in
the same example I wrote before, now writes:
 
link rel=stylesheet type=text/css
href=../../../css/main.css view-source:http://localhost/css/main.css
 /
 
Debugging I see that
RequestCycle.get().getUrlRenderer().renderContextRelativeUrl(css/main.c
ss)returns the correct url, but function renderCSSReference adds more
.. to the url. More precisely, it's in line 231 of
org.apache.wicket.request.UrlRenderer, called from renderCSSReference,
where extra .. are added.
 
I'm using:
 
Wicket 1.5RC7
Windows xp
Jdk 1.5
Weblogic 9.2
 
Please help.
 
Matteo Sotil


Re: Reference to css outside classpath on wicket 1.5RC7

2011-09-02 Thread Martin Grigorov
Quick solution for your case:
Implement a new ResourceReference which returns
org.apache.wicket.request.resource.ContextRelativeResource in its
#getResource().
I think we should add such ResourceReference in wicket-core.

I am not sure at the moment what's the problem with the wrongly
produced Url with your approach.
Please create a quickstart and attach it to a ticket.

On Fri, Sep 2, 2011 at 10:27 AM, Sotil Bertanzetti, Matteo
mso...@gencat.cat wrote:
 Hello.

 I'm tying to migrate a project from wicket 1.4.18 to 1.5rc7.
 I have a problem trying to add css and javascript links to my html code;
 css and javascript files are located outside classpath (outside
 WEB-INF).


 In wicket 1.4.18 I do:

 add(CSSPackageResource.getHeaderContribution(css/main.css));

 and in html appears a relative css link like this:

        link rel=stylesheet type=text/css href=../../css/main.css
 view-source:http://10.128.28.213:8000/plash/css/main.css  /

 wich is correct.


 I want to do the same in wicket 1.5. I try

    @Override
    public void renderHead(final IHeaderResponse aResponse) {
        super.renderHead(aResponse);

 aResponse.renderCSSReference(RequestCycle.get().getUrlRenderer().renderC
 ontextRelativeUrl(css/main.css));
    }

 It works in some url, but in others it puts too much .. to the url; in
 the same example I wrote before, now writes:

        link rel=stylesheet type=text/css
 href=../../../css/main.css view-source:http://localhost/css/main.css
  /

 Debugging I see that
 RequestCycle.get().getUrlRenderer().renderContextRelativeUrl(css/main.c
 ss)returns the correct url, but function renderCSSReference adds more
 .. to the url. More precisely, it's in line 231 of
 org.apache.wicket.request.UrlRenderer, called from renderCSSReference,
 where extra .. are added.

 I'm using:

 Wicket 1.5RC7
 Windows xp
 Jdk 1.5
 Weblogic 9.2

 Please help.

 Matteo Sotil




-- 
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: UrlEncoder - question mark not encoded for parameter values

2011-09-02 Thread pasto
Thanks a lot, somehow I did not expect it so be so easy to override :). I
have filed a bug for the UrlEncoder
https://issues.apache.org/jira/browse/WICKET-4019. 

Peter.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785632.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: UrlEncoder - question mark not encoded for parameter values

2011-09-02 Thread pasto
Now I remembered, why I did not check the 'nextSequenceValue'. It returns an
integer and I don't know about any unique portlet identifier, that is a
number and could be used to make the markup ID unique. Of course, I can
generate a hash or use a part of the portlet name, but that does not look
that nice. Is there a way, how to add a string to the markup ID?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785658.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: UrlEncoder - question mark not encoded for parameter values

2011-09-02 Thread Martin Grigorov
use getMarkupId() to get the generated by Wicket and then
setMarkupId(orig + myUUID)

On Fri, Sep 2, 2011 at 11:05 AM, pasto peter.pastr...@gmail.com wrote:
 Now I remembered, why I did not check the 'nextSequenceValue'. It returns an
 integer and I don't know about any unique portlet identifier, that is a
 number and could be used to make the markup ID unique. Of course, I can
 generate a hash or use a part of the portlet name, but that does not look
 that nice. Is there a way, how to add a string to the markup ID?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785658.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: UrlEncoder - question mark not encoded for parameter values

2011-09-02 Thread pasto
I might be missing something. But how to do this automatically for
every component that is being rendered?

On Fri, Sep 2, 2011 at 11:08 AM, Martin Grigorov-4 [via Apache Wicket]
ml-node+3785666-1536426743-246...@n4.nabble.com wrote:
 use getMarkupId() to get the generated by Wicket and then
 setMarkupId(orig + myUUID)

 On Fri, Sep 2, 2011 at 11:05 AM, pasto [hidden email] wrote:
 Now I remembered, why I did not check the 'nextSequenceValue'. It returns
 an
 integer and I don't know about any unique portlet identifier, that is a
 number and could be used to make the markup ID unique. Of course, I can
 generate a hash or use a part of the portlet name, but that does not look
 that nice. Is there a way, how to add a string to the markup ID?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785658.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: [hidden email]
 For additional commands, e-mail: [hidden email]




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

 -
 To unsubscribe, e-mail: [hidden email]
 For additional commands, e-mail: [hidden email]



 
 If you reply to this email, your message will be added to the discussion
 below:
 http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785666.html
 To unsubscribe from UrlEncoder - question mark not encoded for parameter
 values, click here.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785678.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



[Migration 1.5] How can i redirect to another page with a configured response?

2011-09-02 Thread Mike Mander

Hi,

my usecase: Google caches page urls from our old shop. Because we 
changed the url layout i have to redirect all page requests to the new page.


I did that this way
wicket-1.4.18

@Override
protected void onBeforeRender() {
super.onBeforeRender();
final String url = 
RequestCycle.get().urlFor(getRedirectPageClass(), 
getRedirectPageParameters()).toString();

RedirectRequestTarget target = new RedirectRequestTarget(url) {
  @Override
  public void respond(RequestCycle requestCycle) {
WebResponse response = (WebResponse) 
requestCycle.getResponse();

response.reset();

response.getHttpServletResponse().setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);

response.redirect(url);
  }
};
getRequestCycle().setRequestTarget(target);
}

Until now my wicket 1.5 solution looks like this:

@Override
protected void onBeforeRender() {
super.onBeforeRender();
final String url = 
RequestCycle.get().urlFor(getRedirectPageClass(), 
getRedirectPageParameters()).toString();

RedirectRequestHandler target = new RedirectRequestHandler(url) {
@Override
public void respond(IRequestCycle requestCycle) {
WebResponse response = (WebResponse) 
requestCycle.getResponse();

response.reset();
((HttpServletResponse) 
response.getContainerResponse()).setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);

response.redirect(url);
^^
  }
};
getRequestCycle().setRequestTarget(target);
  ^^^
}

It is not compiling because of the marked code pieces.
I've already checked the migration guide.

Thanks for helping me out.
Mike

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



Re: UrlEncoder - question mark not encoded for parameter values

2011-09-02 Thread Martin Grigorov
org.apache.wicket.Application.getComponentInitializationListeners().add(new
IComponentInitializationListener() {
  onInitialize(Component) {
//do the trick here
  }
})

On Fri, Sep 2, 2011 at 11:16 AM, pasto peter.pastr...@gmail.com wrote:
 I might be missing something. But how to do this automatically for
 every component that is being rendered?

 On Fri, Sep 2, 2011 at 11:08 AM, Martin Grigorov-4 [via Apache Wicket]
 ml-node+3785666-1536426743-246...@n4.nabble.com wrote:
 use getMarkupId() to get the generated by Wicket and then
 setMarkupId(orig + myUUID)

 On Fri, Sep 2, 2011 at 11:05 AM, pasto [hidden email] wrote:
 Now I remembered, why I did not check the 'nextSequenceValue'. It returns
 an
 integer and I don't know about any unique portlet identifier, that is a
 number and could be used to make the markup ID unique. Of course, I can
 generate a hash or use a part of the portlet name, but that does not look
 that nice. Is there a way, how to add a string to the markup ID?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785658.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: [hidden email]
 For additional commands, e-mail: [hidden email]




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

 -
 To unsubscribe, e-mail: [hidden email]
 For additional commands, e-mail: [hidden email]



 
 If you reply to this email, your message will be added to the discussion
 below:
 http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785666.html
 To unsubscribe from UrlEncoder - question mark not encoded for parameter
 values, click here.


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785678.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: UrlEncoder - question mark not encoded for parameter values

2011-09-02 Thread pasto
aah, that was really long time ago, when I used this for
SpringComponentInjector, thanks for the tip. 
Peter.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UrlEncoder-question-mark-not-encoded-for-parameter-values-tp3785027p3785702.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: [Migration 1.5] How can i redirect to another page with a configured response?

2011-09-02 Thread Martin Grigorov
On Fri, Sep 2, 2011 at 11:24 AM, Mike Mander wicket-m...@gmx.de wrote:
 Hi,

 my usecase: Google caches page urls from our old shop. Because we changed
 the url layout i have to redirect all page requests to the new page.

 I did that this way
 wicket-1.4.18

    @Override
    protected void onBeforeRender() {
        super.onBeforeRender();
        final String url = RequestCycle.get().urlFor(getRedirectPageClass(),
 getRedirectPageParameters()).toString();
        RedirectRequestTarget target = new RedirectRequestTarget(url) {
          @Override
          public void respond(RequestCycle requestCycle) {
            WebResponse response = (WebResponse) requestCycle.getResponse();
            response.reset();

  response.getHttpServletResponse().setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
            response.redirect(url);
          }
        };
        getRequestCycle().setRequestTarget(target);
    }

 Until now my wicket 1.5 solution looks like this:

    @Override
    protected void onBeforeRender() {
        super.onBeforeRender();
        final String url = RequestCycle.get().urlFor(getRedirectPageClass(),
 getRedirectPageParameters()).toString();
        RedirectRequestHandler target = new RedirectRequestHandler(url) {
            @Override
            public void respond(IRequestCycle requestCycle) {
            WebResponse response = (WebResponse) requestCycle.getResponse();
            response.reset();
            ((HttpServletResponse)
 response.getContainerResponse()).setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
            response.redirect(url);
            ^^
org.apache.wicket.request.http.WebResponse.sendRedirect(String)
          }
        };
        getRequestCycle().setRequestTarget(target);
                                          ^^^
org.apache.wicket.request.cycle.RequestCycle.scheduleRequestHandlerAfterCurrent(IRequestHandler)
    }

 It is not compiling because of the marked code pieces.
 I've already checked the migration guide.

 Thanks for helping me out.
 Mike

 -
 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: [Migration 1.5] How can i redirect to another page with a configured response?

2011-09-02 Thread Mike Mander

Thanks Martin,

that worked. Is this still the way to go in wicket 1.5?

Thanks
Mike

On Fri, Sep 2, 2011 at 11:24 AM, Mike Manderwicket-m...@gmx.de  wrote:

Hi,

my usecase: Google caches page urls from our old shop. Because we changed
the url layout i have to redirect all page requests to the new page.

I did that this way
wicket-1.4.18

@Override
protected void onBeforeRender() {
super.onBeforeRender();
final String url = RequestCycle.get().urlFor(getRedirectPageClass(),
getRedirectPageParameters()).toString();
RedirectRequestTarget target = new RedirectRequestTarget(url) {
  @Override
  public void respond(RequestCycle requestCycle) {
WebResponse response = (WebResponse) requestCycle.getResponse();
response.reset();

  
response.getHttpServletResponse().setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.redirect(url);
  }
};
getRequestCycle().setRequestTarget(target);
}

Until now my wicket 1.5 solution looks like this:

@Override
protected void onBeforeRender() {
super.onBeforeRender();
final String url = RequestCycle.get().urlFor(getRedirectPageClass(),
getRedirectPageParameters()).toString();
RedirectRequestHandler target = new RedirectRequestHandler(url) {
@Override
public void respond(IRequestCycle requestCycle) {
WebResponse response = (WebResponse) requestCycle.getResponse();
response.reset();
((HttpServletResponse)
response.getContainerResponse()).setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.redirect(url);
^^

org.apache.wicket.request.http.WebResponse.sendRedirect(String)

  }
};
getRequestCycle().setRequestTarget(target);
  ^^^

org.apache.wicket.request.cycle.RequestCycle.scheduleRequestHandlerAfterCurrent(IRequestHandler)

}

It is not compiling because of the marked code pieces.
I've already checked the migration guide.

Thanks for helping me out.
Mike

-
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



Javascript does not detect components loaded upon panel replacement

2011-09-02 Thread martin . asenov



Hello guys, 


I've got the following issue. I have a main page that declares in its
markup . Once I replace an existing panel with another one, some JQuery
within the file scripts.js cannot detect markup that come with the new
panel and therefore does not call them. It acts just like that markup is
not present in DOM. 


Would you please assist? 


Thanks,
Martin 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

[Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Mike Mander

In migration guide it says
org.apache.wicket.markup.html.resources.CompressedResourceReference 
org.apache.wicket.request.resource.CompressedResourceReference


But i can't import it. Do i have to include another wicket library?

Thanks
Mike

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



[Migration 1.5] Where has CookieValuePersister gone?

2011-09-02 Thread Mike Mander

Sorry for spaming.

But i can't find CookieValuePersister anymore.

Thanks
Mike

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



Re: [Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Ernesto Reinaldo Barreiro
I think I remember I saw I commit message telling the feature was
dropped... but I might be wrong.

Best,

Ernesto

On Fri, Sep 2, 2011 at 1:05 PM, Mike Mander wicket-m...@gmx.de wrote:
 In migration guide it says
 org.apache.wicket.markup.html.resources.CompressedResourceReference
 org.apache.wicket.request.resource.CompressedResourceReference

 But i can't import it. Do i have to include another wicket library?

 Thanks
 Mike

 -
 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: [Migration 1.5] Where has CookieValuePersister gone?

2011-09-02 Thread Mike Mander

Am 02.09.2011 13:15, schrieb Mike Mander:

Sorry for spaming.

But i can't find CookieValuePersister anymore.

Thanks
Mike

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



seems that org.apache.wicket.util.cookies.CookieUtils is the replacement.

Thanks
Mike

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



Re: [Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Mike Mander

Am 02.09.2011 13:15, schrieb Ernesto Reinaldo Barreiro:

I think I remember I saw I commit message telling the feature was
dropped... but I might be wrong.

Best,

Ernesto

On Fri, Sep 2, 2011 at 1:05 PM, Mike Manderwicket-m...@gmx.de  wrote:

In migration guide it says
org.apache.wicket.markup.html.resources.CompressedResourceReference
org.apache.wicket.request.resource.CompressedResourceReference

But i can't import it. Do i have to include another wicket library?

Thanks
Mike

-
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



So i have to use a normal ref?

Thanks
Mike

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



Re: [Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Martin Grigorov
Yes. Most (all?!) of the web servers provide such functionality. No
need Wicket to compress as well.
Actually we have tickets because of double compressing and the browser
wasn't able to read.

On Fri, Sep 2, 2011 at 1:20 PM, Mike Mander wicket-m...@gmx.de wrote:
 Am 02.09.2011 13:15, schrieb Ernesto Reinaldo Barreiro:

 I think I remember I saw I commit message telling the feature was
 dropped... but I might be wrong.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:05 PM, Mike Manderwicket-m...@gmx.de  wrote:

 In migration guide it says
 org.apache.wicket.markup.html.resources.CompressedResourceReference
 org.apache.wicket.request.resource.CompressedResourceReference

 But i can't import it. Do i have to include another wicket library?

 Thanks
 Mike

 -
 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


 So i have to use a normal ref?

 Thanks
 Mike

 -
 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: Reference to css outside classpath on wicket 1.5RC7

2011-09-02 Thread Sotil Bertanzetti, Matteo
Thank you, it worked.

I'll try to create a quickstart...

Matteo Sotil

-Mensaje original-
De: Martin Grigorov [mailto:mgrigo...@apache.org] 
Enviado el: viernes, 02 de septiembre de 2011 10:37
Para: users@wicket.apache.org
Asunto: Re: Reference to css outside classpath on wicket 1.5RC7

Quick solution for your case:
Implement a new ResourceReference which returns
org.apache.wicket.request.resource.ContextRelativeResource in its
#getResource().
I think we should add such ResourceReference in wicket-core.

I am not sure at the moment what's the problem with the wrongly
produced Url with your approach.
Please create a quickstart and attach it to a ticket.

On Fri, Sep 2, 2011 at 10:27 AM, Sotil Bertanzetti, Matteo
mso...@gencat.cat wrote:
 Hello.

 I'm tying to migrate a project from wicket 1.4.18 to 1.5rc7.
 I have a problem trying to add css and javascript links to my html code;
 css and javascript files are located outside classpath (outside
 WEB-INF).


 In wicket 1.4.18 I do:

 add(CSSPackageResource.getHeaderContribution(css/main.css));

 and in html appears a relative css link like this:

        link rel=stylesheet type=text/css href=../../css/main.css
 view-source:http://10.128.28.213:8000/plash/css/main.css  /

 wich is correct.


 I want to do the same in wicket 1.5. I try

    @Override
    public void renderHead(final IHeaderResponse aResponse) {
        super.renderHead(aResponse);

 aResponse.renderCSSReference(RequestCycle.get().getUrlRenderer().renderC
 ontextRelativeUrl(css/main.css));
    }

 It works in some url, but in others it puts too much .. to the url; in
 the same example I wrote before, now writes:

        link rel=stylesheet type=text/css
 href=../../../css/main.css view-source:http://localhost/css/main.css
  /

 Debugging I see that
 RequestCycle.get().getUrlRenderer().renderContextRelativeUrl(css/main.c
 ss)returns the correct url, but function renderCSSReference adds more
 .. to the url. More precisely, it's in line 231 of
 org.apache.wicket.request.UrlRenderer, called from renderCSSReference,
 where extra .. are added.

 I'm using:

 Wicket 1.5RC7
 Windows xp
 Jdk 1.5
 Weblogic 9.2

 Please help.

 Matteo Sotil




-- 
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: [Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Ernesto Reinaldo Barreiro
I guess so... but maybe a commiter can confirm is that's correct.

Best,

Ernesto

On Fri, Sep 2, 2011 at 1:20 PM, Mike Mander wicket-m...@gmx.de wrote:
 Am 02.09.2011 13:15, schrieb Ernesto Reinaldo Barreiro:

 I think I remember I saw I commit message telling the feature was
 dropped... but I might be wrong.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:05 PM, Mike Manderwicket-m...@gmx.de  wrote:

 In migration guide it says
 org.apache.wicket.markup.html.resources.CompressedResourceReference
 org.apache.wicket.request.resource.CompressedResourceReference

 But i can't import it. Do i have to include another wicket library?

 Thanks
 Mike

 -
 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


 So i have to use a normal ref?

 Thanks
 Mike

 -
 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



Event or way to check when a component has visibility change

2011-09-02 Thread Brown, Berlin [GCG-PFS]
With the 1.4 release of wicket, is there a way to determine when a
component has changed visibility.  Mainly from false to true visibility.
 
I can use onBeforeRender or onConfigure to determine when the component
is being rendered. 
 
onAfterRender will get called after it is rendered but the component is
still visible.


Re: [Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Martin Grigorov
Even the migration guide have it:
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-RemovedCompressedPackageResource

On Fri, Sep 2, 2011 at 1:54 PM, Ernesto Reinaldo Barreiro
reier...@gmail.com wrote:
 I guess so... but maybe a commiter can confirm is that's correct.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:20 PM, Mike Mander wicket-m...@gmx.de wrote:
 Am 02.09.2011 13:15, schrieb Ernesto Reinaldo Barreiro:

 I think I remember I saw I commit message telling the feature was
 dropped... but I might be wrong.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:05 PM, Mike Manderwicket-m...@gmx.de  wrote:

 In migration guide it says
 org.apache.wicket.markup.html.resources.CompressedResourceReference
 org.apache.wicket.request.resource.CompressedResourceReference

 But i can't import it. Do i have to include another wicket library?

 Thanks
 Mike

 -
 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


 So i have to use a normal ref?

 Thanks
 Mike

 -
 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



Re: Event or way to check when a component has visibility change

2011-09-02 Thread Martin Grigorov
onBeforeRender() is not called for invisible components

On Fri, Sep 2, 2011 at 2:41 PM, Brown, Berlin [GCG-PFS]
berlin.br...@primerica.com wrote:
 With the 1.4 release of wicket, is there a way to determine when a
 component has changed visibility.  Mainly from false to true visibility.

 I can use onBeforeRender or onConfigure to determine when the component
 is being rendered.

 onAfterRender will get called after it is rendered but the component is
 still visible.




-- 
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: [Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Ernesto Reinaldo Barreiro
Martin,

Still sticking to 1.4.x over here;-) Hope soon I can jump to 1.5.x

Cheers,

Ernesto

On Fri, Sep 2, 2011 at 2:43 PM, Martin Grigorov mgrigo...@apache.org wrote:
 Even the migration guide have it:
 https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-RemovedCompressedPackageResource

 On Fri, Sep 2, 2011 at 1:54 PM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
 I guess so... but maybe a commiter can confirm is that's correct.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:20 PM, Mike Mander wicket-m...@gmx.de wrote:
 Am 02.09.2011 13:15, schrieb Ernesto Reinaldo Barreiro:

 I think I remember I saw I commit message telling the feature was
 dropped... but I might be wrong.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:05 PM, Mike Manderwicket-m...@gmx.de  wrote:

 In migration guide it says
 org.apache.wicket.markup.html.resources.CompressedResourceReference
 org.apache.wicket.request.resource.CompressedResourceReference

 But i can't import it. Do i have to include another wicket library?

 Thanks
 Mike

 -
 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


 So i have to use a normal ref?

 Thanks
 Mike

 -
 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



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



Re: [Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Martin Grigorov
I hope too :-)
You make nice additions in our wiki. It would be great if they were for 1.5 ;-)

On Fri, Sep 2, 2011 at 2:47 PM, Ernesto Reinaldo Barreiro
reier...@gmail.com wrote:
 Martin,

 Still sticking to 1.4.x over here;-) Hope soon I can jump to 1.5.x

 Cheers,

 Ernesto

 On Fri, Sep 2, 2011 at 2:43 PM, Martin Grigorov mgrigo...@apache.org wrote:
 Even the migration guide have it:
 https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-RemovedCompressedPackageResource

 On Fri, Sep 2, 2011 at 1:54 PM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
 I guess so... but maybe a commiter can confirm is that's correct.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:20 PM, Mike Mander wicket-m...@gmx.de wrote:
 Am 02.09.2011 13:15, schrieb Ernesto Reinaldo Barreiro:

 I think I remember I saw I commit message telling the feature was
 dropped... but I might be wrong.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:05 PM, Mike Manderwicket-m...@gmx.de  wrote:

 In migration guide it says
 org.apache.wicket.markup.html.resources.CompressedResourceReference
 org.apache.wicket.request.resource.CompressedResourceReference

 But i can't import it. Do i have to include another wicket library?

 Thanks
 Mike

 -
 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


 So i have to use a normal ref?

 Thanks
 Mike

 -
 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



 -
 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: Event or way to check when a component has visibility change

2011-09-02 Thread Brown, Berlin [GCG-PFS]
Is there another method to determine when the visibility of a component has 
changed.

E.g.

If a window is shown (through ajax possibly): Some listener 

Onevent() { this is visible }

...

Onevent2() { this is now being changed to not visible } 

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, September 02, 2011 8:45 AM
To: users@wicket.apache.org
Subject: Re: Event or way to check when a component has visibility change

onBeforeRender() is not called for invisible components

On Fri, Sep 2, 2011 at 2:41 PM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:
 With the 1.4 release of wicket, is there a way to determine when a 
 component has changed visibility.  Mainly from false to true visibility.

 I can use onBeforeRender or onConfigure to determine when the 
 component is being rendered.

 onAfterRender will get called after it is rendered but the component 
 is still visible.




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



passing information to the modal window class

2011-09-02 Thread Anna Simbirtsev
Hi, I have a modal window defined like in the following example:

*public class *Modal *extends *WebPage
{
  *public *Modal()
  {
 *final *ModalWindow modal1;
  add(modal1 = *new *ModalWindow(modal1));

  modal1.setPageMapName(modal-1);
  modal1.setCookieName(modal-1);
  modal1.setPageCreator(*new *ModalWindow.PageCreator()
  {
  *public *Page createPage()
  {
  *return new *ModalPage1(Modal.this, modal1);
  }
  });

  add(*new *AjaxLink(showModal1)
  {
  *public **void *onClick(AjaxRequestTarget target)
  {
  modal1.show(target);
  }
  });

}

*public class *ModalPage1 *extends *WebPage{
  *public *ModalPage1(Modal modal,ModalWindow modalwindow){

  public void setData(String m) {

  }

  }
}


Passing info to the modal window

2011-09-02 Thread Anna Simbirtsev
Hi, I have a modal window defined like in the following example:


*public class *Modal *extends *WebPage
{
  *public *Modal()
  {
 *final *ModalWindow modal1;
  add(modal1 = *new *ModalWindow(modal1));

  modal1.setPageMapName(modal-1);
  modal1.setCookieName(modal-1);
  modal1.setPageCreator(*new *ModalWindow.PageCreator()
  {
  *public *Page createPage()
  {
  *return new *ModalPage1(Modal.this, modal1);
  }
  });

  add(*new *AjaxLink(showModal1)
  {
  *public **void *onClick(AjaxRequestTarget target)
  {
  modal1.show(target);
  }
  });

}

*public class *ModalPage1 *extends *WebPage{
  *public *ModalPage1(Modal modal,ModalWindow modalwindow){

 public void setData(String data) {

 }
  }
}

My question is how can I call the function setData, if I have the modal1.

Thanks
Anna


Re: Passing info to the modal window

2011-09-02 Thread Martin Makundi
Why not pull your data from session instead, the hollywood way?

Push is mostly not a good way to do it.

**
Martin

2011/9/2 Anna Simbirtsev asimbirt...@gmail.com:
 Hi, I have a modal window defined like in the following example:


 *public class *Modal *extends *WebPage
 {
  *public *Modal()
  {
  *final *ModalWindow modal1;
  add(modal1 = *new *ModalWindow(modal1));

  modal1.setPageMapName(modal-1);
  modal1.setCookieName(modal-1);
  modal1.setPageCreator(*new *ModalWindow.PageCreator()
  {
  *public *Page createPage()
  {
  *return new *ModalPage1(Modal.this, modal1);
  }
  });

  add(*new *AjaxLink(showModal1)
  {
  *public **void *onClick(AjaxRequestTarget target)
  {
  modal1.show(target);
  }
  });

 }

 *public class *ModalPage1 *extends *WebPage{
  *public *ModalPage1(Modal modal,ModalWindow modalwindow){

     public void setData(String data) {

     }
  }
 }

 My question is how can I call the function setData, if I have the modal1.

 Thanks
 Anna


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



Re: Javascript does not detect components loaded upon panel replacement

2011-09-02 Thread Igor Vaynberg
google jquery live

-igor

On Fri, Sep 2, 2011 at 2:02 AM,  martin.ase...@mail.bg wrote:



 Hello guys,


 I've got the following issue. I have a main page that declares in its
 markup . Once I replace an existing panel with another one, some JQuery
 within the file scripts.js cannot detect markup that come with the new
 panel and therefore does not call them. It acts just like that markup is
 not present in DOM.


 Would you please assist?


 Thanks,
 Martin

 -
 Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския 
 пазар - 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна 
 версия, SMS известяване и други.

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



Re: [Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Igor Vaynberg
he is a committer

-igor


On Fri, Sep 2, 2011 at 4:54 AM, Ernesto Reinaldo Barreiro
reier...@gmail.com wrote:
 I guess so... but maybe a commiter can confirm is that's correct.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:20 PM, Mike Mander wicket-m...@gmx.de wrote:
 Am 02.09.2011 13:15, schrieb Ernesto Reinaldo Barreiro:

 I think I remember I saw I commit message telling the feature was
 dropped... but I might be wrong.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:05 PM, Mike Manderwicket-m...@gmx.de  wrote:

 In migration guide it says
 org.apache.wicket.markup.html.resources.CompressedResourceReference
 org.apache.wicket.request.resource.CompressedResourceReference

 But i can't import it. Do i have to include another wicket library?

 Thanks
 Mike

 -
 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


 So i have to use a normal ref?

 Thanks
 Mike

 -
 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: Event or way to check when a component has visibility change

2011-09-02 Thread Igor Vaynberg
whats the usecase?

-igor

On Fri, Sep 2, 2011 at 6:19 AM, Brown, Berlin [GCG-PFS]
berlin.br...@primerica.com wrote:
 Is there another method to determine when the visibility of a component has 
 changed.

 E.g.

 If a window is shown (through ajax possibly): Some listener

 Onevent() { this is visible }

 ...

 Onevent2() { this is now being changed to not visible }

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Friday, September 02, 2011 8:45 AM
 To: users@wicket.apache.org
 Subject: Re: Event or way to check when a component has visibility change

 onBeforeRender() is not called for invisible components

 On Fri, Sep 2, 2011 at 2:41 PM, Brown, Berlin [GCG-PFS] 
 berlin.br...@primerica.com wrote:
 With the 1.4 release of wicket, is there a way to determine when a
 component has changed visibility.  Mainly from false to true visibility.

 I can use onBeforeRender or onConfigure to determine when the
 component is being rendered.

 onAfterRender will get called after it is rendered but the component
 is still visible.




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



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



Re: Passing info to the modal window

2011-09-02 Thread Igor Vaynberg
you cannot pass page instances between pages. if you need this kind of
communication make ModalPage1 a panel instead of a page.

-igor


On Fri, Sep 2, 2011 at 8:07 AM, Anna Simbirtsev asimbirt...@gmail.com wrote:
 Hi, I have a modal window defined like in the following example:


 *public class *Modal *extends *WebPage
 {
  *public *Modal()
  {
  *final *ModalWindow modal1;
  add(modal1 = *new *ModalWindow(modal1));

  modal1.setPageMapName(modal-1);
  modal1.setCookieName(modal-1);
  modal1.setPageCreator(*new *ModalWindow.PageCreator()
  {
  *public *Page createPage()
  {
  *return new *ModalPage1(Modal.this, modal1);
  }
  });

  add(*new *AjaxLink(showModal1)
  {
  *public **void *onClick(AjaxRequestTarget target)
  {
  modal1.show(target);
  }
  });

 }

 *public class *ModalPage1 *extends *WebPage{
  *public *ModalPage1(Modal modal,ModalWindow modalwindow){

     public void setData(String data) {

     }
  }
 }

 My question is how can I call the function setData, if I have the modal1.

 Thanks
 Anna


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



Re: [Migration 1.5] Where has the CompressedResourceReference gone?

2011-09-02 Thread Ernesto Reinaldo Barreiro
You mean Mike or Martin? I know Martin is commiter since the official
announcement...  and also because of the many commit messages he
produces every day...

Cheers,

Ernesto

On Fri, Sep 2, 2011 at 5:23 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 he is a committer

 -igor


 On Fri, Sep 2, 2011 at 4:54 AM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
 I guess so... but maybe a commiter can confirm is that's correct.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:20 PM, Mike Mander wicket-m...@gmx.de wrote:
 Am 02.09.2011 13:15, schrieb Ernesto Reinaldo Barreiro:

 I think I remember I saw I commit message telling the feature was
 dropped... but I might be wrong.

 Best,

 Ernesto

 On Fri, Sep 2, 2011 at 1:05 PM, Mike Manderwicket-m...@gmx.de  wrote:

 In migration guide it says
 org.apache.wicket.markup.html.resources.CompressedResourceReference
 org.apache.wicket.request.resource.CompressedResourceReference

 But i can't import it. Do i have to include another wicket library?

 Thanks
 Mike

 -
 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


 So i have to use a normal ref?

 Thanks
 Mike

 -
 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: Javascript does not detect components loaded upon panel replacement

2011-09-02 Thread martin . asenov



Thanks, fixed it. 


- Цитат от Igor Vaynberg (igor.vaynb...@gmail.com), на
02.09.2011 в 18:20 -   google jquery live


-igor


On Fri, Sep 2, 2011 at 2:02 AM,  wrote:


Hello guys,


I've got the following issue. I have a main page that declares in its
markup . Once I replace an existing panel with another one, some JQuery
within the file scripts.js cannot detect markup that come with the new
panel and therefore does not call them. It acts just like that markup is
not present in DOM.


Would you please assist?


Thanks,
Martin


-
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov



Hello, guys, 


I'm experiencing some very strange problem - an AjaxButton's onSubmit never
gets called. 


Here are snippets of what I have: 


HTML: 


... some fields...


in code: 


Form form = new Form(form); 


AjaxButton submitButton = new AjaxButton(submit) { 


public void onSubmit(ART target, Form form) { 


System.out.println(clicked); // never printed


... some logic ...  


} 


}; 


form.add(submitButton); 


add(form); 


The above statement and logic are never reached.
The Ajax debugger prints nothing. 


Any help is appreciated. 


Thanks,
Martin 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov
 


Hello, guys, 


I'm experiencing some very strange problem - an AjaxButton's onSubmit never
gets called. 


Here are snippets of what I have: 


HTML: 


... some fields...


in code: 


Form form = new Form(form); 


AjaxButton submitButton = new AjaxButton(submit) { 


public void onSubmit(ART target, Form form) { 


System.out.println(clicked); // never printed


... some logic ...  


} 


}; 


form.add(submitButton); 


add(form); 


The above statement and logic are never reached.
The Ajax debugger prints nothing. 


Any help is appreciated. 


Thanks,
Martin  

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

RE: Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov
Sorry, HTML is:

form wicket:id=form

... some fields...

input type=submit wicket:id=submit class=some_class /

/form




- Цитат от martin.ase...@mail.bg, на 02.09.2011 в 18:50 -



Hello, guys, 


I'm experiencing some very strange problem - an AjaxButton's onSubmit never
gets called. 


Here are snippets of what I have: 


HTML: 


... some fields...


in code: 


Form form = new Form(form); 


AjaxButton submitButton = new AjaxButton(submit) { 


public void onSubmit(ART target, Form form) { 


System.out.println(clicked); // never printed


... some logic ... 


} 


}; 


form.add(submitButton); 


add(form); 


The above statement and logic are never reached.
The Ajax debugger prints nothing. 


Any help is appreciated. 


Thanks,
Martin 

-



-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Re: Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread Ernesto Reinaldo Barreiro
maybe you have validation errors and in that case onError will be
called instead.

Regards,

Ernesto

On Fri, Sep 2, 2011 at 5:50 PM,  martin.ase...@mail.bg wrote:



 Hello, guys,


 I'm experiencing some very strange problem - an AjaxButton's onSubmit never
 gets called.


 Here are snippets of what I have:


 HTML:


 ... some fields...


 in code:


 Form form = new Form(form);


 AjaxButton submitButton = new AjaxButton(submit) {


 public void onSubmit(ART target, Form form) {


 System.out.println(clicked); // never printed


 ... some logic ...


 }


 };


 form.add(submitButton);


 add(form);


 The above statement and logic are never reached.
 The Ajax debugger prints nothing.


 Any help is appreciated.


 Thanks,
 Martin

 -
 Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския 
 пазар - 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна 
 версия, SMS известяване и други.

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



Re: Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov



Thanks, this is the case. 


However, I've no idea why the form does validation, since I have no
required fields in it, nor have specified any validator. 


Best regards,
Martin  


- Цитат от Ernesto Reinaldo Barreiro (reier...@gmail.com), на
02.09.2011 в 18:55 -   maybe you have validation errors and in that
case onError will be
called instead.


Regards,


Ernesto


On Fri, Sep 2, 2011 at 5:50 PM,  wrote:


Hello, guys,


I'm experiencing some very strange problem - an AjaxButton's onSubmit
never
gets called.


Here are snippets of what I have:


HTML:


... some fields...


in code:


Form form = new Form(form);


AjaxButton submitButton = new AjaxButton(submit) {


public void onSubmit(ART target, Form form) {


System.out.println(clicked); // never printed


... some logic ...


}


};


form.add(submitButton);


add(form);


The above statement and logic are never reached.
The Ajax debugger prints nothing.


Any help is appreciated.


Thanks,
Martin


-
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Lazy loading exception despite of OpenSessionInViewFilter and object loading within a request

2011-09-02 Thread Florian B.
Hi

I've got some issues with the OpenSessionInViewFilter I integrated into a
Wicket application to get rid of the LazyLoadingException problem. 

So my problem is. I got a login page with a SignInPanel. When a user tries
to log into the web site his credentials are passed to the authentication()
method of a Session class which extends AuthenticatedWebSession. In this
method a AuthenticationService tries to load the user form the database,
when it succeeds the user is stored in the session. The method in the
AuthenticationService class which loads the user is annotated with
@Transactional. After the user is loaded procession of the request goes on.
During this getRoles() of the session class is called to check the user's
rights. Therefore getRoles() gets called on the user which was stored in the
session before. getRoles() should normally lazy loads the roles of the user
but unfortunately a LazyLoadingException is thrown. 

This behavior is really strange as I thought the OpenSessionInViewFilter
takes care that all requests to the database within on web request use the
same session. 

To examine this issue further I activate logging on the
OpenSessionInViewFilter. This shows me that the session is opened and closed
multiple times by the OpenSessionInViewFilter during the request. 

It is normal that the session got opened and closed multiple times by the
OpenSessionInViewFilter during a request? 

Does any one has an idea why this happens and how to fix this?

*My web.xml *

/?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
version=2.5
display-nameStoreFinder/display-name
context-param
param-namecontextConfigLocation/param-name
param-valueclasspath:/applicationContext.xml/param-value
/context-param
listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener

filter
filter-namewicket.web/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name

param-valuecom.appandmore.storefinder.backend.core.web.StoreFinderApplication/param-value
/init-param
init-param
param-nameconfiguration/param-name

param-valuedevelopment/param-value
/init-param
/filter
filter
filter-namewicket.session/filter-name

filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class
init-param
param-namefilterName/param-name
param-valuewicket.web/param-value
/init-param
/filter
filter
filter-nameopen.hibernate.session.in.view/filter-name

filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
init-param
param-namesessionFactoryBeanName/param-name
param-valuesessionFactory/param-value
/init-param
/filter


filter-mapping
filter-nameopen.hibernate.session.in.view/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-namewicket.web/filter-name
url-pattern/*/url-pattern
/filter-mapping
/web-app
/


*My applicationContext.xml*
/
?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xmlns:tx=http://www.springframework.org/schema/tx;
   xsi:schemaLocation=
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd;


bean id=propertyConfigurer
class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
property name=locations
list
valueclasspath:application.properties/value

/list
/property
property name=ignoreResourceNotFound value=true/
/bean
   
   bean id=authenticationService
class=com.appandmore.storefinder.backend.core.service.security.AuthenticationServiceImpl
constructor-arg ref=userDao/
/bean

bean id=offerDao
class=com.appandmore.storefinder.backend.core.infrastructure.hibernate.OfferDaoImpl
property name=sessionFactory ref=sessionFactory/
/bean
bean id=userDao

Re: How my perfs are good

2011-09-02 Thread coincoinfou
I have profiled.
It seems that the way the page is built. Mostly in listview, I need labels.
These labels are not DetachableModels or whatever because another framework
loads that on the fly.
For 50 labels, I get 50 request of 1 second each. It shouldn't be like this
for two strings..
I'm not sure but I guess there is another problem. Wicket serialize the
thingummyjig, invok method,
another framework intercepts method, serializing and invoking it...
It seems to me that, there's too much of serialization there

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-my-perfs-are-good-tp3779825p3786814.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: Lazy loading exception despite of OpenSessionInViewFilter and object loading within a request

2011-09-02 Thread Sven Meier
Hi,

there are multiple requests going on probably (e.g. because of redirects),

You should put a breakpoint into WicketFilter to debug the requests.

HTH
Sven

On 09/02/2011 08:03 PM, Florian B. wrote:
 Hi
 
 I've got some issues with the OpenSessionInViewFilter I integrated into a
 Wicket application to get rid of the LazyLoadingException problem. 
 
 So my problem is. I got a login page with a SignInPanel. When a user tries
 to log into the web site his credentials are passed to the authentication()
 method of a Session class which extends AuthenticatedWebSession. In this
 method a AuthenticationService tries to load the user form the database,
 when it succeeds the user is stored in the session. The method in the
 AuthenticationService class which loads the user is annotated with
 @Transactional. After the user is loaded procession of the request goes on.
 During this getRoles() of the session class is called to check the user's
 rights. Therefore getRoles() gets called on the user which was stored in the
 session before. getRoles() should normally lazy loads the roles of the user
 but unfortunately a LazyLoadingException is thrown. 
 
 This behavior is really strange as I thought the OpenSessionInViewFilter
 takes care that all requests to the database within on web request use the
 same session. 
 
 To examine this issue further I activate logging on the
 OpenSessionInViewFilter. This shows me that the session is opened and closed
 multiple times by the OpenSessionInViewFilter during the request. 
 
 It is normal that the session got opened and closed multiple times by the
 OpenSessionInViewFilter during a request? 
 
 Does any one has an idea why this happens and how to fix this?
 
 *My web.xml *
 
 /?xml version=1.0 encoding=ISO-8859-1?
 web-app xmlns=http://java.sun.com/xml/ns/javaee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
   version=2.5
   display-nameStoreFinder/display-name
   context-param
   param-namecontextConfigLocation/param-name
   param-valueclasspath:/applicationContext.xml/param-value
   /context-param
   listener
   
 listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
   /listener
   
   filter
   filter-namewicket.web/filter-name
   
 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
   init-param
   param-nameapplicationClassName/param-name
   
 param-valuecom.appandmore.storefinder.backend.core.web.StoreFinderApplication/param-value
   /init-param
   init-param
   param-nameconfiguration/param-name
   
   param-valuedevelopment/param-value
   /init-param
   /filter
   filter
   filter-namewicket.session/filter-name
   
 filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class
   init-param
   param-namefilterName/param-name
   param-valuewicket.web/param-value
   /init-param
   /filter
   filter
   filter-nameopen.hibernate.session.in.view/filter-name
   
 filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
   init-param
   param-namesessionFactoryBeanName/param-name
   param-valuesessionFactory/param-value
   /init-param
   /filter
   
   
   filter-mapping
   filter-nameopen.hibernate.session.in.view/filter-name
   url-pattern/*/url-pattern
   /filter-mapping
   filter-mapping
   filter-namewicket.web/filter-name
   url-pattern/*/url-pattern
   /filter-mapping
 /web-app
 /
 
 
 *My applicationContext.xml*
 /
 ?xml version=1.0 encoding=UTF-8?
 beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:tx=http://www.springframework.org/schema/tx;
xsi:schemaLocation=
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 http://www.springframework.org/schema/tx
 http://www.springframework.org/schema/tx/spring-tx-2.5.xsd;
 
 
 bean id=propertyConfigurer
 class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
 property name=locations
 list
 valueclasspath:application.properties/value
 
 /list
 /property
 property name=ignoreResourceNotFound value=true/
 /bean

bean id=authenticationService
 class=com.appandmore.storefinder.backend.core.service.security.AuthenticationServiceImpl
 constructor-arg ref=userDao/

Re: How my perfs are good

2011-09-02 Thread Igor Vaynberg
On Fri, Sep 2, 2011 at 11:39 AM, coincoinfou olivierandr...@gmail.com wrote:
 I have profiled.
 It seems that the way the page is built. Mostly in listview, I need labels.
 These labels are not DetachableModels or whatever because another framework
 loads that on the fly.
 For 50 labels, I get 50 request of 1 second each. It shouldn't be like this
 for two strings..

well, that is part of your code, has nothing to do with wicket.
optimize how you are calling that other framework, maybe add a batch
call.

 I'm not sure but I guess there is another problem. Wicket serialize the
 thingummyjig, invok method,
 another framework intercepts method, serializing and invoking it...
 It seems to me that, there's too much of serialization there

what other framework intercepts it? a way to minimize serialization is
to use detachable models...

-igor



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-my-perfs-are-good-tp3779825p3786814.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



1.5: How to get Page instance from RequestCycle in IRequestCycleListener

2011-09-02 Thread bht
Hi,

in 1.4, I could get the last page instance with
WebRequestCycle#getResponsePage()


In 1.5, I cannot find org.apache.wicket.Page instances, only
IRequestablePage, and this indirectly via
(RenderPageRequestHandler)getActiveRequestHandler()

Any help is appreciated.

Kind Regards,

Bernard

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