Alternatives for Page.componentChanged(Component, MarkupContainer) - Wicket 6.5.0

2013-06-20 Thread iamrakesh
Hi,

In Wicket 1.4.x org.apache.wicket.Page.componentChanged(Component,
MarkupContainer) is called every time a component gets changed, it seems it
is not being called anymore in wicket 6.5.0.

Is there any alternative for this method?
Is there any way to listen for event when a component is
add/changed/removed/repalced to/from a page?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Alternatives-for-Page-componentChanged-Component-MarkupContainer-Wicket-6-5-0-tp4659644.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



CryptoMapper not encoding query string - Wicket 6.5.0

2013-06-20 Thread iamrakesh
Hi,

I am using Wicket 6.5.0 and I am trying to use CryptoMapper in my
application and URLs in my application look something like the one given
below

http://localhost:8080/myTest/?wicket:interface=:2:contentPanel:layout:entryPanel:layoutButtonPanel:actionButtonTitleHolder:actionButton::ILinkListener::

These URLs are not encoded and when I check the CryptoMapper implementation
it checks for segment count and encodes only segments. I remember in 1.5.x
version it also used to check if query string is empty along with segments
empty to decide not to encode, some thing like below

if ((url.getSegments().isEmpty() && url.getQueryParameters().isEmpty())) {
return url; }

but in the v6.5.0 it is like

if (url.getSegments().isEmpty()) { return url; }

was there any reason to change the implementation?
If I've to encode my URLs like the sample given above, how can I do it?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-not-encoding-query-string-Wicket-6-5-0-tp4659643.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: Ajax form submit and Tomcat maxPostSize/connectionTimeout

2013-06-20 Thread Paul BorČ™
Blank form prob means empty model objects.

Start Wicket in DEVELOPMENT mode:
https://cwiki.apache.org/WICKET/faqs.html#FAQs-Myapplicationsays%2522DEVELOPMENTMODE%2522%252ChowdoIswitchtoproduction%253F

Add the  DebugBar to your page:
http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/devutils/debugbar/DebugBar.html

Then analyze the output in the AjaxConsole (lower right corner of your screen).
You should see all the AJAX replies from the server to your browser.

You can also use breakpoints and figure out what's going on in your Java code 
on the server side.

Read up on Wicket and AJAX in chapter 16 of the Wicket Free Guide at:
http://wicket.apache.org/learn/books/

Have a great day,
Paul Bors

On Jun 20, 2013, at 4:54 PM, Paul Bors  wrote:

