Re: Google AppEngine Initializer and Wicket 6?

2015-05-11 Thread Martin Grigorov
Hi,

This is the way wicketstuff-gae-initializer works since its day 1.
Branch 1.5.x also uses IInitializer:
https://github.com/wicketstuff/core/blob/7c2a78df17674b3eff9503a8d3afae2fa8622176/jdk-1.5-parent/gae-initializer-parent/gae-initializer/src/main/resources/wicket.properties
AFAIK there were no changes in this module for a very long time:
-
https://github.com/wicketstuff/core/commits/master/jdk-1.7-parent/gae-initializer-parent
-
https://github.com/wicketstuff/core/commits/wicket-6.x/jdk-1.6-parent/gae-initializer-parent

Any errors in the logs?

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, May 11, 2015 at 11:44 PM, Christopher Merrill <
ch...@webperformance.com> wrote:

> (Is this the right place for this question? Should I raise an issue on
> WicketStuff instead?)
>
>
> Curious to see if anyone is doing this and what your level of success is?
>
> I ask because we have a Wicket/GAE app that we recently moved up to Wicket
> 6 and we're experiencing a lot of spontaneous problems that are kinda hard
> to explain and hard to reproduce.
>
> Examples:
> 1. Clicking a simple link (sometimes) returns to the same page, rather than
> following the link with a very basic implementation such as:
> Link.onClick(): setResponsePage(((BaseApplication)
> getApplication()).getSignInPageClass());
> When this happens, it happens consistently (i.e. I click the same link and
> the same thing happens), but if I reopen the browser, login and try again,
> it works fine.
> 2. Changes applied to the Model<> objects in an AjaxButton.onSubmit()
> method have been lost when the page form is submitted.
> 3. Clicking a form submit button (which was enabled in an
> AjaxEventBehavior("onKeyUp").onEvent() method) complains it is not enabled
> when it is clicked. It was visually disabled when the page loaded and was
> visually enabled with the right things triggered the Ajax behavior
> referenced above.
>
> All of these functions in the app that broke have been working for years.
>
> We are using Google AppEngine Initializer from WicketStuff (6.19 with
> Wicket 6.19).
> I noticed the docs for GAE Initializer now say "Just put
> wicketstuff-gae-initializer.jar in the classpath and Wicket will use it
> automatically."
>
> I feel like that wasn't the process back when we started using it - we have
> some classes that override Wicket operations with WicketStuff GAE classes -
> could this be the problem? As an example, we have a GaeWicketApplication
> class that extends Application and implements GaeApplication to do things
> like change the RuntimeConfigurationType, override the eviction strategy
> and return a different IExceptionMapper provider. Should I back out some of
> those behaviors to see if the GAE Initializer will handle it all without
> any special code?
>
>
> TIA!
> Chris
>


Re: measure time user stays on page

2015-05-11 Thread Chris
Hi all,

thanks for your suggestions!

@Martin, even when I override the setHeaders method, Safari seems to ignore the 
settings „disableCaching“.

@Override
protected void setHeaders(WebResponse response) {
super.setHeaders(response);
response.disableCaching();
}

br Chris

> Am 11.05.2015 um 20:59 schrieb Marcel Barbosa Pinto :
> 
> You  can create a pixel image and compare a session time on the server..
> Most likely the solution used by Google Analytics...
> Em 11/05/2015 13:38, "Christoph Läubrich"  escreveu:
> 
>> If you are really eager to do so (in fact this is some kind of user
>> tracking that might be problematic as well as you users might try to block
>> it ...) you can fire an AJAX call in the domReady and one in the close
>> callback or when clicking a link. In fact you can only GUESS the time a
>> user stays on page...
>> 
>> Am 11.05.2015 16:51, schrieb Chris:
>> 
>>> Hi Martin,
>>> 
>>> Safari by default has turned cache on and therefore when clicking
>>> browser-back the page is loaded from the browser’s cache.
>>> Is there a way to circumvent this issue so that I can measure the time
>>> users spent on a current page somehow?
>>> 
>>> best regards, Chris
>>> 
>>> 
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 



Google AppEngine Initializer and Wicket 6?

2015-05-11 Thread Christopher Merrill
(Is this the right place for this question? Should I raise an issue on
WicketStuff instead?)


Curious to see if anyone is doing this and what your level of success is?

I ask because we have a Wicket/GAE app that we recently moved up to Wicket
6 and we're experiencing a lot of spontaneous problems that are kinda hard
to explain and hard to reproduce.

Examples:
1. Clicking a simple link (sometimes) returns to the same page, rather than
following the link with a very basic implementation such as:
Link.onClick(): setResponsePage(((BaseApplication)
getApplication()).getSignInPageClass());
When this happens, it happens consistently (i.e. I click the same link and
the same thing happens), but if I reopen the browser, login and try again,
it works fine.
2. Changes applied to the Model<> objects in an AjaxButton.onSubmit()
method have been lost when the page form is submitted.
3. Clicking a form submit button (which was enabled in an
AjaxEventBehavior("onKeyUp").onEvent() method) complains it is not enabled
when it is clicked. It was visually disabled when the page loaded and was
visually enabled with the right things triggered the Ajax behavior
referenced above.

