Re: Wicket 6: Using AutoCompleteBehavior with other behaviors

2013-01-21 Thread james yong
Hi Sven,

WICKET-4990 is for problem 1.
So I raised a jira issue for problem 2, together with its solution.
WICKET-4998.

Regards,
James


Sven Meier wrote
> Hi James,
> 
> please attach that info to WICKET-4990.
> 
> Thanks
> Sven
> 
> On 01/22/2013 07:07 AM, james yong wrote:
>> Hi,
>>
>> To rectify problem 2, I changed the following in wicket-autocomplete.js,
>>
>>
>> Wicket.Event.add(obj,"keypress",function(jqEvent){
>>  if(Wicket.Event.keyCode(jqEvent)===KEY_ENTER){
>>  if(selected>-1||hidingAutocomplete===1){
>>  hidingAutocomplete=0;
>> 
>> jqEvent.stopImmediatePropagation();
>> <--changed from jqEvent.stopPropagation();
>>  
>>
>> Regards,
>> James
>>
>>
>> james yong wrote
>>> Hi,
>>>
>>> Now migrating a working project from wicket version 1.4 to 6.4.
>>> I have a text field that uses the following behaviors:
>>> A.  AjaxFormComponentUpdatingBehavior("onchange");
>>> B.  AutoCompleteBehavior; and
>>> C.  AjaxFormComponentUpdatingBehavior("onkeypress").
>>>
>>> Say I enter an letter 'U' into the text field, and an auto-suggest list
>>> pops up.
>>>
>>> There are 2 problems which is not seen in wicket 1.4:
>>> 1) When I select an item (e.g. USD) from the auto-suggest list using a
>>> mouse, the onchange event from behavior A  is fired twice. The 1st
>>> onchange event is for 'U' and the 2nd onchange event is for 'USD'.
>>> Can I prevent the 1st onchange event from happening?
>>>
>>> 2) When I select an item (e.g. USD) from the auto-suggest list using the
>>> Enter keypress, an onkeypress event is fired by behavior C. Can I
>>> prevent
>>> this onkeypress event from happening?
>>>
>>> Regards,
>>> James
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655619.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: 

> users-unsubscribe@.apache

>> For additional commands, e-mail: 

> users-help@.apache

>>
> 
> 
> -
> To unsubscribe, e-mail: 

> users-unsubscribe@.apache

> For additional commands, e-mail: 

> users-help@.apache





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655626.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: Passing IModel in Constructor of bookmarkable Page?

2013-01-21 Thread Bernard
Hi Martin,

I now have second thoughts before replacing a page constructor having
an IModel parameter with the use of PageParameters which I need when
letting Wicket create the page. It can be a nightmare.

Passing IModel server side on page constructon has many advantages. We
get security because the model cannot be manipulated by the client. We
get type safety because we don't need to wrap the model's key(s) into
PageParameters. And we get brevity and convenience which is a Wicket
plus. Could it be that expecting ModalWindow to have the same instance
as the parent page has to be seen in a different light?

Please challenge me. I can't find at the moment any reference that
passing LDM in Page constructors is a bad thing. I always thought that
it is the Wicket way to exploit its statefulness.

Back to the original subject, I would need a bookmarkable page that I
can still pass an IModel to - either in a constructor or via a
callback.

So if the page is created from the bookmarkable URL and the page finds
that the session is expired then it cannot get the model from the
session but it can take corrective action. Otherwise we don't even
have a page because of the non-bookmarkable dilemma. This very
un-Wicket.

In other words, if in a stateful web framework, we fail to identify
the page class (not its identity - it is expired) - only because we
were passing parameters to it server side - then this is a big issue
that would be rewarding to address. The framwork is completely blind
wrt to state even though the user can see the full state on the
screen.

Should I open a Jira issue to address this?

Kind Regards,

Bernard

On Mon, 21 Jan 2013 10:05:57 +0200, you wrote:

>Hi,
>
>I think using Page#Page(IModel) constructor is not very useful. It appears
>to be anti-pattern lately.
>There were several tickets related to ModalWindow when a model is shared
>between the page that contains the modal and the page inside the modal. The
>two different pages are being serialized with different state of the model
>and after deserialization this model is no more the same instance anymore
>and the benefit of sharing a model is no more there.
>
>If you still want to go the way you want then check IPageFactory and its
>default impl - DefaultPageFactory.
>
>
>
>On Mon, Jan 21, 2013 at 3:45 AM, Bernard  wrote:
>
>> Hi all
>>
>> I am searching for a robust pattern to work around
>> PageExpiredException.
>>
>> My first idea was to have all pages bookmarkable and rely on
>>
>> org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
>> to recover.
>>
>> But this breaks when passing IModel in page constructors because then
>> pages are no longer bookmarkable.
>>
>> Of course avoiding the constructor and letting Wicket create the page
>> with PageParameters would solve this problem but I want to avoid this.
>>
>> It would be very useful to pass an IModel to a bookmarkable Page. How
>> can this be done?
>>
>> I am trying to avoid expiring logout links (the primary driver of all
>> this). In case of page expiry I can deal with the exceptional call of
>> the default constructor from
>> IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
>> a bookmarkable page.
>>
>> 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: Wicket 6.3 with WASP

2013-01-21 Thread Sven Meier

Just update your wicketstuff dependency to 6.3.0:

http://mvnrepository.com/artifact/org.wicketstuff/wicketstuff-security-wasp/6.3.0

Sven

On 01/21/2013 01:45 PM, BartBlackMagic wrote:

I use Wicket 6.3 and WASP to integrate security
(wicket-security-wasp-1.5-RC5.1.jar ).
When I deploy the WAR to tomcat, I get the message:
java.lang.NoSuchMethodError:
org.wicketstuff.security.log.IAuthorizationMessageSource.getMessage(Ljava/lang/String;)Ljava/lang/String;

org.wicketstuff.security.strategies.WaspAuthorizationStrategy.logMessage(WaspAuthorizationStrategy.java:278)

org.wicketstuff.security.strategies.WaspAuthorizationStrategy.logMessage(WaspAuthorizationStrategy.java:256)

org.wicketstuff.security.strategies.WaspAuthorizationStrategy.logMessage(WaspAuthorizationStrategy.java:224)

org.wicketstuff.security.swarm.strategies.AbstractSwarmStrategy.isClassAuthorized(AbstractSwarmStrategy.java:98)

org.wicketstuff.security.checks.LinkSecurityCheck.isActionAuthorized(LinkSecurityCheck.java:114)

This is normal because IAuthorizationMessageSource extends
IErrorMessageSource which has no method String getMessage(String key):
It only has the following signature in Wicket 6.3
public interface IErrorMessageSource
{
String getMessage(String key, Map vars);
}

In Wicket 1.5 it did have that extra method.
My question is, do I have to downgrade my Wicket version to use WASP? Or
will there be a renewed release of wicket-security-wasp?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-3-with-WASP-tp4655582.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



Re: OnChangeAjaxBehavior javadoc note

2013-01-21 Thread Sven Meier

What about OnChangeAjaxBehavior#EVENT_NAME's javadoc? Isn't that sufficient?

Sven

On 01/21/2013 08:53 PM, Ondrej Zizka wrote:

Hi all,

guessing from a name, I would expect these two to do the same:

link.add( new OnChangeAjaxBehavior() {
@Override protected void onUpdate( AjaxRequestTarget 
target ) {

ReleaseTraitRowPanel.this.onUpdate( target );
}
});

link.add( new AjaxFormComponentUpdatingBehavior("onchange"){
@Override protected void onUpdate( AjaxRequestTarget 
target ) {

ReleaseTraitRowPanel.this.onUpdate( target );
}
} );

However, the first one reacts (and sends AJAX request) on each keypress.
Could this info be added to the javadoc of OnChangeAjaxBehavior?

Thanks,
Ondra

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




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



Re: Wicket 6: Using AutoCompleteBehavior with other behaviors

2013-01-21 Thread Sven Meier

Hi James,

please attach that info to WICKET-4990.

Thanks
Sven

On 01/22/2013 07:07 AM, james yong wrote:

Hi,

To rectify problem 2, I changed the following in wicket-autocomplete.js,


Wicket.Event.add(obj,"keypress",function(jqEvent){
if(Wicket.Event.keyCode(jqEvent)===KEY_ENTER){
if(selected>-1||hidingAutocomplete===1){
hidingAutocomplete=0;
 jqEvent.stopImmediatePropagation();
<--changed from jqEvent.stopPropagation();


Regards,
James


james yong wrote

Hi,

Now migrating a working project from wicket version 1.4 to 6.4.
I have a text field that uses the following behaviors:
A.  AjaxFormComponentUpdatingBehavior("onchange");
B.  AutoCompleteBehavior; and
C.  AjaxFormComponentUpdatingBehavior("onkeypress").

Say I enter an letter 'U' into the text field, and an auto-suggest list
pops up.

There are 2 problems which is not seen in wicket 1.4:
1) When I select an item (e.g. USD) from the auto-suggest list using a
mouse, the onchange event from behavior A  is fired twice. The 1st
onchange event is for 'U' and the 2nd onchange event is for 'USD'.
Can I prevent the 1st onchange event from happening?

2) When I select an item (e.g. USD) from the auto-suggest list using the
Enter keypress, an onkeypress event is fired by behavior C. Can I prevent
this onkeypress event from happening?

Regards,
James





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655619.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



Removing items from ListView in AJAX request // Re: How to pass model changes to parent components? onModelChanged() not working

2013-01-21 Thread Ondrej Zizka

Ok, I got it.
Seems I have to manually refresh the ListView's model. So now it's like 
below.


I thought it would re-load it between
 * onDelete(), which is triggered in 
AjaxEventBehavior("onclick")#onEvent(),

 * and ListView rendering.

Could someone enlight me pls.

Thanks,
Ondra

ListView listView;
add( listView = new ListView("fieldsRows", 
listModel){

@Override
protected void populateItem( final 
ListItem item ) {

final ListView thatLV = this;
item.add( new CustomFieldRowPanel("fieldRow", 
item.getModel()){

// Delete icon was clicked.
@Override
protected void onDelete( String name, 
AjaxRequestTarget target ) {
Map fieldsMap = 
(Map) CustomFieldsPanel.this.getDefaultModelObject();
//fieldsMap.remove( 
item.getModelObject().getName() ); // ListView uses indexes -> leads to 
bad offsets!
fieldsMap.remove( name );  // This is more 
robust. But still, this renders the list before removal...?

item.remove();
thatLV.getDefaultModel().detach();
thatLV.getDefaultModel().getObject();
thatLV.modelChanged();
target.add( CustomFieldsPanel.this ); // Update UI.
try {
CustomFieldsPanel.this.onChange( target ); 
// Persists.

} catch (Exception ex){
feedbackPanel.error( ex.toString() );
}
}
});
}
});



On 01/22/2013 05:54 AM, Ondrej Zizka wrote:
Forgot to write: My problem is that the Map item is deleted, but 
Wicket renders the given sub-component with the old Map for some reason.

But on next Ajax request, it already uses the new one.
I'm a bit puzzled.


On 01/22/2013 05:49 AM, Ondrej Zizka wrote:

On 01/21/2013 10:52 PM, Martin Grigorov wrote:

Hi,

Wicket updates the model with the new value. If this model is shared
between several components then all of them have the new value for 
free. No

need to notify them.
If you still need to notify then you can use #updateModel() method -
org.apache.wicket.markup.html.form.FormComponent#updateModel.
I need to notify when I change the object (model stays the same) in 
this way:


private void onProductUpdate( AjaxRequestTarget target ) {
if( target != null )  target.add( this.feedbackPanel );
try {
product = productDao.update( product );
modelChanged();
this.info("Product saved.");
if( target != null )
target.appendJavaScript("window.notifyFlash('Product saved.')");
} catch( Exception ex ){
this.feedbackPanel.info("Saving product failed: " + 
ex.toString());

}
}

So I basically need to tell Wicket that this and that needs to 
re-render.
Maybe I do the mistake of thinking "Wicket works like Swing which 
basically works like MFC based on Win32 API", so perhaps I should 
forget the idea of "invalidating" the model?

Or is updateModel() the way to go here?

Thanks,
Ondra



CompoundPropertyModel is meant for components which have children. Such
component may have a compound model and all its children can update the
value in the respective branch of this model.


On Mon, Jan 21, 2013 at 7:30 PM, Ondrej Zizka  
wrote:



Hi all,

I have a component containing a form with many TextFields.
The way it should work is that when changed, the value should be 
persisted

immediately (no Save button, all through AJAX).

The AJAX calls work fine, the value gets to the model.

The code to save the model (and the entity contained) is in the parent
component.
I thought I would override onModelChanged() to propagate the 
changes from

the components to the parent.
But onModelChanged() is not called.

Parent has its own model as class member field.
The subcomponents use this:

 ReleaseTraitRowPanel( String id, IModel relModel, 
... ) {

 ...
 PropertyModel traitModel = new PropertyModel(
relModel.getObject().**getTraits(), prop);

 EditableLink4 link = new EditableLink4("link", traitModel){
 // Pass the change notification to upper level. TODO: 
Does

Wicket do this automatically?
 @Override protected void onModelChanged() {
ReleaseTraitRowPanel.this.**onModelChanged();
 }
 };
 ...

 }

How should it be done?
Should I pass the onModelChanged() at all? Or does wicket have some 
way to

notify the other model of changes?

Related - is CompoundPropertyModel only for forms, or can I use it 
with

any component? I could use it here - `prop` is the same as id.

Thanks,
Ondra

--**--**- 

To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.

Re: Wicket 6: Using AutoCompleteBehavior with other behaviors

2013-01-21 Thread james yong
Hi,

To rectify problem 2, I changed the following in wicket-autocomplete.js, 


Wicket.Event.add(obj,"keypress",function(jqEvent){
if(Wicket.Event.keyCode(jqEvent)===KEY_ENTER){
if(selected>-1||hidingAutocomplete===1){
hidingAutocomplete=0;
jqEvent.stopImmediatePropagation();
<--changed from jqEvent.stopPropagation(); 


Regards,
James


james yong wrote
> Hi,
> 
> Now migrating a working project from wicket version 1.4 to 6.4.
> I have a text field that uses the following behaviors:
> A.  AjaxFormComponentUpdatingBehavior("onchange");
> B.  AutoCompleteBehavior; and
> C.  AjaxFormComponentUpdatingBehavior("onkeypress").
> 
> Say I enter an letter 'U' into the text field, and an auto-suggest list
> pops up.
> 
> There are 2 problems which is not seen in wicket 1.4:
> 1) When I select an item (e.g. USD) from the auto-suggest list using a
> mouse, the onchange event from behavior A  is fired twice. The 1st
> onchange event is for 'U' and the 2nd onchange event is for 'USD'.
> Can I prevent the 1st onchange event from happening?
> 
> 2) When I select an item (e.g. USD) from the auto-suggest list using the
> Enter keypress, an onkeypress event is fired by behavior C. Can I prevent
> this onkeypress event from happening?
> 
> Regards,
> James





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655619.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to pass model changes to parent components? onModelChanged() not working

2013-01-21 Thread Ondrej Zizka
Forgot to write: My problem is that the Map item is deleted, but Wicket 
renders the given sub-component with the old Map for some reason.

But on next Ajax request, it already uses the new one.
I'm a bit puzzled.


On 01/22/2013 05:49 AM, Ondrej Zizka wrote:

On 01/21/2013 10:52 PM, Martin Grigorov wrote:

Hi,

Wicket updates the model with the new value. If this model is shared
between several components then all of them have the new value for 
free. No

need to notify them.
If you still need to notify then you can use #updateModel() method -
org.apache.wicket.markup.html.form.FormComponent#updateModel.
I need to notify when I change the object (model stays the same) in 
this way:


private void onProductUpdate( AjaxRequestTarget target ) {
if( target != null )  target.add( this.feedbackPanel );
try {
product = productDao.update( product );
modelChanged();
this.info("Product saved.");
if( target != null )
target.appendJavaScript("window.notifyFlash('Product saved.')");
} catch( Exception ex ){
this.feedbackPanel.info("Saving product failed: " + 
ex.toString());

}
}

So I basically need to tell Wicket that this and that needs to re-render.
Maybe I do the mistake of thinking "Wicket works like Swing which 
basically works like MFC based on Win32 API", so perhaps I should 
forget the idea of "invalidating" the model?

Or is updateModel() the way to go here?

Thanks,
Ondra



CompoundPropertyModel is meant for components which have children. Such
component may have a compound model and all its children can update the
value in the respective branch of this model.


On Mon, Jan 21, 2013 at 7:30 PM, Ondrej Zizka  wrote:


Hi all,

I have a component containing a form with many TextFields.
The way it should work is that when changed, the value should be 
persisted

immediately (no Save button, all through AJAX).

The AJAX calls work fine, the value gets to the model.

The code to save the model (and the entity contained) is in the parent
component.
I thought I would override onModelChanged() to propagate the changes 
from

the components to the parent.
But onModelChanged() is not called.

Parent has its own model as class member field.
The subcomponents use this:

 ReleaseTraitRowPanel( String id, IModel relModel, 
... ) {

 ...
 PropertyModel traitModel = new PropertyModel(
relModel.getObject().**getTraits(), prop);

 EditableLink4 link = new EditableLink4("link", traitModel){
 // Pass the change notification to upper level. TODO: Does
Wicket do this automatically?
 @Override protected void onModelChanged() {
 ReleaseTraitRowPanel.this.**onModelChanged();
 }
 };
 ...

 }

How should it be done?
Should I pass the onModelChanged() at all? Or does wicket have some 
way to

notify the other model of changes?

Related - is CompoundPropertyModel only for forms, or can I use it with
any component? I could use it here - `prop` is the same as id.

Thanks,
Ondra

--**--**- 

To unsubscribe, e-mail: 
users-unsubscribe@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: How to pass model changes to parent components? onModelChanged() not working

2013-01-21 Thread Ondrej Zizka

On 01/21/2013 10:52 PM, Martin Grigorov wrote:

Hi,

Wicket updates the model with the new value. If this model is shared
between several components then all of them have the new value for free. No
need to notify them.
If you still need to notify then you can use #updateModel() method -
org.apache.wicket.markup.html.form.FormComponent#updateModel.
I need to notify when I change the object (model stays the same) in this 
way:


private void onProductUpdate( AjaxRequestTarget target ) {
if( target != null )  target.add( this.feedbackPanel );
try {
product = productDao.update( product );
modelChanged();
this.info("Product saved.");
if( target != null )
target.appendJavaScript("window.notifyFlash('Product 
saved.')");

} catch( Exception ex ){
this.feedbackPanel.info("Saving product failed: " + 
ex.toString());

}
}

So I basically need to tell Wicket that this and that needs to re-render.
Maybe I do the mistake of thinking "Wicket works like Swing which 
basically works like MFC based on Win32 API", so perhaps I should forget 
the idea of "invalidating" the model?

Or is updateModel() the way to go here?

Thanks,
Ondra



CompoundPropertyModel is meant for components which have children. Such
component may have a compound model and all its children can update the
value in the respective branch of this model.


On Mon, Jan 21, 2013 at 7:30 PM, Ondrej Zizka  wrote:


Hi all,

I have a component containing a form with many TextFields.
The way it should work is that when changed, the value should be persisted
immediately (no Save button, all through AJAX).

The AJAX calls work fine, the value gets to the model.

The code to save the model (and the entity contained) is in the parent
component.
I thought I would override onModelChanged() to propagate the changes from
the components to the parent.
But onModelChanged() is not called.

Parent has its own model as class member field.
The subcomponents use this:

 ReleaseTraitRowPanel( String id, IModel relModel, ... ) {
 ...
 PropertyModel traitModel = new PropertyModel(
relModel.getObject().**getTraits(), prop);

 EditableLink4 link = new EditableLink4("link", traitModel){
 // Pass the change notification to upper level. TODO: Does
Wicket do this automatically?
 @Override protected void onModelChanged() {
 ReleaseTraitRowPanel.this.**onModelChanged();
 }
 };
 ...

 }

How should it be done?
Should I pass the onModelChanged() at all? Or does wicket have some way to
notify the other model of changes?

Related - is CompoundPropertyModel only for forms, or can I use it with
any component? I could use it here - `prop` is the same as id.

Thanks,
Ondra

--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@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



Wicket 6.3 with WASP

2013-01-21 Thread BartBlackMagic
I use Wicket 6.3 and WASP to integrate security
(wicket-security-wasp-1.5-RC5.1.jar ).
When I deploy the WAR to tomcat, I get the message:
java.lang.NoSuchMethodError:
org.wicketstuff.security.log.IAuthorizationMessageSource.getMessage(Ljava/lang/String;)Ljava/lang/String;

org.wicketstuff.security.strategies.WaspAuthorizationStrategy.logMessage(WaspAuthorizationStrategy.java:278)

org.wicketstuff.security.strategies.WaspAuthorizationStrategy.logMessage(WaspAuthorizationStrategy.java:256)

org.wicketstuff.security.strategies.WaspAuthorizationStrategy.logMessage(WaspAuthorizationStrategy.java:224)

org.wicketstuff.security.swarm.strategies.AbstractSwarmStrategy.isClassAuthorized(AbstractSwarmStrategy.java:98)

org.wicketstuff.security.checks.LinkSecurityCheck.isActionAuthorized(LinkSecurityCheck.java:114)

This is normal because IAuthorizationMessageSource extends
IErrorMessageSource which has no method String getMessage(String key): 
It only has the following signature in Wicket 6.3
public interface IErrorMessageSource
{
String getMessage(String key, Map vars);
}

In Wicket 1.5 it did have that extra method.
My question is, do I have to downgrade my Wicket version to use WASP? Or
will there be a renewed release of wicket-security-wasp?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-3-with-WASP-tp4655582.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



How to keep pages stateless // Re: Wicket Session Expiration - Ajax interactions

2013-01-21 Thread Ondrej Zizka

Speaking of this,  I had the same issue recently.
I wished for stateless pages but as I didn't know, I opted for 
"keep-alive" ajax requests.


Is there some article, blog, tutorial or whatever on how to keep pages 
stateless?
I know that "if a page is bookmarkable and doesn't contain any 
non-stateless components/behaviors then the page is automatically 
stateless and not stored in the session",

but that mostly excludes ajax.

There's no "keep just one page state and always use it" trick? Would it 
work if some PageStore impl behave like that?


Ondra




On 01/21/2013 10:35 PM, Martin Grigorov wrote:

Well, I'll need some more technical details about Tapestry internals to
understand what they do.

You can check https://github.com/jolira/wicket-stateless - it provides few
Ajax behaviors and components which are stateless, i.e. they re-create the
whole page for each request.
I think this is what you are looking for - stateless pages.


On Mon, Jan 21, 2013 at 11:18 PM, sthomps  wrote:


You can read the Tapestry response a
href="
http://tapestry.1045711.n5.nabble.com/Session-Expiration-Ajax-td5719213.html
">here.


Essentially there are no PageMaps/versions per users session.



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-Expiration-Ajax-interactions-tp4655591p4655604.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



Re: load with AjaxLazyLoadPanel just once

2013-01-21 Thread Gabriel Landon
Maybe you can use something like this :

new AjaxLazyLoadPanel("PanelId") {
Panel myPanel;

@Override
public Component getLazyLoadComponent(String varMarkupId) {
if (myPanel == null) {
myPanel = new EmptyPanel(varMarkupId);  //Use your panel
instead!
}
return myPanel;
}
};

Regards,

Gabriel.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/load-with-AjaxLazyLoadPanel-just-once-tp4655612p4655615.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



Feedback in AJAX requests //Re: How to pass model changes to parent components? onModelChanged() not working

2013-01-21 Thread Ondrej Zizka
Solved - it was wrong validator which never passed, so onModelChanged() 
was never called.


Now I have related problem:

FeedbackPanel shows the error when a form is submitted, but not on AJAX.
It has setOutputMarkupId( true );
It is added to AjaxRequestTarget.

What should I check?

Thanks,
Ondra




On 01/21/2013 06:30 PM, Ondrej Zizka wrote:

Hi all,

I have a component containing a form with many TextFields.
The way it should work is that when changed, the value should be 
persisted immediately (no Save button, all through AJAX).


The AJAX calls work fine, the value gets to the model.

The code to save the model (and the entity contained) is in the parent 
component.
I thought I would override onModelChanged() to propagate the changes 
from the components to the parent.

But onModelChanged() is not called.

Parent has its own model as class member field.
The subcomponents use this:

ReleaseTraitRowPanel( String id, IModel relModel, ... ) {
...
PropertyModel traitModel = new PropertyModel( 
relModel.getObject().getTraits(), prop);


EditableLink4 link = new EditableLink4("link", traitModel){
// Pass the change notification to upper level. TODO: Does 
Wicket do this automatically?

@Override protected void onModelChanged() {
ReleaseTraitRowPanel.this.onModelChanged();
}
};
...

}

How should it be done?
Should I pass the onModelChanged() at all? Or does wicket have some 
way to notify the other model of changes?


Related - is CompoundPropertyModel only for forms, or can I use it 
with any component? I could use it here - `prop` is the same as id.


Thanks,
Ondra

-
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



OnChangeAjaxBehavior javadoc note

2013-01-21 Thread Ondrej Zizka

Hi all,

guessing from a name, I would expect these two to do the same:

link.add( new OnChangeAjaxBehavior() {
@Override protected void onUpdate( AjaxRequestTarget target ) {
ReleaseTraitRowPanel.this.onUpdate( target );
}
});

link.add( new AjaxFormComponentUpdatingBehavior("onchange"){
@Override protected void onUpdate( AjaxRequestTarget target ) {
ReleaseTraitRowPanel.this.onUpdate( target );
}
} );

However, the first one reacts (and sends AJAX request) on each keypress.
Could this info be added to the javadoc of OnChangeAjaxBehavior?

Thanks,
Ondra

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



load with AjaxLazyLoadPanel just once

2013-01-21 Thread infiniter
I have a panel that's too heavy so I'm using an an AjaxLazyLoadPanel to lazy
load it. That panel is being reloaded on every Ajax call that rerenders the
containing panel , but now I want to use lazy loading just once the page is
loaded, and when rerendering the containing panel I want to use a regular
panel. Any suggestion?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/load-with-AjaxLazyLoadPanel-just-once-tp4655612.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to pass model changes to parent components? onModelChanged() not working

2013-01-21 Thread Martin Grigorov
Hi,

Wicket updates the model with the new value. If this model is shared
between several components then all of them have the new value for free. No
need to notify them.
If you still need to notify then you can use #updateModel() method -
org.apache.wicket.markup.html.form.FormComponent#updateModel.

CompoundPropertyModel is meant for components which have children. Such
component may have a compound model and all its children can update the
value in the respective branch of this model.


On Mon, Jan 21, 2013 at 7:30 PM, Ondrej Zizka  wrote:

> Hi all,
>
> I have a component containing a form with many TextFields.
> The way it should work is that when changed, the value should be persisted
> immediately (no Save button, all through AJAX).
>
> The AJAX calls work fine, the value gets to the model.
>
> The code to save the model (and the entity contained) is in the parent
> component.
> I thought I would override onModelChanged() to propagate the changes from
> the components to the parent.
> But onModelChanged() is not called.
>
> Parent has its own model as class member field.
> The subcomponents use this:
>
> ReleaseTraitRowPanel( String id, IModel relModel, ... ) {
> ...
> PropertyModel traitModel = new PropertyModel(
> relModel.getObject().**getTraits(), prop);
>
> EditableLink4 link = new EditableLink4("link", traitModel){
> // Pass the change notification to upper level. TODO: Does
> Wicket do this automatically?
> @Override protected void onModelChanged() {
> ReleaseTraitRowPanel.this.**onModelChanged();
> }
> };
> ...
>
> }
>
> How should it be done?
> Should I pass the onModelChanged() at all? Or does wicket have some way to
> notify the other model of changes?
>
> Related - is CompoundPropertyModel only for forms, or can I use it with
> any component? I could use it here - `prop` is the same as id.
>
> Thanks,
> Ondra
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: 'numbers' and suggestion for Wicket presentation

2013-01-21 Thread Martin Grigorov
Hi,

You can use MarkMail to see the activity in the mailing lists (there is a
Flash at the left-top corner)
- users:
http://markmail.org/search/?q=wicket#query:wicket%20list%3Aorg.apache.wicket.users+page:1+state:facets
- dev:
http://markmail.org/search/?q=wicket+dev#query:wicket%20dev%20list%3Aorg.apache.wicket.dev+page:1+state:facets
- commits:
http://markmail.org/search/?q=wicket+commits#query:wicket%20commits%20list%3Aorg.apache.wicket.commits+page:1+state:facets

GitHub and Ohloh also provide some statistics.

Check http://builtwithwicket.tumblr.com/ and
https://cwiki.apache.org/WICKET/websites-based-on-wicket.html for a list of
sites built with Wicket.

Some other users like you have made a competition between the teams
internally to decide which technology to use. Create a relatively complex
app with your prefered technology and compare - simplicity, reusability,
testability, community support during development, 

Good luck!

On Mon, Jan 21, 2013 at 6:45 PM, Friedrich, Gabor (OSD) <
gabor.friedr...@fao.org> wrote:

> Dear Wicket Team,
>
> ** **
>
> I write on behalf of a development team working at FAO. We use Wicket in a
> big administrative web application.
>
> ** **
>
> We have prepared a technical Wicket presentation for the IT division in
> order to suggest the use of Wicket as the primary/corporate web framework.
> 
>
> There will be a hard comparison with GWT and ZK recommended by the other
> teams.
>
> ** **
>
> We are looking for numbers which estimate Wicket in terms of monthly mails
> generated through the mailing lists, web sites built with Wicket, number of
> active developers, commits, and whatever is useful to give a big picture of
> Wicket.
>
> ** **
>
> Any other suggestions or tips that can be useful for the presentation are
> welcome!
>
> ** **
>
> Thank you in advance
>
> Kind regards
>
> ** **
>
> ** **
>
> *Gabor Friedrich*
>
> *COIN Team*
>



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


Re: Wicket Session Expiration - Ajax interactions

2013-01-21 Thread Martin Grigorov
Well, I'll need some more technical details about Tapestry internals to
understand what they do.

You can check https://github.com/jolira/wicket-stateless - it provides few
Ajax behaviors and components which are stateless, i.e. they re-create the
whole page for each request.
I think this is what you are looking for - stateless pages.


On Mon, Jan 21, 2013 at 11:18 PM, sthomps  wrote:

> You can read the Tapestry response a
> href="
> http://tapestry.1045711.n5.nabble.com/Session-Expiration-Ajax-td5719213.html
> ">here.
>
>
> Essentially there are no PageMaps/versions per users session.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-Expiration-Ajax-interactions-tp4655591p4655604.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 


Re: Wicket Session Expiration - Ajax interactions

2013-01-21 Thread sthomps
You can read the Tapestry response a
href="http://tapestry.1045711.n5.nabble.com/Session-Expiration-Ajax-td5719213.html";>here.
 


Essentially there are no PageMaps/versions per users session.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-Expiration-Ajax-interactions-tp4655591p4655604.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: Wicket Session Expiration - Ajax interactions

2013-01-21 Thread Martin Grigorov
How does Tapestry solve the problem explained in the comments you pasted ?


On Mon, Jan 21, 2013 at 8:15 PM, sthomps  wrote:

> It's just not efficient.
>
> We have users that will let their pages sit for hours before they come back
> to them.
>
> I would rather have these sessions/memory be reclaimed, and if a user has a
> stale page, the Ajax action continues on as normal.
>
> We also have a sudo portal that contains applications contained in iframes
> -
> most of them are wicket applications.
>
> Depending on the # of iframes opened, ajax timers, this can cause issues
> with the # of concurrent connections opened in the browser.
>
> When I went through this in 1.4 to recreate the request, a lot of the
> issues
> were related to the use of back button support and PageMaps, which most of
> our applications have no use for.
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-Expiration-Ajax-interactions-tp4655591p4655594.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 


Re: constructing page multiple times per request

2013-01-21 Thread kamiseq
ok, thanks anyway, indeed it was killing me for some time now ;]


pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


On 21 January 2013 21:13, Ernesto Reinaldo Barreiro wrote:

> Hi,
>
> On Mon, Jan 21, 2013 at 8:42 PM, kamiseq  wrote:
>
> > yep that was it, why this happens?
> >
>
> To be honest I do not know the exact reason...  I guess a second request is
> launched to retrieve  "missing empty image"... Just googled for it and
> found this.
>
>
> http://www.nczonline.net/blog/2009/11/30/empty-image-src-can-destroy-your-site/
>
>
> >
> > thanks ernesto, it is not only on IE ;] firefox also
> >
> >
> > pozdrawiam
> > Paweł Kamiński
> >
> > kami...@gmail.com
> > pkaminski@gmail.com
> > __
> >
> >
> > On 21 January 2013 20:36, kamiseq  wrote:
> >
> > > I have something like this in logs, I will try remove it
> > >
> > >
> > > pozdrawiam
> > > Paweł Kamiński
> > >
> > > kami...@gmail.com
> > > pkaminski@gmail.com
> > > __
> > >
> > >
> > > On 21 January 2013 20:12, Ernesto Reinaldo Barreiro <
> reier...@gmail.com
> > >wrote:
> > >
> > >> Wasn't there some problem with "empty" images () and IE
> > >> reloading the page? At least I remember some old threads on this
> topic.
> > >>
> > >> On Mon, Jan 21, 2013 at 8:07 PM, kamiseq  wrote:
> > >>
> > >> > I did, I dont see anything specific about this
> > >> >
> > >> > java.lang.RuntimeException: test
> > >> > at com.myapp.Page1.initialize(Page1.java:80)
> > >> > at com.myapp.Page1.(Page1.java:48)
> > >> > at com.myapp.Page1.(Page1.java:42)
> > >> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > >> > Method)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > >> > at
> java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:174)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:66)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:278)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:94)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> > >> > at
> > >> >
> > >>
> >
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
> > >> > at
> > >> >
> > >>
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> > >> > at
> > >> >
> > >>
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
> > >> > at
> > >> >
> > >>
> > o