> Stack trace?
> 
> -Original Message-
> From: Marios Skounakis [mailto:msc...@gmail.com] 
> Sent: Thursday, June 20, 2013 4:12 PM
> To: users@wicket.apache.org
> Subject: Ajax form submit and Tomcat maxPostSize/connectionTimeout
> 
> Hi all,
> 
> I have the following problem:
> - User submits form with lots of textareas via ajax
> - User gets a blank page
> 
> I think (but I'm not quite sure yet) this happens when the textareas contain
> so much text that either maxPostSize or connectionTimeout (submit tries to
> store to db as well) are exceeded.
> 
> The weird thing is that there is no exception. The form comes back after the
> ajax request with blank components.
> 
> Has anyone else seen this behavior? Why is there no exception?
> 
> Thanks
> Marios
> 


RE: Ajax form submit and Tomcat maxPostSize/connectionTimeout

2013-06-20 Thread Paul Bors
Stack trace?

-Original Message-
From: Marios Skounakis [mailto:msc...@gmail.com] 
Sent: Thursday, June 20, 2013 4:12 PM
To: users@wicket.apache.org
Subject: Ajax form submit and Tomcat maxPostSize/connectionTimeout

Hi all,

I have the following problem:
- User submits form with lots of textareas via ajax
- User gets a blank page

I think (but I'm not quite sure yet) this happens when the textareas contain
so much text that either maxPostSize or connectionTimeout (submit tries to
store to db as well) are exceeded.

The weird thing is that there is no exception. The form comes back after the
ajax request with blank components.

Has anyone else seen this behavior? Why is there no exception?

Thanks
Marios


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



Re: AjaxChannel Queues

2013-06-20 Thread Jered Myers

Thanks!

On 06/20/2013 01:08 PM, Sven Meier wrote:

The Javascript in the response is evaluated as part of the ajax call.

>I need to know if the finishButtonWork function call would happen 
before or after the AjaxChannel releases the next ajax request from 
queue.


Before.

Sven

On 06/20/2013 07:48 PM, Jered Myers wrote:
I am having a few challenges with the AjaxChannel queuing up and 
interfering with actions a user is making while in ajax requests are 
in queue.  When my AbstractDefaultAjaxBehavior hits its respond 
method, it adds a JavaScript call to the target. Does that JavaScript 
get executed before the next ajax request is release from the 
AjaxChannel queue?


In my example below, the user would be clicking the button fast 
enough to queue the AjaxChannel.  I need to know if the 
finishButtonWork function call would happen before or after the 
AjaxChannel releases the next ajax request from queue.


// HTML


// JavaScript
callbackForBehavior = function() {
  Wicket.Ajax.ajax({blah});
}
getButtonDetails = function() {
...
return buttonDetailsJSON;
}
finishButtonWork = function(json) {

}

// Java AbstractDefaultAjaxBehavior
protected void updateAjaxAttributes(AjaxRequestAttributes attribs){
super.updateAjaxAttributes(attribs);

// Call the function that sets up the parameters to pass back 
to the server.
attribs.getDynamicExtraParameters().add("return 
getButtonDetails();");

}
protected void respond(AjaxRequestTarget target) {
...
target.appendJavaScript("finishButtonWork(" + resultJSON + ");");
}




-
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



Ajax form submit and Tomcat maxPostSize/connectionTimeout

2013-06-20 Thread Marios Skounakis
Hi all,

I have the following problem:
- User submits form with lots of textareas via ajax
- User gets a blank page

I think (but I'm not quite sure yet) this happens when the textareas
contain so much text that either maxPostSize or connectionTimeout (submit
tries to store to db as well) are exceeded.

The weird thing is that there is no exception. The form comes back after
the ajax request with blank components.

Has anyone else seen this behavior? Why is there no exception?

Thanks
Marios


Re: AjaxChannel Queues

2013-06-20 Thread Sven Meier

The Javascript in the response is evaluated as part of the ajax call.

>I need to know if the finishButtonWork function call would happen 
before or after the AjaxChannel releases the next ajax request from queue.


Before.

Sven

On 06/20/2013 07:48 PM, Jered Myers wrote:
I am having a few challenges with the AjaxChannel queuing up and 
interfering with actions a user is making while in ajax requests are 
in queue.  When my AbstractDefaultAjaxBehavior hits its respond 
method, it adds a JavaScript call to the target. Does that JavaScript 
get executed before the next ajax request is release from the 
AjaxChannel queue?


In my example below, the user would be clicking the button fast enough 
to queue the AjaxChannel.  I need to know if the finishButtonWork 
function call would happen before or after the AjaxChannel releases 
the next ajax request from queue.


// HTML


// JavaScript
callbackForBehavior = function() {
  Wicket.Ajax.ajax({blah});
}
getButtonDetails = function() {
...
return buttonDetailsJSON;
}
finishButtonWork = function(json) {

}

// Java AbstractDefaultAjaxBehavior
protected void updateAjaxAttributes(AjaxRequestAttributes attribs){
super.updateAjaxAttributes(attribs);

// Call the function that sets up the parameters to pass back 
to the server.
attribs.getDynamicExtraParameters().add("return 
getButtonDetails();");

}
protected void respond(AjaxRequestTarget target) {
...
target.appendJavaScript("finishButtonWork(" + resultJSON + ");");
}




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



How to prevent a page from being marked as dirty ?

2013-06-20 Thread grazia
Is there an example of how to prevent that a page is marked as dirty ?
 how to use WebPage.dirty(isInitialization) ..





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-a-page-from-being-marked-as-dirty-tp4659636.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



AjaxChannel Queues

2013-06-20 Thread Jered Myers
I am having a few challenges with the AjaxChannel queuing up and 
interfering with actions a user is making while in ajax requests are in 
queue.  When my AbstractDefaultAjaxBehavior hits its respond method, it 
adds a JavaScript call to the target.  Does that JavaScript get executed 
before the next ajax request is release from the AjaxChannel queue?


In my example below, the user would be clicking the button fast enough 
to queue the AjaxChannel.  I need to know if the finishButtonWork 
function call would happen before or after the AjaxChannel releases the 
next ajax request from queue.


// HTML


// JavaScript
callbackForBehavior = function() {
  Wicket.Ajax.ajax({blah});
}
getButtonDetails = function() {
...
return buttonDetailsJSON;
}
finishButtonWork = function(json) {

}

// Java AbstractDefaultAjaxBehavior
protected void updateAjaxAttributes(AjaxRequestAttributes attribs){
super.updateAjaxAttributes(attribs);

// Call the function that sets up the parameters to pass back 
to the server.
attribs.getDynamicExtraParameters().add("return 
getButtonDetails();");

}
protected void respond(AjaxRequestTarget target) {
...
target.appendJavaScript("finishButtonWork(" + resultJSON + ");");
}

--
Jered Myers



Re: setResponsePage

2013-06-20 Thread Martin Grigorov
On Thu, Jun 20, 2013 at 10:02 AM, Colin Rogers <
colin.rog...@objectconsulting.com.au> wrote:

> Martin,
>
> I do a lot of generic stuff within my code - developing common components,
> that dynamically determine a page based on variable criteria. Those pages
> then need to be initialised - using reflection - and have data and state
> set on them. And I also do a 'panel switching' thing - similar to Facebook
> - where only the parts of a page that need updating get updated, but the
> app pushes the 'bookmarkable' part to the browser so the page can still
> bookmarked, hit in browser history and refreshed, as per normal page. For
> that I need to create a page - using reflection - and effectively steal the
> parts of the new page that require updating, add that to the current page
> and update those elements via Ajax.
>
> Ultimately, PageProvider is a really nice way of simply selecting a page
> of type X, and not having to call getConstructor() - with or without
> PageParameters - then new instance and having tons of checked exceptions
> being caught all over my code. It's a nice way of passing around the
> combinations of Class, or Class and PageParameters, or a page instance - in
> a generic way.
>

You can use IPageFactory for to create page instance from class (+page
parameters).
See org.apache.wicket.Application#getPageFactory().


>
> I see your point tho - I'm effectively using a Class for something it's
> not designed for and you shouldn't have to cater for my quirky use of it.
> Having said that, I could easily create my own version - that does that any
> more, and be lighter weight... :)
>
> Although... #setResponsePage could at least take a IRequestablePage, no? :)
>

Yes. org.apache.wicket.request.cycle.RequestCycle#setResponsePage() already
works with IRequestablePage. I don't see why Component#setResponsePage()
still requires Page.
This will be improved only in Wicket 7.


>
> Cheers,
> Col.
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: 20 June 2013 16:39
> To: users@wicket.apache.org
> Subject: Re: setResponsePage
>
> Hi,
>
> PageProvider is more an internal API. There is a ticket that it is complex
> and needs some kind of simplification.
> I don't want to expose it more to the user APIs.
> How exactly you find it more convenient than the current
> #setResponsePage() versions ?
> It has constructors that accept renderCount and pageId, but those are
> usually extracted from the request url. In your code you should not deal
> with them.
>
>
> On Thu, Jun 20, 2013 at 4:55 AM, Colin Rogers <
> colin.rog...@objectconsulting.com.au> wrote:
>
> > Wicketeers,
> >
> > Super-minor API thing...
> >
> > I've started using PageProvider class within our frameworks, as it's a
> > really convenient class for detailing pages, etc. and avoid having to
> > use Reflection directly.
> >
> > With this in mind, would it be possible to overload
> > Component#setResponsePage that takes a PageProvider or IPageProvider?
> >
> > Cheers,
> > Col.
> > EMAIL DISCLAIMER This email message and its attachments are
> > confidential and may also contain copyright or privileged material. If
> > you are not the intended recipient, you may not forward the email or
> > disclose or use the information contained in it. If you have received
> > this email message in error, please advise the sender immediately by
> > replying to this email and delete the message and any associated
> > attachments. Any views, opinions, conclusions, advice or statements
> > expressed in this email message are those of the individual sender and
> > should not be relied upon as the considered view, opinion,
> > conclusions, advice or statement of this company except where the
> > sender expressly, and with authority, states them to be the considered
> view, opinion, conclusions, advice or statement of this company.
> > Every care is taken but we recommend that you scan any attachments for
> > viruses.
> >
> EMAIL DISCLAIMER This email message and its attachments are confidential
> and may also contain copyright or privileged material. If you are not the
> intended recipient, you may not forward the email or disclose or use the
> information contained in it. If you have received this email message in
> error, please advise the sender immediately by replying to this email and
> delete the message and any associated attachments. Any views, opinions,
> conclusions, advice or statements expressed in this email message are those
> of the individual sender and should not be relied upon as the considered
> view, opinion, conclusions, advice or statement of this company except
> where the sender expressly, and with authority, states them to be the
> considered view, opinion, conclusions, advice or statement of this company.
> Every care is taken but we recommend that you scan any attachments for
> viruses.
>
> -
> To unsubscribe, e-mail: users-unsubs

RE: setResponsePage

2013-06-20 Thread Colin Rogers
Martin,

I do a lot of generic stuff within my code - developing common components, that 
dynamically determine a page based on variable criteria. Those pages then need 
to be initialised - using reflection - and have data and state set on them. And 
I also do a 'panel switching' thing - similar to Facebook - where only the 
parts of a page that need updating get updated, but the app pushes the 
'bookmarkable' part to the browser so the page can still bookmarked, hit in 
browser history and refreshed, as per normal page. For that I need to create a 
page - using reflection - and effectively steal the parts of the new page that 
require updating, add that to the current page and update those elements via 
Ajax.

Ultimately, PageProvider is a really nice way of simply selecting a page of 
type X, and not having to call getConstructor() - with or without 
PageParameters - then new instance and having tons of checked exceptions being 
caught all over my code. It's a nice way of passing around the combinations of 
Class, or Class and PageParameters, or a page instance - in a generic way.

I see your point tho - I'm effectively using a Class for something it's not 
designed for and you shouldn't have to cater for my quirky use of it. Having 
said that, I could easily create my own version - that does that any more, and 
be lighter weight... :)

Although... #setResponsePage could at least take a IRequestablePage, no? :)

Cheers,
Col.

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: 20 June 2013 16:39
To: users@wicket.apache.org
Subject: Re: setResponsePage

Hi,

PageProvider is more an internal API. There is a ticket that it is complex and 
needs some kind of simplification.
I don't want to expose it more to the user APIs.
How exactly you find it more convenient than the current #setResponsePage() 
versions ?
It has constructors that accept renderCount and pageId, but those are usually 
extracted from the request url. In your code you should not deal with them.


On Thu, Jun 20, 2013 at 4:55 AM, Colin Rogers < 
colin.rog...@objectconsulting.com.au> wrote:

> Wicketeers,
>
> Super-minor API thing...
>
> I've started using PageProvider class within our frameworks, as it's a
> really convenient class for detailing pages, etc. and avoid having to
> use Reflection directly.
>
> With this in mind, would it be possible to overload
> Component#setResponsePage that takes a PageProvider or IPageProvider?
>
> Cheers,
> Col.
> EMAIL DISCLAIMER This email message and its attachments are
> confidential and may also contain copyright or privileged material. If
> you are not the intended recipient, you may not forward the email or
> disclose or use the information contained in it. If you have received
> this email message in error, please advise the sender immediately by
> replying to this email and delete the message and any associated
> attachments. Any views, opinions, conclusions, advice or statements
> expressed in this email message are those of the individual sender and
> should not be relied upon as the considered view, opinion,
> conclusions, advice or statement of this company except where the
> sender expressly, and with authority, states them to be the considered view, 
> opinion, conclusions, advice or statement of this company.
> Every care is taken but we recommend that you scan any attachments for
> viruses.
>
EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

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