All of these functions in the app that broke have been working for years.

We are using Google AppEngine Initializer from WicketStuff (6.19 with
Wicket 6.19).
I noticed the docs for GAE Initializer now say "Just put
wicketstuff-gae-initializer.jar in the classpath and Wicket will use it
automatically."

I feel like that wasn't the process back when we started using it - we have
some classes that override Wicket operations with WicketStuff GAE classes -
could this be the problem? As an example, we have a GaeWicketApplication
class that extends Application and implements GaeApplication to do things
like change the RuntimeConfigurationType, override the eviction strategy
and return a different IExceptionMapper provider. Should I back out some of
those behaviors to see if the GAE Initializer will handle it all without
any special code?


TIA!
Chris


Re: measure time user stays on page

2015-05-11 Thread Marcel Barbosa Pinto
You  can create a pixel image and compare a session time on the server..
Most likely the solution used by Google Analytics...
Em 11/05/2015 13:38, "Christoph Läubrich"  escreveu:

> If you are really eager to do so (in fact this is some kind of user
> tracking that might be problematic as well as you users might try to block
> it ...) you can fire an AJAX call in the domReady and one in the close
> callback or when clicking a link. In fact you can only GUESS the time a
> user stays on page...
>
> Am 11.05.2015 16:51, schrieb Chris:
>
>> Hi Martin,
>>
>> Safari by default has turned cache on and therefore when clicking
>> browser-back the page is loaded from the browser’s cache.
>> Is there a way to circumvent this issue so that I can measure the time
>> users spent on a current page somehow?
>>
>> best regards, Chris
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: measure time user stays on page

2015-05-11 Thread Christoph Läubrich
If you are really eager to do so (in fact this is some kind of user 
tracking that might be problematic as well as you users might try to 
block it ...) you can fire an AJAX call in the domReady and one in the 
close callback or when clicking a link. In fact you can only GUESS the 
time a user stays on page...


Am 11.05.2015 16:51, schrieb Chris:

Hi Martin,

Safari by default has turned cache on and therefore when clicking browser-back 
the page is loaded from the browser’s cache.
Is there a way to circumvent this issue so that I can measure the time users 
spent on a current page somehow?

best regards, Chris

   



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



Re: measure time user stays on page

2015-05-11 Thread Martin Grigorov
https://github.com/apache/wicket/blob/32af2c8cc8985fc8a52f492d854dbf3206b7c243/wicket-core/src/main/java/org/apache/wicket/markup/html/WebPage.java#L206

Wicket pages by default send "do not cache me" response headers.
Safari should obey the rules.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, May 11, 2015 at 5:51 PM, Chris  wrote:

> Hi Martin,
>
> Safari by default has turned cache on and therefore when clicking
> browser-back the page is loaded from the browser’s cache.
> Is there a way to circumvent this issue so that I can measure the time
> users spent on a current page somehow?
>
> best regards, Chris
>
>
>
> > Am 11.05.2015 um 08:22 schrieb Martin Grigorov :
> >
> > Wicket pages are not cached by default.
> > Navigating back in the browser should make a request to the server and
> > execute the RENDER phase (onConfigure, onBeforeRender, onRender,
> > onAfterRender, onDetach).
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, May 11, 2015 at 12:23 AM, Marcel Barbosa Pinto <
> > marcel.po...@gmail.com> wrote:
> >
> >> Hmm, it can be a browser cache issue,  or the Wicket cache.. Try call
> the
> >> setVersioned(false)
> >> Em 10/05/2015 18:09, "Chris"  escreveu:
> >>
> >>> Thanks but the methods such as onBeforeRender seem not be called on
> >>> browser back.
> >>>
> >>> Chris
> >>>
> >>>
>  Am 10.05.2015 um 22:54 schrieb Marcel Barbosa Pinto <
> >>> marcel.po...@gmail.com>:
> 
>  You could override the onRender method that is executed every time the
> >>> page
>  is rendered on the browser.
>  Em 10/05/2015 17:43, "Chris"  escreveu:
> 
> > Hi all,
> >
> > I would like to measure the time the user stays at a certain page. I
> >>> would
> > do this by querying the system’s time when loading the page (in the
> >> page
> > constructor) and the system time when clicking on a link that refers
> >> the
> > user to the next page.
> > However, if the user hits the browser back button, the last version
> of
> >>> the
> > page is displayed without loading the page via its constructor.
> >
> > What would be the best solution to measure the time spent on a page?
> >
> > Thanks, Chris
> > -
> > 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: measure time user stays on page

2015-05-11 Thread Chris
Hi Martin,

Safari by default has turned cache on and therefore when clicking browser-back 
the page is loaded from the browser’s cache.
Is there a way to circumvent this issue so that I can measure the time users 
spent on a current page somehow?

best regards, Chris