Re: constructing page multiple times per request

2013-01-21 Thread Ernesto Reinaldo Barreiro
Hi,

On Mon, Jan 21, 2013 at 8:42 PM, kamiseq  wrote:

> yep that was it, why this happens?
>

To be honest I do not know the exact reason...  I guess a second request is
launched to retrieve  "missing empty image"... Just googled for it and
found this.

http://www.nczonline.net/blog/2009/11/30/empty-image-src-can-destroy-your-site/


>
> thanks ernesto, it is not only on IE ;] firefox also
>
>
> pozdrawiam
> Paweł Kamiński
>
> kami...@gmail.com
> pkaminski@gmail.com
> __
>
>
> On 21 January 2013 20:36, kamiseq  wrote:
>
> > I have something like this in logs, I will try remove it
> >
> >
> > pozdrawiam
> > Paweł Kamiński
> >
> > kami...@gmail.com
> > pkaminski@gmail.com
> > __
> >
> >
> > On 21 January 2013 20:12, Ernesto Reinaldo Barreiro  >wrote:
> >
> >> Wasn't there some problem with "empty" images () and IE
> >> reloading the page? At least I remember some old threads on this topic.
> >>
> >> On Mon, Jan 21, 2013 at 8:07 PM, kamiseq  wrote:
> >>
> >> > I did, I dont see anything specific about this
> >> >
> >> > java.lang.RuntimeException: test
> >> > at com.myapp.Page1.initialize(Page1.java:80)
> >> > at com.myapp.Page1.(Page1.java:48)
> >> > at com.myapp.Page1.(Page1.java:42)
> >> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >> > Method)
> >> > at
> >> >
> >> >
> >>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> >> > at
> >> >
> >> >
> >>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> >> > at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:174)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:66)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:278)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:94)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> >> > at
> >> >
> >>
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
> >> > at
> >> >
> >> >
> >>
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
> >> > at
> >> >
> >> >
> >>
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
> >> > at
> >> >
> >>
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
> >> > at
> >> >
> >> >
> >>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> >> > at
> >> >
> >>
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
> >> > at
> >> >
> >> >
> >>
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> >> > at
> >> >
> >> >
> >>
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
> >> > at
> >> >
> >>
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
> >> > at
> >> >
> >> >
> >>
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> >> > at
> >> >
> >> >
> >>
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
> >> > at
> >> >
> >> >
> >>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> >> > at
> >> >
> >> >
> >>
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> >> > at
> >> >
> >> >
> >>
> org.eclipse.jetty.server.handler.HandlerCollection.handle(

Re: constructing page multiple times per request

2013-01-21 Thread kamiseq
yep that was it, why this happens?

thanks ernesto, it is not only on IE ;] firefox also


pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


On 21 January 2013 20:36, kamiseq  wrote:

> I have something like this in logs, I will try remove it
>
>
> pozdrawiam
> Paweł Kamiński
>
> kami...@gmail.com
> pkaminski@gmail.com
> __
>
>
> On 21 January 2013 20:12, Ernesto Reinaldo Barreiro wrote:
>
>> Wasn't there some problem with "empty" images () and IE
>> reloading the page? At least I remember some old threads on this topic.
>>
>> On Mon, Jan 21, 2013 at 8:07 PM, kamiseq  wrote:
>>
>> > I did, I dont see anything specific about this
>> >
>> > java.lang.RuntimeException: test
>> > at com.myapp.Page1.initialize(Page1.java:80)
>> > at com.myapp.Page1.(Page1.java:48)
>> > at com.myapp.Page1.(Page1.java:42)
>> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> > Method)
>> > at
>> >
>> >
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>> > at
>> >
>> >
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> > at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
>> > at
>> >
>> >
>> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:174)
>> > at
>> >
>> >
>> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:66)
>> > at
>> >
>> >
>> org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)
>> > at
>> >
>> >
>> org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:278)
>> > at
>> >
>> >
>> org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)
>> > at
>> >
>> >
>> org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
>> > at
>> >
>> >
>> org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:94)
>> > at
>> >
>> >
>> org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244)
>> > at
>> >
>> >
>> org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
>> > at
>> >
>> >
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
>> > at
>> >
>> >
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>> > at
>> >
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
>> > at
>> >
>> >
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
>> > at
>> >
>> >
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
>> > at
>> >
>> >
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
>> > at
>> >
>> >
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
>> > at
>> >
>> >
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
>> > at
>> >
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>> > at
>> >
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
>> > at
>> >
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>> > at org.eclipse.jetty.server.Server.handle(Server.java:365)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
>> > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
>> > at
>> >