> Am 11.05.2015 um 08:22 schrieb Martin Grigorov :
> 
> Wicket pages are not cached by default.
> Navigating back in the browser should make a request to the server and
> execute the RENDER phase (onConfigure, onBeforeRender, onRender,
> onAfterRender, onDetach).
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Mon, May 11, 2015 at 12:23 AM, Marcel Barbosa Pinto <
> marcel.po...@gmail.com> wrote:
> 
>> Hmm, it can be a browser cache issue,  or the Wicket cache.. Try call the
>> setVersioned(false)
>> Em 10/05/2015 18:09, "Chris"  escreveu:
>> 
>>> Thanks but the methods such as onBeforeRender seem not be called on
>>> browser back.
>>> 
>>> Chris
>>> 
>>> 
 Am 10.05.2015 um 22:54 schrieb Marcel Barbosa Pinto <
>>> marcel.po...@gmail.com>:
 
 You could override the onRender method that is executed every time the
>>> page
 is rendered on the browser.
 Em 10/05/2015 17:43, "Chris"  escreveu:
 
> Hi all,
> 
> I would like to measure the time the user stays at a certain page. I
>>> would
> do this by querying the system’s time when loading the page (in the
>> page
> constructor) and the system time when clicking on a link that refers
>> the
> user to the next page.
> However, if the user hits the browser back button, the last version of
>>> the
> page is displayed without loading the page via its constructor.
> 
> What would be the best solution to measure the time spent on a page?
> 
> Thanks, Chris
> -
> 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: Refreshing a repeater component via ajax

2015-05-11 Thread Ernesto Reinaldo Barreiro
If you use only this it would refer to the anonymous AjaxFallbackLink

On Mon, May 11, 2015 at 1:33 PM, Andreas  wrote:

>
> Yes. it works, but what in the above *this* means? Is not it the same with
> next?
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Refreshing-a-repeater-component-via-ajax-tp4670710p4670714.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
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Re: Refreshing a repeater component via ajax

2015-05-11 Thread Andreas

Yes. it works, but what in the above *this* means? Is not it the same with
next?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Refreshing-a-repeater-component-via-ajax-tp4670710p4670714.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: Refreshing a repeater component via ajax

2015-05-11 Thread Ernesto Reinaldo Barreiro
Mind that your code gets removed once it arrives to the list: a known
limitation of using nabble. I mean


 public ShoppingCartPanel(String id, Cart cart) {

super(id);
this.cart=cart;

// make panel repaintable via AJAX.
setOutputMarkupId(true)

cartcomponent = new ListView("cart", new
PropertyModel>(this, "cart.cheeses")) {
@Override
protected void populateItem(ListItem item) {

Cheese cheese = item.getModelObject();

item.add(new Label("name", cheese.getName()));
item.add(new Label("price", "$" +cheese.getPrice()));

item.add(new AjaxFallbackLink("remove",
item.getModel()) {
@Override
public void onClick(AjaxRequestTarget target) {
Cheese selected = (Cheese) getModelObject();
getCart().getCheeses().remove(selected);
if(target!=null){
target.add(ShoppingCartPanel.this);
}
}
});
}
};
add(cartcomponent);


On Mon, May 11, 2015 at 12:48 PM, Andreas  wrote:

> Hi,
> actualy I resolve it using a component wrapper, but I'm interesting in what
> you realy suggest.
>
> > You might need to qualify this with a name: MyPanel.this and also make
> > sure
> > your panel call setOutputMarkupId(true)
>
> What is MyPanel?
> Maybe you mean *Panel.this*?
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Refreshing-a-repeater-component-via-ajax-tp4670710p4670712.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
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Re: Refreshing a repeater component via ajax

2015-05-11 Thread Andreas
Hi,
actualy I resolve it using a component wrapper, but I'm interesting in what
you realy suggest.

> You might need to qualify this with a name: MyPanel.this and also make
> sure
> your panel call setOutputMarkupId(true) 

What is MyPanel?
Maybe you mean *Panel.this*?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Refreshing-a-repeater-component-via-ajax-tp4670710p4670712.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: Refreshing a repeater component via ajax

2015-05-11 Thread Ernesto Reinaldo Barreiro
Hi,

On Mon, May 11, 2015 at 11:49 AM, Andreas  wrote:

> Can't refresh a repeater component after removing an item.
> Error:
> /Last cause: Component com.shop.ShoppingCartPanel$1 has been added to the
> target. This component is a repeater and cannot be repainted via ajax
> directly. Instead add its parent or another markup container higher in the
> hierarchy./
>
> Who is the parent for the cartcomponent? A *Panel*? But using
> *target.add(this)*; is also giving an error.
>

You might need to qualify this with a name: MyPanel.this and also make sure
your panel call setOutputMarkupId(true)

>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Refreshing-a-repeater-component-via-ajax-tp4670710.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
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Refreshing a repeater component via ajax

2015-05-11 Thread Andreas
Can't refresh a repeater component after removing an item.
Error:
/Last cause: Component com.shop.ShoppingCartPanel$1 has been added to the
target. This component is a repeater and cannot be repainted via ajax
directly. Instead add its parent or another markup container higher in the
hierarchy./

Who is the parent for the cartcomponent? A *Panel*? But using
*target.add(this)*; is also giving an error.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Refreshing-a-repeater-component-via-ajax-tp4670710.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