Re: constructing page multiple times per request

2013-01-21 Thread kamiseq
I have something like this in logs, I will try remove it


pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


On 21 January 2013 20:12, Ernesto Reinaldo Barreiro wrote:

> Wasn't there some problem with "empty" images () and IE
> reloading the page? At least I remember some old threads on this topic.
>
> On Mon, Jan 21, 2013 at 8:07 PM, kamiseq  wrote:
>
> > I did, I dont see anything specific about this
> >
> > java.lang.RuntimeException: test
> > at com.myapp.Page1.initialize(Page1.java:80)
> > at com.myapp.Page1.(Page1.java:48)
> > at com.myapp.Page1.(Page1.java:42)
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> > at
> >
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> > at
> >
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> > at
> >
> >
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:174)
> > at
> >
> >
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:66)
> > at
> >
> >
> org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)
> > at
> >
> >
> org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:278)
> > at
> >
> >
> org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)
> > at
> >
> >
> org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
> > at
> >
> >
> org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:94)
> > at
> >
> >
> org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244)
> > at
> >
> >
> org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
> > at
> >
> >
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
> > at
> >
> >
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> > at
> >
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
> > at
> >
> >
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> > at
> >
> >
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
> > at
> >
> >
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
> > at
> >
> >
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
> > at
> >
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> > at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
> > at
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
> > at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
> > at
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> > at org.eclipse.jetty.server.Server.handle(Server.java:365)
> > at
> >
> >
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
> > at
> >
> >
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
> > at
> >
> >
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
> > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
> > at
> > org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> > at
> >
> >
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> > at
> >
> >
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
> > at
> >
> >
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> > at
> >

Re: constructing page multiple times per request

2013-01-21 Thread Ernesto Reinaldo Barreiro
Wasn't there some problem with "empty" images () and IE
reloading the page? At least I remember some old threads on this topic.

On Mon, Jan 21, 2013 at 8:07 PM, kamiseq  wrote:

> I did, I dont see anything specific about this
>
> java.lang.RuntimeException: test
> at com.myapp.Page1.initialize(Page1.java:80)
> at com.myapp.Page1.(Page1.java:48)
> at com.myapp.Page1.(Page1.java:42)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at
>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> at
>
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:174)
> at
>
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:66)
> at
>
> org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)
> at
>
> org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:278)
> at
>
> org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)
> at
>
> org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
> at
>
> org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:94)
> at
>
> org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244)
> at
>
> org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
> at
>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
> at
>
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> at
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
> at
>
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> at
>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
> at
>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
> at
>
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
> at
>
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
> at
>
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> at
>
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
> at
>
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> at
>
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at
>
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> at
>
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:365)
> at
>
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
> at
>
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
> at
>
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at
>
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> at
>
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
> at
>
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Thread.java:722)
>
> and it is always 3 times ;/
>
>
> pozdrawiam
> Paweł Kamiński
>
> kami...@gmail.com
> pkaminski@gmail.com
> __
>
>
> On 21 January 2013 09:19, Martin Grigorov  wrote:
>
> > Hi,
> >
> > Just put a breakpoint in your constructor and see what are the
> stacktraces.
> >
> >
> > On Sun, Jan

Re: constructing page multiple times per request

2013-01-21 Thread kamiseq
I did, I dont see anything specific about this

java.lang.RuntimeException: test
at com.myapp.Page1.initialize(Page1.java:80)
at com.myapp.Page1.(Page1.java:48)
at com.myapp.Page1.(Page1.java:42)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:174)
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:66)
at
org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)
at
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:278)
at
org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)
at
org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:94)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244)
at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:365)
at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)

and it is always 3 times ;/


pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


On 21 January 2013 09:19, Martin Grigorov  wrote:

> Hi,
>
> Just put a breakpoint in your constructor and see what are the stacktraces.
>
>
> On Sun, Jan 20, 2013 at 6:27 PM, kamiseq  wrote:
>
> > hi,
> > I try to understand why wicket (in 6th version) is constructing my page
> > always 3 times per every request. it is page constructor is called 3
> times
> > always I navigate to page.
> >
> > I configured it as
> >
> > getResourceSettings().setFileCleaner(null);
> > getPageSettings().setVersionPagesByDefault(false);
> >
> >
> getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.REDIRE

How to pass model changes to parent components? onModelChanged() not working

2013-01-21 Thread Ondrej Zizka

Hi all,

I have a component containing a form with many TextFields.
The way it should work is that when changed, the value should be 
persisted immediately (no Save button, all through AJAX).


The AJAX calls work fine, the value gets to the model.

The code to save the model (and the entity contained) is in the parent 
component.
I thought I would override onModelChanged() to propagate the changes 
from the components to the parent.

But onModelChanged() is not called.

Parent has its own model as class member field.
The subcomponents use this:

ReleaseTraitRowPanel( String id, IModel relModel, ... ) {
...
PropertyModel traitModel = new PropertyModel( 
relModel.getObject().getTraits(), prop);


EditableLink4 link = new EditableLink4("link", traitModel){
// Pass the change notification to upper level. TODO: Does 
Wicket do this automatically?

@Override protected void onModelChanged() {
ReleaseTraitRowPanel.this.onModelChanged();
}
};
...

}

How should it be done?
Should I pass the onModelChanged() at all? Or does wicket have some way 
to notify the other model of changes?


Related - is CompoundPropertyModel only for forms, or can I use it with 
any component? I could use it here - `prop` is the same as id.


Thanks,
Ondra

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



Re: Wicket Session Expiration - Ajax interactions

2013-01-21 Thread sthomps
It's just not efficient.

We have users that will let their pages sit for hours before they come back
to them.

I would rather have these sessions/memory be reclaimed, and if a user has a
stale page, the Ajax action continues on as normal.

We also have a sudo portal that contains applications contained in iframes -
most of them are wicket applications.

Depending on the # of iframes opened, ajax timers, this can cause issues
with the # of concurrent connections opened in the browser.

When I went through this in 1.4 to recreate the request, a lot of the issues
were related to the use of back button support and PageMaps, which most of
our applications have no use for.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-Expiration-Ajax-interactions-tp4655591p4655594.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: Wicket Session Expiration - Ajax interactions

2013-01-21 Thread Pointbreak
Why don't you just keep the session alive as long as the user has an
ajax page open? You can easily do this by letting the page do a timed
ajax call to the server every x minutes, where x is slightly less than
your session timeout.

On Mon, Jan 21, 2013, at 17:56, sthomps wrote:
> I'm currently in the process of evaluating frameworks.  We are currently
> using Wicket 1.4.
> 
> The ones I've looked at so far have been Vaadin, Tapestry 5.4, and Wicket
> 6.0.
> 
> Vaadin I ruled out for various reasons.
> 
> One of the problems that our users have complained quite a bit about is
> the
> dreaded PageExpiration problem.
> 
> In Wicket 6.0 the issue is resolved somewhat by the framework recreating
> the
> page and then issuing a redirect.
> 
> While understand why it does this
> 
> // If the page is stateful then we cannot assume that the listener
> interface
> is
> // invoked on its initial state (right after page initialization) and
> that
> its
> // component and/or behavior will be available. That's why the listener
> interface
> // should be ignored and the best we can do is to re-paint the newly
> constructed
> // page.
> 
> it's still not the solution we want.  The Ajax interaction should
> continue
> on as normal.
> 
> Due to how Tapestry is architected, this is not an isssue.
> 
> In Wicket 1.4, I got around this somewhat by extending the
> WebRequestCycleProcessor and recreating the request when a PageExpiration
> was encountered.
> 
> It doesn't appear that I can carry this forward in Wicket 6.0.
> 
> I just want to make sure that I'm not missing anything.
> 
> Thanks
> 
> 
> 
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-Expiration-Ajax-interactions-tp4655591.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



Re: Wicket + Spring

2013-01-21 Thread Joachim Schrod
JCoder wrote:
> Hi all,
> 
> Im just trying to setup a basic project structure in Eclipse with
> Wicket and Spring. I think its pretty smart to separate both Wicket
> and Spring into two different Eclipse projects, isnt it? Thus, I
> created an Eclipse project for the Web part and one for the Spring
> (and later Hibernate as well) part.
> Now when I start Tomcat with Eclipse I get "...Caused by:
> java.lang.NoClassDefFoundError:
> org/springframework/context/ConfigurableApplicationContext"

Then something in your Web project references Spring.
When you use wicket-spring, that's the case, for example.

You can tell Eclipse that it shall get the Spring jars from your
Spring project, then. In your Web project properties, in `Project
references'. The Spring jars and all dependent jars must be marked
as exported in your Spring projects Java Build Path.

But note that in the end, Eclipse will deploy all these jars to the
WEB-INF/lib directory of your Tomcat working directory (usually
.metadata/.plugins/org.eclipse.wst.server.core/tmp*/wtpwebapps/ in
your workspace directory).

HTH,
Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.org


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



Wicket Session Expiration - Ajax interactions

2013-01-21 Thread sthomps
I'm currently in the process of evaluating frameworks.  We are currently
using Wicket 1.4.

The ones I've looked at so far have been Vaadin, Tapestry 5.4, and Wicket
6.0.

Vaadin I ruled out for various reasons.

One of the problems that our users have complained quite a bit about is the
dreaded PageExpiration problem.

In Wicket 6.0 the issue is resolved somewhat by the framework recreating the
page and then issuing a redirect.

While understand why it does this

// If the page is stateful then we cannot assume that the listener interface
is
// invoked on its initial state (right after page initialization) and that
its
// component and/or behavior will be available. That's why the listener
interface
// should be ignored and the best we can do is to re-paint the newly
constructed
// page.

it's still not the solution we want.  The Ajax interaction should continue
on as normal.

Due to how Tapestry is architected, this is not an isssue.

In Wicket 1.4, I got around this somewhat by extending the
WebRequestCycleProcessor and recreating the request when a PageExpiration
was encountered.

It doesn't appear that I can carry this forward in Wicket 6.0.

I just want to make sure that I'm not missing anything.

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-Expiration-Ajax-interactions-tp4655591.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: [Announce] Introducing Wicked Charts

2013-01-21 Thread Paul Bors
Many thanks again Tom!

~ Thank you,
   Paul Bors

On Mon, Jan 21, 2013 at 6:54 AM, Decebal Suiu  wrote:

> See another implementation wicket-jqplot in wicketstuff
> (https://github.com/wicketstuff/core/wiki/JqPlot-Plugin-Integration)
>
> Best regards,
> Decebal
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Announce-Introducing-Wicked-Charts-tp4655519p4655581.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


RE: Multiple select drop down in Wicket

2013-01-21 Thread Paul Bors
CSS :)

~ Thank you,
  Paul Bors

-Original Message-
From: Marios Skounakis [mailto:msc...@gmail.com] 
Sent: Tuesday, January 15, 2013 2:18 PM
To: users@wicket.apache.org
Subject: Re: Multiple select drop down in Wicket

I've considered using select2 (it looks very impressive) but I was put off
by the fact that its appearance is not consistent with the rest of the input
controls.

How do people solve this?


On Tue, Jan 15, 2013 at 6:34 PM, Paul Bors  wrote:

> I gave up on the normal select in HTML and started to use Igor's Select2.
>
> See http://ivaynberg.github.com/select2/
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: kshitiz [mailto:k.agarw...@gmail.com]
> Sent: Monday, January 14, 2013 9:17 PM
> To: users@wicket.apache.org
> Subject: RE: Multiple select drop down in Wicket
>
> Actually ListMultipleChoice is not that user friendly as compare to 
> multi select drop down. Thats why I preferred the later one. Is there 
> any way to implement the same in Wicket?
>
>
>
> --
> View this message in context:
>
> http://apache-wicket.1842946.n4.nabble.com/Multiple-select-drop-down-i
> n-Wick
> et-tp4655355p4655368.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
>
>


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



Re: Wicket ajax triggers to embed request data

2013-01-21 Thread Ernesto Reinaldo Barreiro
Hi,

On Mon, Jan 21, 2013 at 3:34 PM, Diogo Casado  wrote:

> Ernesto.
>
> Thanks!
> I will check on this function to see if we can avoid any specific patches.
>
> I will also try to link against Wicket 1.6 to see how things go. Maybe
> using jQuery ajax is better.
>
>
I think work done for wicket 1.6.x AJAX is excellent and  AJAX on 1.6.x is
definitely  faster: I have made some (elementary) experiments with pages
with lots widgets and in some cases wicket 6 was almost 7 times faster than
1.5. Of course, that might depend on the use case and page design.

-- 
Regards - Ernesto Reinaldo Barreiro


Re: Wicket ajax triggers to embed request data

2013-01-21 Thread Diogo Casado
Ernesto.

Thanks!
I will check on this function to see if we can avoid any specific patches.

I will also try to link against Wicket 1.6 to see how things go. Maybe
using jQuery ajax is better.

Regards,

- Diogo


On Mon, Jan 21, 2013 at 12:13 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
>
> On Mon, Jan 21, 2013 at 3:01 PM, Diogo Casado 
> wrote:
>
> > Hi,
> >
> > I'm implementing some components that have a really dynamic behavior.
> >
> > The JavaScript client side component properties changes as user
> interacts.
> > But the thing is that I don't really need an Ajax call after every change
> > to update this properties server-side. Just when the user clicks in
> another
> > AjaxButton for example. This behavior can relieve the pressure on our
> > server.
> >
> > So I wish that this specific component state/properties could be embedded
> > in any ajax call (like in a post).
> >
> > Well, I know several ways of doing that, but the one that seemed more
> > transparent is to have a trigger when any ajax call happens, capturing
> the
> > request before it is sent and then.. add my component properties.
> >
> > I was inspecting the wicket-ajax.js (Wicket 1.5) but it seems that we
> don't
> > have any kind of triggers working in this way.. did just a quick look.
> >
> > There is
>
>   Wicket.Ajax.registerPreCallHandler(function() {
>   //
>  });
> maybe you can use that to do what you want? Unfortunately on 1.4.x and
> 1.5.X handlers do not receive as parameter the URL or anything useful. Bu
> maybe you can monkey patch get and post to pass more info,
>
>
> > Do you have any ideas for this?
> >
> > Other possibilities are making a simple event interface for this
> component
> > that should be called when desired. But in this case, we would still
> have a
> > couple of ajax calls to update individual elements (I suppose).
> >
> > Thanks.
> >
> > - Diogo Casado
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
> Antilia Soft
> http://antiliasoft.com/ 
>


Re: Wicket ajax triggers to embed request data

2013-01-21 Thread Diogo Casado
Martin,

Thanks. Unfortunately the component is not form based. It's a canvas.

Yeah I know that the Ajax interface in Wicket 1.6 is based on jQuery. It
sure is time to update it.

Thanks.

- Diogo


On Mon, Jan 21, 2013 at 12:11 PM, Martin Grigorov wrote:

> Hi,
>
>
> On Mon, Jan 21, 2013 at 4:01 PM, Diogo Casado 
> wrote:
>
> > Hi,
> >
> > I'm implementing some components that have a really dynamic behavior.
> >
> > The JavaScript client side component properties changes as user
> interacts.
> > But the thing is that I don't really need an Ajax call after every change
> > to update this properties server-side. Just when the user clicks in
> another
> > AjaxButton for example. This behavior can relieve the pressure on our
> > server.
> >
> > So I wish that this specific component state/properties could be embedded
> > in any ajax call (like in a post).
> >
>
> Using AjaxButton to submit the form with Ajax isn't an option ?
>
>
> >
> > Well, I know several ways of doing that, but the one that seemed more
> > transparent is to have a trigger when any ajax call happens, capturing
> the
> > request before it is sent and then.. add my component properties.
> >
> > I was inspecting the wicket-ajax.js (Wicket 1.5) but it seems that we
> don't
> > have any kind of triggers working in this way.. did just a quick look.
> >
> > Do you have any ideas for this?
> >
> > Other possibilities are making a simple event interface for this
> component
> > that should be called when desired. But in this case, we would still
> have a
> > couple of ajax calls to update individual elements (I suppose).
> >
>
> Wicket 6.x provides such capabilities.
> You can stop any Ajax call with a precondition and store the current
> request parameters in a data structure like: [{name: 'param1Name', value:
> 'param1Value'}, ...] (see jQuery#param).
> Later when you think you are ready to make the updates you can just add
> this data structure as dynamic extra parameter to the Ajax call.
>
>
> >
> > Thanks.
> >
> > - Diogo Casado
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 
>


Re: Wicket ajax triggers to embed request data

2013-01-21 Thread Ernesto Reinaldo Barreiro
Hi,

On Mon, Jan 21, 2013 at 3:01 PM, Diogo Casado  wrote:

> Hi,
>
> I'm implementing some components that have a really dynamic behavior.
>
> The JavaScript client side component properties changes as user interacts.
> But the thing is that I don't really need an Ajax call after every change
> to update this properties server-side. Just when the user clicks in another
> AjaxButton for example. This behavior can relieve the pressure on our
> server.
>
> So I wish that this specific component state/properties could be embedded
> in any ajax call (like in a post).
>
> Well, I know several ways of doing that, but the one that seemed more
> transparent is to have a trigger when any ajax call happens, capturing the
> request before it is sent and then.. add my component properties.
>
> I was inspecting the wicket-ajax.js (Wicket 1.5) but it seems that we don't
> have any kind of triggers working in this way.. did just a quick look.
>
> There is

  Wicket.Ajax.registerPreCallHandler(function() {
  //
 });
maybe you can use that to do what you want? Unfortunately on 1.4.x and
1.5.X handlers do not receive as parameter the URL or anything useful. Bu
maybe you can monkey patch get and post to pass more info,


> Do you have any ideas for this?
>
> Other possibilities are making a simple event interface for this component
> that should be called when desired. But in this case, we would still have a
> couple of ajax calls to update individual elements (I suppose).
>
> Thanks.
>
> - Diogo Casado
>



-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ 


Re: Wicket ajax triggers to embed request data

2013-01-21 Thread Martin Grigorov
Hi,


On Mon, Jan 21, 2013 at 4:01 PM, Diogo Casado  wrote:

> Hi,
>
> I'm implementing some components that have a really dynamic behavior.
>
> The JavaScript client side component properties changes as user interacts.
> But the thing is that I don't really need an Ajax call after every change
> to update this properties server-side. Just when the user clicks in another
> AjaxButton for example. This behavior can relieve the pressure on our
> server.
>
> So I wish that this specific component state/properties could be embedded
> in any ajax call (like in a post).
>

Using AjaxButton to submit the form with Ajax isn't an option ?


>
> Well, I know several ways of doing that, but the one that seemed more
> transparent is to have a trigger when any ajax call happens, capturing the
> request before it is sent and then.. add my component properties.
>
> I was inspecting the wicket-ajax.js (Wicket 1.5) but it seems that we don't
> have any kind of triggers working in this way.. did just a quick look.
>
> Do you have any ideas for this?
>
> Other possibilities are making a simple event interface for this component
> that should be called when desired. But in this case, we would still have a
> couple of ajax calls to update individual elements (I suppose).
>

Wicket 6.x provides such capabilities.
You can stop any Ajax call with a precondition and store the current
request parameters in a data structure like: [{name: 'param1Name', value:
'param1Value'}, ...] (see jQuery#param).
Later when you think you are ready to make the updates you can just add
this data structure as dynamic extra parameter to the Ajax call.


>
> Thanks.
>
> - Diogo Casado
>



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


Fwd: Wicket ajax triggers to embed request data

2013-01-21 Thread Diogo Casado
Hi,

I'm implementing some components that have a really dynamic behavior.

The JavaScript client side component properties changes as user interacts.
But the thing is that I don't really need an Ajax call after every change
to update this properties server-side. Just when the user clicks in another
AjaxButton for example. This behavior can relieve the pressure on our
server.

So I wish that this specific component state/properties could be embedded
in any ajax call (like in a post).

Well, I know several ways of doing that, but the one that seemed more
transparent is to have a trigger when any ajax call happens, capturing the
request before it is sent and then.. add my component properties.

I was inspecting the wicket-ajax.js (Wicket 1.5) but it seems that we don't
have any kind of triggers working in this way.. did just a quick look.

Do you have any ideas for this?

Other possibilities are making a simple event interface for this component
that should be called when desired. But in this case, we would still have a
couple of ajax calls to update individual elements (I suppose).

Thanks.

- Diogo Casado


Re: [Announce] Introducing Wicked Charts

2013-01-21 Thread Decebal Suiu
See another implementation wicket-jqplot in wicketstuff
(https://github.com/wicketstuff/core/wiki/JqPlot-Plugin-Integration)

Best regards,
Decebal



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Announce-Introducing-Wicked-Charts-tp4655519p4655581.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: updateAjaxAttributes has no effect on AutoCompleteBehavior

2013-01-21 Thread james yong
Hi Martin,

I tried again with a simple application and pretty sure updateAjaxAttributes
has no effect on AutoCompleteBehavior. But then, I need to verify with
another party to verify/confirm whether this is a bug or intended feature.
It is working with AjaxFormComponentUpdatingBehavior.

Regards,
James


Martin Grigorov-4 wrote
> Hi,
> 
> I don't see why it should not work.
> Actually AutoCompleteBehavior itself wont work without this method. It
> overrides it to do:
> attributes.setWicketAjaxResponse(false);
>  attributes.setDataType("html");
> 
> 
> 
> 
> On Mon, Jan 21, 2013 at 10:09 AM, james yong <

> i_yongbl@.com

> > wrote:
> 
>> Hi all,
>>
>> Just to confirm if overriding updateAjaxAttributes has any effect on
>> AutoCompleteBehavior?
>> I was tryng to do the following but see no popup nor code reflected in
>> the
>> html source.
>>
>> @Override
>> protected void updateAjaxAttributes(AjaxRequestAttributes
>> attributes) {
>> super.updateAjaxAttributes(attributes);
>> AjaxCallListener myAjaxCallListener = new AjaxCallListener()
>> {
>>
>> @Override
>> public CharSequence getBeforeHandler(Component component)
>> {
>> return "alert('I\'m executed before the firing of the
>> Ajax call')";
>> }
>> };
>> List
> 
>  list =
>> attributes.getAjaxCallListeners();
>> list.add(myAjaxCallListener);
>> }
>>
>> Regards,
>> James
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/updateAjaxAttributes-has-no-effect-on-AutoCompleteBehavior-tp4655560.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: 

> users-unsubscribe@.apache

>> For additional commands, e-mail: 

> users-help@.apache

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





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/updateAjaxAttributes-has-no-effect-on-AutoCompleteBehavior-tp4655560p4655579.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: [Announce] Introducing Wicked Charts

2013-01-21 Thread Ernesto Reinaldo Barreiro
Hi,

On Mon, Jan 21, 2013 at 10:20 AM, MattyDE  wrote:

> Thanks for your hard work.
>
> But iam very sad that highchart its not free for commercial use :o/
>
> Maybe anyone else could do such plugin with : http://www.jqplot.com/tests


There is already such implementation.

https://github.com/hielkehoeve/wiquery-jqplot/wiki


> / 
> or http://code.google.com/p/flot/
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Announce-Introducing-Wicked-Charts-tp4655519p4655574.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: Ajax Link not resolving Wicket 6.4

2013-01-21 Thread Sven Meier

Hi,

>Anyway let me know if you'd like the quickstart that shows the issue 
in 6.4


We have no need for it.

Better create a quickstart for the next issue you'll find.

Thanks
Sven


On 01/21/2013 10:27 AM, Simon B wrote:

Hi Sven,

I just tried 6.5 and that's fixed it!  Thank you very much.

If you still want a quickstart to have a look at the code that demonstrates
the issue in 6.4, then let me know.

As it turned out It wasn't to do with my BookmarkableMapper sub class
although the urls that the mapper handles have two segments e.g.
http://localhost:8080/sale/pedro-moran-agronomia-297919.html

The issue seemed to be in the  UrlRenderer.renderRelativeUrl(Url) method in
Wicket 6.4 which seems to have been updated in 6.5

Anyway the ServletWebResponse (SWR) was creating a fullUrl and also an
encodedFullUrl when a fresh request  from a unknown User Agent happens the
two are different given that the encodedFullUrl contains the sessionId:
e.g

fullUrl:


encocedFullUrl:


As these two differ the SWR object was using the UrlRenderer to create a
"Relative Url" this method took a parsed Url e.g:

and produced the relative url which (in 6.4) had a double slash in it:


Incidentally bookmarkable url for the page that the AjaxButton was on was:

"venta/laprida-recoleta-286358.html"

i.e. it had two segments ["venta", "laprida-recoleta-286358.html"] rather
than just one I'm not sure if this caused the double slash?

Anyway let me know if you'd like the quickstart that shows the issue in 6.4

Thanks very much for fixing it in 6.5,

Cheers

Simon




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Link-not-resolving-Wicket-6-4-tp4655511p4655576.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



Re: Ajax Link not resolving Wicket 6.4

2013-01-21 Thread Simon B
Hi Sven, 

I just tried 6.5 and that's fixed it!  Thank you very much.

If you still want a quickstart to have a look at the code that demonstrates
the issue in 6.4, then let me know.

As it turned out It wasn't to do with my BookmarkableMapper sub class
although the urls that the mapper handles have two segments e.g.
http://localhost:8080/sale/pedro-moran-agronomia-297919.html

The issue seemed to be in the  UrlRenderer.renderRelativeUrl(Url) method in
Wicket 6.4 which seems to have been updated in 6.5

Anyway the ServletWebResponse (SWR) was creating a fullUrl and also an
encodedFullUrl when a fresh request  from a unknown User Agent happens the
two are different given that the encodedFullUrl contains the sessionId: 
e.g

fullUrl: 


encocedFullUrl: 


As these two differ the SWR object was using the UrlRenderer to create a
"Relative Url" this method took a parsed Url e.g: 

and produced the relative url which (in 6.4) had a double slash in it: 


Incidentally bookmarkable url for the page that the AjaxButton was on was: 

"venta/laprida-recoleta-286358.html"

i.e. it had two segments ["venta", "laprida-recoleta-286358.html"] rather
than just one I'm not sure if this caused the double slash?

Anyway let me know if you'd like the quickstart that shows the issue in 6.4

Thanks very much for fixing it in 6.5, 

Cheers

Simon




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Link-not-resolving-Wicket-6-4-tp4655511p4655576.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: Wicket 6+ through JSONP "tunneling"

2013-01-21 Thread MattyDE
Any other ideas to do this with wicket?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-through-JSONP-tunneling-tp4655501p4655575.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: [Announce] Introducing Wicked Charts

2013-01-21 Thread MattyDE
Thanks for your hard work.

But iam very sad that highchart its not free for commercial use :o/

Maybe anyone else could do such plugin with : http://www.jqplot.com/tests/
or http://code.google.com/p/flot/



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Announce-Introducing-Wicked-Charts-tp4655519p4655574.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: Passing IModel in Constructor of bookmarkable Page?

2013-01-21 Thread yka
Well all this page stuff is not related to the topic in this thread.
Please open another thread for that.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-tp4655546p4655570.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: Passing IModel in Constructor of bookmarkable Page?

2013-01-21 Thread Bernard
Hi Martin,

This is great.

Thanks for the quick response.

Bernard

On Mon, 21 Jan 2013 10:57:19 +0200, you wrote:

>You can pass the oldPageId as a request parameter too. Then use it: new
>PageReference(oldPageId.toInt()).getPage()
>
>
>On Mon, Jan 21, 2013 at 10:39 AM, Bernard  wrote:
>
>> Hi Martin,
>>
>> Thanks for the advice. So I will use PageParameters then and let
>> Wicket construct the page.
>>
>> But:
>>
>> I also have page constructors with PageReference parameter to link
>> back to. This would break bookmarkable as well. Would you have similar
>> concerns about PageReference?
>>
>> Kind Regards,
>>
>> Bernard
>>
>>
>> On Mon, 21 Jan 2013 10:05:57 +0200, you wrote:
>>
>> >Hi,
>> >
>> >I think using Page#Page(IModel) constructor is not very useful. It appears
>> >to be anti-pattern lately.
>> >There were several tickets related to ModalWindow when a model is shared
>> >between the page that contains the modal and the page inside the modal.
>> The
>> >two different pages are being serialized with different state of the model
>> >and after deserialization this model is no more the same instance anymore
>> >and the benefit of sharing a model is no more there.
>> >
>> >If you still want to go the way you want then check IPageFactory and its
>> >default impl - DefaultPageFactory.
>> >
>> >
>> >
>> >On Mon, Jan 21, 2013 at 3:45 AM, Bernard  wrote:
>> >
>> >> Hi all
>> >>
>> >> I am searching for a robust pattern to work around
>> >> PageExpiredException.
>> >>
>> >> My first idea was to have all pages bookmarkable and rely on
>> >>
>> >>
>> org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
>> >> to recover.
>> >>
>> >> But this breaks when passing IModel in page constructors because then
>> >> pages are no longer bookmarkable.
>> >>
>> >> Of course avoiding the constructor and letting Wicket create the page
>> >> with PageParameters would solve this problem but I want to avoid this.
>> >>
>> >> It would be very useful to pass an IModel to a bookmarkable Page. How
>> >> can this be done?
>> >>
>> >> I am trying to avoid expiring logout links (the primary driver of all
>> >> this). In case of page expiry I can deal with the exceptional call of
>> >> the default constructor from
>> >> IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
>> >> a bookmarkable page.
>> >>
>> >> 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
>>
>>


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



Re: Passing IModel in Constructor of bookmarkable Page?

2013-01-21 Thread Martin Grigorov
You can pass the oldPageId as a request parameter too. Then use it: new
PageReference(oldPageId.toInt()).getPage()


On Mon, Jan 21, 2013 at 10:39 AM, Bernard  wrote:

> Hi Martin,
>
> Thanks for the advice. So I will use PageParameters then and let
> Wicket construct the page.
>
> But:
>
> I also have page constructors with PageReference parameter to link
> back to. This would break bookmarkable as well. Would you have similar
> concerns about PageReference?
>
> Kind Regards,
>
> Bernard
>
>
> On Mon, 21 Jan 2013 10:05:57 +0200, you wrote:
>
> >Hi,
> >
> >I think using Page#Page(IModel) constructor is not very useful. It appears
> >to be anti-pattern lately.
> >There were several tickets related to ModalWindow when a model is shared
> >between the page that contains the modal and the page inside the modal.
> The
> >two different pages are being serialized with different state of the model
> >and after deserialization this model is no more the same instance anymore
> >and the benefit of sharing a model is no more there.
> >
> >If you still want to go the way you want then check IPageFactory and its
> >default impl - DefaultPageFactory.
> >
> >
> >
> >On Mon, Jan 21, 2013 at 3:45 AM, Bernard  wrote:
> >
> >> Hi all
> >>
> >> I am searching for a robust pattern to work around
> >> PageExpiredException.
> >>
> >> My first idea was to have all pages bookmarkable and rely on
> >>
> >>
> org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
> >> to recover.
> >>
> >> But this breaks when passing IModel in page constructors because then
> >> pages are no longer bookmarkable.
> >>
> >> Of course avoiding the constructor and letting Wicket create the page
> >> with PageParameters would solve this problem but I want to avoid this.
> >>
> >> It would be very useful to pass an IModel to a bookmarkable Page. How
> >> can this be done?
> >>
> >> I am trying to avoid expiring logout links (the primary driver of all
> >> this). In case of page expiry I can deal with the exceptional call of
> >> the default constructor from
> >> IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
> >> a bookmarkable page.
> >>
> >> 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
>
>


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


Re: Passing IModel in Constructor of bookmarkable Page?

2013-01-21 Thread Bernard
Hi Martin,

Thanks for the advice. So I will use PageParameters then and let
Wicket construct the page.

But:

I also have page constructors with PageReference parameter to link
back to. This would break bookmarkable as well. Would you have similar
concerns about PageReference?

Kind Regards,

Bernard


On Mon, 21 Jan 2013 10:05:57 +0200, you wrote:

>Hi,
>
>I think using Page#Page(IModel) constructor is not very useful. It appears
>to be anti-pattern lately.
>There were several tickets related to ModalWindow when a model is shared
>between the page that contains the modal and the page inside the modal. The
>two different pages are being serialized with different state of the model
>and after deserialization this model is no more the same instance anymore
>and the benefit of sharing a model is no more there.
>
>If you still want to go the way you want then check IPageFactory and its
>default impl - DefaultPageFactory.
>
>
>
>On Mon, Jan 21, 2013 at 3:45 AM, Bernard  wrote:
>
>> Hi all
>>
>> I am searching for a robust pattern to work around
>> PageExpiredException.
>>
>> My first idea was to have all pages bookmarkable and rely on
>>
>> org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
>> to recover.
>>
>> But this breaks when passing IModel in page constructors because then
>> pages are no longer bookmarkable.
>>
>> Of course avoiding the constructor and letting Wicket create the page
>> with PageParameters would solve this problem but I want to avoid this.
>>
>> It would be very useful to pass an IModel to a bookmarkable Page. How
>> can this be done?
>>
>> I am trying to avoid expiring logout links (the primary driver of all
>> this). In case of page expiry I can deal with the exceptional call of
>> the default constructor from
>> IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
>> a bookmarkable page.
>>
>> 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: wicket:for attribute definition in xsd

2013-01-21 Thread Martin Grigorov
Hi,

wicket-1.5.xsd defines only the elements - .
wicket:for is an attribute to  element which is part of HTML spec.
Is there a way to define attributes to elements from a different namespace ?
If it is possible then please file a ticket with a patch. The same is valid
for wicket:message when used as an attribute.


On Fri, Jan 18, 2013 at 9:23 PM, Jim Olson  wrote:

> There’s no attribute definition for wicket:for in the xsd of wicket 6.4.0.
>
> Shouldn’t it define this attribute?
>
>
> Thank you
>



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


Re: constructing page multiple times per request

2013-01-21 Thread Martin Grigorov
Hi,

Just put a breakpoint in your constructor and see what are the stacktraces.


On Sun, Jan 20, 2013 at 6:27 PM, kamiseq  wrote:

> hi,
> I try to understand why wicket (in 6th version) is constructing my page
> always 3 times per every request. it is page constructor is called 3 times
> always I navigate to page.
>
> I configured it as
>
> getResourceSettings().setFileCleaner(null);
> getPageSettings().setVersionPagesByDefault(false);
>
> getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.REDIRECT_TO_BUFFER);
>
> unfortunately google cannot find anything on that.
>
> thanks for help
>
> pozdrawiam
> Paweł Kamiński
>
> kami...@gmail.com
> pkaminski@gmail.com
> __
>



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


Re: updateAjaxAttributes has no effect on AutoCompleteBehavior

2013-01-21 Thread Martin Grigorov
Hi,

I don't see why it should not work.
Actually AutoCompleteBehavior itself wont work without this method. It
overrides it to do:
attributes.setWicketAjaxResponse(false);
 attributes.setDataType("html");




On Mon, Jan 21, 2013 at 10:09 AM, james yong  wrote:

> Hi all,
>
> Just to confirm if overriding updateAjaxAttributes has any effect on
> AutoCompleteBehavior?
> I was tryng to do the following but see no popup nor code reflected in the
> html source.
>
> @Override
> protected void updateAjaxAttributes(AjaxRequestAttributes
> attributes) {
> super.updateAjaxAttributes(attributes);
> AjaxCallListener myAjaxCallListener = new AjaxCallListener() {
>
> @Override
> public CharSequence getBeforeHandler(Component component) {
> return "alert('I\'m executed before the firing of the
> Ajax call')";
> }
> };
> List list =
> attributes.getAjaxCallListeners();
> list.add(myAjaxCallListener);
> }
>
> Regards,
> James
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/updateAjaxAttributes-has-no-effect-on-AutoCompleteBehavior-tp4655560.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 


updateAjaxAttributes has no effect on AutoCompleteBehavior

2013-01-21 Thread james yong
Hi all,

Just to confirm if overriding updateAjaxAttributes has any effect on
AutoCompleteBehavior?
I was tryng to do the following but see no popup nor code reflected in the
html source.

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes
attributes) {
super.updateAjaxAttributes(attributes);
AjaxCallListener myAjaxCallListener = new AjaxCallListener() {

@Override 
public CharSequence getBeforeHandler(Component component) { 
return "alert('I\'m executed before the firing of the
Ajax call')"; 
}
};
List list =
attributes.getAjaxCallListeners();
list.add(myAjaxCallListener);
}

Regards,
James



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/updateAjaxAttributes-has-no-effect-on-AutoCompleteBehavior-tp4655560.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: Passing IModel in Constructor of bookmarkable Page?

2013-01-21 Thread Martin Grigorov
Hi,

I think using Page#Page(IModel) constructor is not very useful. It appears
to be anti-pattern lately.
There were several tickets related to ModalWindow when a model is shared
between the page that contains the modal and the page inside the modal. The
two different pages are being serialized with different state of the model
and after deserialization this model is no more the same instance anymore
and the benefit of sharing a model is no more there.

If you still want to go the way you want then check IPageFactory and its
default impl - DefaultPageFactory.



On Mon, Jan 21, 2013 at 3:45 AM, Bernard  wrote:

> Hi all
>
> I am searching for a robust pattern to work around
> PageExpiredException.
>
> My first idea was to have all pages bookmarkable and rely on
>
> org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
> to recover.
>
> But this breaks when passing IModel in page constructors because then
> pages are no longer bookmarkable.
>
> Of course avoiding the constructor and letting Wicket create the page
> with PageParameters would solve this problem but I want to avoid this.
>
> It would be very useful to pass an IModel to a bookmarkable Page. How
> can this be done?
>
> I am trying to avoid expiring logout links (the primary driver of all
> this). In case of page expiry I can deal with the exceptional call of
> the default constructor from
> IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
> a bookmarkable page.
>
> 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