Re: PageExpiredException and PageExpired

2012-03-15 Thread Martin Grigorov
Hi,

Looking at the application from your other post I think the
authorization strategy doesn't allow the showing of PageExpired page.
It checks whether there is signed in user and either shows the
requested page or shows the login page.

On Wed, Mar 14, 2012 at 9:05 PM, Francois Meillet
qq...@gmail.com wrote:
 I have the following settings

 getPageSettings().setRecreateMountedPagesAfterExpiry(false);
 getApplicationSettings().setPageExpiredErrorPage(PageExpired.class);

 I don't get the PageExpired (which is bookmarkable) for PageExpiredException

 Do I forget something ?


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




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

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



Re: setTextEncoding on JavascriptResourceReferences/CssResourceReferences

2012-03-15 Thread Martin Grigorov
Hi,

I also think this is not easy to do at the moment. Please file a ticket.
The only way at the moment I see is to override + copy/paste
org.apache.wicket.request.resource.PackageResourceReference#getResource()
and then override
org.apache.wicket.request.resource.AbstractResource#setResponseHeaders()
for the returned IResource. Not nice at all...

On Wed, Mar 14, 2012 at 5:43 PM, exaptis david.loid...@gmail.com wrote:
 Hi,

 i'm currently dealing with an encoding issue in wicket 1.5.4. When accessing
 js or css files the content-type header information only includes the
 content-type but not the encoding, but all our html files are send with the
 correct content-type header information.
 curl has the following output:

 *curl -I -k
 https://localhost/wicket/resource/com.sample.wicket.resources.js.ResourcesJsScope/sample.js
 *HTTP/1.1 200 OK
 Server: Apache-Coyote/1.1
 Last-Modified: Wed, 14 Mar 2012 09:14:39 GMT
 Date: Wed, 14 Mar 2012 14:46:55 GMT
 Expires: Thu, 14 Mar 2013 14:46:55 GMT
 Cache-Control: public
 Cache-Control: max-age=31536000
 Pragma: cache
 Content-Disposition: inline
 Content-Type: application/javascript
 Content-Length: 1285

 As some of our js and css files are included from different sources we can't
 influence the sites encoding and therefore it's necessary to deliver these
 files with the proper charset in the content-type.

 Content-Type: *application/javascript;charset=UTF8*

 Now i was searching for a solution to solve this problem in wicket. I found
 out that the AbstractResource.ResourceResponse class has a class member
 textEncoding which is used for rendering the header response, but i didn't
 find a way to set it by using the provided Javascript/Css Resources (as they
 are automatically generated by their *ResourceReference classes). This link
 seemed to be good, but doesn't provide a global solution as i'm looking for
 a global setting to set utf-8 for all css/js resources at once.

 http://blog.sonxurxo.com/2011/04/06/setting-character-encoding-for-json-in-apache-wicket/

 The second link I found (and my current solution) is to implement it via a
 spring filter. It seems to work and i'm okay with this solution - but I
 really would like to know how to archive the same effect in wicket?

 http://forum.springsource.org/showthread.php?14063-How-to-set-setCharacterEncoding-on-Request


 Cheers,
 David






 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/setTextEncoding-on-JavascriptResourceReferences-CssResourceReferences-tp4472204p4472204.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



I have to say.....

2012-03-15 Thread mlabs
I've been working with Wicket for about a year now and although the learning
curve is somewhat initially steep .. it really is a great piece of work ..
kudos to the designers...  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/I-have-to-say-tp4474270p4474270.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: I have to say.....

2012-03-15 Thread dhar_ar
Yup I agre; except I think the way messages are shared across fedback panels 
still defies logic. Am sure someone went out of his way to program it that way!
--Original Message--
From: mlabs
To: users@wicket.apache.org
ReplyTo: users@wicket.apache.org
Subject: I have to say.
Sent: Mar 15, 2012 2:27 PM

I've been working with Wicket for about a year now and although the learning
curve is somewhat initially steep .. it really is a great piece of work ..
kudos to the designers...  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/I-have-to-say-tp4474270p4474270.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



Sent from BlackBerry® on Airtel

Re: PageExpiredException and PageExpired

2012-03-15 Thread François Meillet
I found the problem : 

I use a IRequestCycleListener and my onException implementation was buggy.
The ordering of catch-clause was bad !.

Thanks Martin.

François



Le 15 mars 2012 à 08:46, Martin Grigorov a écrit :

 Hi,
 
 Looking at the application from your other post I think the
 authorization strategy doesn't allow the showing of PageExpired page.
 It checks whether there is signed in user and either shows the
 requested page or shows the login page.
 
 On Wed, Mar 14, 2012 at 9:05 PM, Francois Meillet
 qq...@gmail.com wrote:
 I have the following settings
 
 getPageSettings().setRecreateMountedPagesAfterExpiry(false);
 getApplicationSettings().setPageExpiredErrorPage(PageExpired.class);
 
 I don't get the PageExpired (which is bookmarkable) for PageExpiredException
 
 Do I forget something ?
 
 
 François
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


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



PageExpiredErrorPage - httpServletResponse.status

2012-03-15 Thread Francois Meillet
In 6.0-SNAPSHOT

The default implementation of the PageExpiredErrorPage
set the httpServletResponse.status to  HttpServletResponse.SC_NOT_FOUND

Why not HttpServletResponse.SC_GONE ?

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



How to cleanup when plugin/behavior is removed through Ajax?

2012-03-15 Thread Stijn de Witt
Hi. We are using WiQuery in our application to attach some behaviors to some 
components. For example a resize behavior to react on the component being 
resized. I added some debug logging and I see that when we switch panels 
(through Ajax) all event listeners for the components on the new panel are 
added, but the old ones from the panel being replaced are never removed. So the 
list of event handlers just grows and grows...

We register event listeners in the statement method of the WiQuery behavior, 
like this:

public abstract class BaResizeEventBehavior extends WiQueryAbstractBehavior {
  // ...
  @Override public JsStatement statement() {
return new JsQuery(getComponent()).$().chain(resize, new JsScope() {
  @Override public void execute(JsScopeContext aScopeContext) {
// event listener implementation here
  }
});
  }
}

This will generate Javascript code that looks like this:

$('#componentId').resize(function() {
  // event listener implementation here
});

This code will register a jQuery event on the component with id 'componentId'. 
However when this component disappears from the page, I would like this event 
handler to be unbound again, but that does not happen.

Any ideas?

Thanks,

-Stijn

P.S:
This is cross-posted to 
http://groups.google.com/group/wiquery-plugins/browse_thread/thread/aaceac38d60adbcf
 because that group seems to have hardly any traffic... Hopefully one of the 
Wicket gurus here knows a bit about WiQuery as well? Although maybe this 
question can be formulated for Wicket as well as also there when doing Ajax we 
need to clean up after components when they are removed from the page right?


Re: PageExpiredErrorPage - httpServletResponse.status

2012-03-15 Thread Martin Grigorov
This is the case since several versions of Wicket, not just 6.0.
But I think your suggestion is better.
File a ticket please.

On Thu, Mar 15, 2012 at 11:17 AM, Francois Meillet
qq...@gmail.com wrote:
 In 6.0-SNAPSHOT

 The default implementation of the PageExpiredErrorPage
 set the httpServletResponse.status to  HttpServletResponse.SC_NOT_FOUND

 Why not HttpServletResponse.SC_GONE ?

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




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

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



Re: Could not find component after session dies

2012-03-15 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-4454

On Wed, Mar 14, 2012 at 3:49 PM, Francois Meillet
qq...@gmail.com wrote:
 Hi Martin,

 Here is the code (maven project)

 François





 Le 14 mars 2012 à 14:18, Martin Grigorov a écrit :

 2012/3/14 François Meillet fm...@meillet.com:
 Hi Martin,

 Le 14 mars 2012 à 13:50, Martin Grigorov a écrit :

 Hi Francois,

 On Wed, Mar 14, 2012 at 1:51 PM, Francois Meillet
 qq...@gmail.com wrote:
 Release:
 Wicket 6.0-SNAPSHOT

 Good!
 And sorry if I break the APIs from time to time ;-)
 ;-)




 The pages:
 All pages extends a Skeleton, which has a header panel.

 In this header panel, another panel is displayed, depending if the user 
 is logged (ConnectedPanel) or not (HeaderLoginPanel).

 So when a user is not connected, the component's structure is
 Page-HeaderPanel-HeaderLoginPanel
 and when the user is connected, the structure is
 Page-HeaderPanel-ConnectedPanel


 The problem:
 The user logs in and waits until the session die.
 Then when he clicks on link linktest  
 (org.apache.wicket.markup.html.link.Link),  in the ConnectedPanel , the 
 following error appears:

 Could not find component 'HeaderPanel:HeaderLoginPanel:linktest on page 
 'class HomePage

 Question 1
 Why does Wicket try to find linktest in the HeaderLoginPanel  ?
 As Linktest belongs to ConnectedPanel.

 Can you check what is the url in the produced html (view page source).
 It will be even more weird if the link url is correct but later Wicket
 confuses itself somehow.

 Not a good new : the url is
 a wicket:id=linktest 
 href=./?2-1.ILinkListener-HeaderPanel-HeaderLoginPanel-linktestlinktest/a
 The problem is the same with the 1.5.5

 It is a good news for me. That means the problem is somewhere in your code.
 Can you show the code ?




 Question 2
 Why don't I get a PageExpiredException ?

 Try with 
 org.apache.wicket.settings.IPageSettings#setRecreateMountedPagesAfterExpiry(false)


 That works



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




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

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



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




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

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





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



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

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



Re: PageExpiredErrorPage - httpServletResponse.status

2012-03-15 Thread François Meillet
ticket : https://issues.apache.org/jira/browse/WICKET-4455


Le 15 mars 2012 à 10:24, Martin Grigorov a écrit :

 This is the case since several versions of Wicket, not just 6.0.
 But I think your suggestion is better.
 File a ticket please.
 
 On Thu, Mar 15, 2012 at 11:17 AM, Francois Meillet
 qq...@gmail.com wrote:
 In 6.0-SNAPSHOT
 
 The default implementation of the PageExpiredErrorPage
 set the httpServletResponse.status to  HttpServletResponse.SC_NOT_FOUND
 
 Why not HttpServletResponse.SC_GONE ?
 
 François
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


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



Re: Could not find component after session dies

2012-03-15 Thread Francois Meillet
great ! 

Thanks Martin 

Le 15 mars 2012 à 10:43, Martin Grigorov a écrit :

 https://issues.apache.org/jira/browse/WICKET-4454
 
 On Wed, Mar 14, 2012 at 3:49 PM, Francois Meillet
 qq...@gmail.com wrote:
 Hi Martin,
 
 Here is the code (maven project)
 
 François
 
 
 
 
 
 Le 14 mars 2012 à 14:18, Martin Grigorov a écrit :
 
 2012/3/14 François Meillet fm...@meillet.com:
 Hi Martin,
 
 Le 14 mars 2012 à 13:50, Martin Grigorov a écrit :
 
 Hi Francois,
 
 On Wed, Mar 14, 2012 at 1:51 PM, Francois Meillet
 qq...@gmail.com wrote:
 Release:
 Wicket 6.0-SNAPSHOT
 
 Good!
 And sorry if I break the APIs from time to time ;-)
 ;-)
 
 
 
 
 The pages:
 All pages extends a Skeleton, which has a header panel.
 
 In this header panel, another panel is displayed, depending if the user 
 is logged (ConnectedPanel) or not (HeaderLoginPanel).
 
 So when a user is not connected, the component's structure is
 Page-HeaderPanel-HeaderLoginPanel
 and when the user is connected, the structure is
 Page-HeaderPanel-ConnectedPanel
 
 
 The problem:
 The user logs in and waits until the session die.
 Then when he clicks on link linktest  
 (org.apache.wicket.markup.html.link.Link),  in the ConnectedPanel , the 
 following error appears:
 
 Could not find component 'HeaderPanel:HeaderLoginPanel:linktest on page 
 'class HomePage
 
 Question 1
 Why does Wicket try to find linktest in the HeaderLoginPanel  ?
 As Linktest belongs to ConnectedPanel.
 
 Can you check what is the url in the produced html (view page source).
 It will be even more weird if the link url is correct but later Wicket
 confuses itself somehow.
 
 Not a good new : the url is
 a wicket:id=linktest 
 href=./?2-1.ILinkListener-HeaderPanel-HeaderLoginPanel-linktestlinktest/a
 The problem is the same with the 1.5.5
 
 It is a good news for me. That means the problem is somewhere in your code.
 Can you show the code ?
 
 
 
 
 Question 2
 Why don't I get a PageExpiredException ?
 
 Try with 
 org.apache.wicket.settings.IPageSettings#setRecreateMountedPagesAfterExpiry(false)
 
 
 That works
 
 
 
 François
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Language setting from browser

2012-03-15 Thread mukesh kumar
Hi,
   In my wicket application, when i change the language from browser , than
after refresh (F5) the page, than my language have not be changed. It is
changes, when we first logout the application than login. 
 But according to my project requirement, i want to change my
language when refresh the page after language change.
  So, please give me kindly reply ASAP. I am working on
wicket 1.5.3 versions.

 Thanks !

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Language-setting-from-browser-tp4474740p4474740.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: Language setting from browser

2012-03-15 Thread Martin Grigorov
Hi,

The Session's locale is set when the Session is constructed.
After that you can change it with Session#setLocale(getRequest().getLocale())

On Thu, Mar 15, 2012 at 2:22 PM, mukesh kumar
mukesh.verma1...@gmail.com wrote:
 Hi,
   In my wicket application, when i change the language from browser , than
 after refresh (F5) the page, than my language have not be changed. It is
 changes, when we first logout the application than login.
             But according to my project requirement, i want to change my
 language when refresh the page after language change.
                  So, please give me kindly reply ASAP. I am working on
 wicket 1.5.3 versions.

  Thanks !

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Language-setting-from-browser-tp4474740p4474740.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: How to cleanup when plugin/behavior is removed through Ajax?

2012-03-15 Thread Martin Grigorov
Hi,

AFAIK jQuery unbinds all registered event listeners for a DOM element
when this element is removed with jQuery method like #remove(),
#replaceWith(), etc.
But I'm not sure this is the case when you remove a parent element of
an element with event listeners. Better ask in jQuery forums.

On Thu, Mar 15, 2012 at 11:22 AM, Stijn de Witt
stijn.dew...@planonsoftware.com wrote:
 Hi. We are using WiQuery in our application to attach some behaviors to some 
 components. For example a resize behavior to react on the component being 
 resized. I added some debug logging and I see that when we switch panels 
 (through Ajax) all event listeners for the components on the new panel are 
 added, but the old ones from the panel being replaced are never removed. So 
 the list of event handlers just grows and grows...

 We register event listeners in the statement method of the WiQuery behavior, 
 like this:

 public abstract class BaResizeEventBehavior extends WiQueryAbstractBehavior {
  // ...
  @Override public JsStatement statement() {
    return new JsQuery(getComponent()).$().chain(resize, new JsScope() {
      @Override public void execute(JsScopeContext aScopeContext) {
        // event listener implementation here
      }
    });
  }
 }

 This will generate Javascript code that looks like this:

 $('#componentId').resize(function() {
  // event listener implementation here
 });

 This code will register a jQuery event on the component with id 
 'componentId'. However when this component disappears from the page, I would 
 like this event handler to be unbound again, but that does not happen.

 Any ideas?

 Thanks,

 -Stijn

 P.S:
 This is cross-posted to 
 http://groups.google.com/group/wiquery-plugins/browse_thread/thread/aaceac38d60adbcf
  because that group seems to have hardly any traffic... Hopefully one of the 
 Wicket gurus here knows a bit about WiQuery as well? Although maybe this 
 question can be formulated for Wicket as well as also there when doing Ajax 
 we need to clean up after components when they are removed from the page 
 right?



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

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



RE: How to cleanup when plugin/behavior is removed through Ajax?

2012-03-15 Thread Stijn de Witt
Hi Martin, thanks for your quick response!

 AFAIK jQuery unbinds all registered event listeners for a DOM element when 
 this element is removed with jQuery method like #remove(), #replaceWith(), 
 etc.

I think so too... However I am not sure that that is indeed the way that Wicket 
removes components that are replaced by an Ajax request? I think Wicket relies 
on their own code that they based on Prototype JS ? 

 Better ask in jQuery forums.

I am not sure if that is the right place. Seems to me that Wicket is doing the 
inserting / removing of the components for the page. The statement() method 
lets me hook into the insertion phase to add my own listeners (be it with 
jQuery or any other framework) so it seems to me there should also be a 
corresponding method for the removing phase where you can unhook/unbind events 
etc... 

-Stijn


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: donderdag 15 maart 2012 13:32
To: users@wicket.apache.org
Subject: Re: How to cleanup when plugin/behavior is removed through Ajax?

Hi,

AFAIK jQuery unbinds all registered event listeners for a DOM element when this 
element is removed with jQuery method like #remove(), #replaceWith(), etc.
But I'm not sure this is the case when you remove a parent element of an 
element with event listeners. Better ask in jQuery forums.

On Thu, Mar 15, 2012 at 11:22 AM, Stijn de Witt 
stijn.dew...@planonsoftware.com wrote:
 Hi. We are using WiQuery in our application to attach some behaviors to some 
 components. For example a resize behavior to react on the component being 
 resized. I added some debug logging and I see that when we switch panels 
 (through Ajax) all event listeners for the components on the new panel are 
 added, but the old ones from the panel being replaced are never removed. So 
 the list of event handlers just grows and grows...

 We register event listeners in the statement method of the WiQuery behavior, 
 like this:

 public abstract class BaResizeEventBehavior extends 
 WiQueryAbstractBehavior {
  // ...
  @Override public JsStatement statement() {
    return new JsQuery(getComponent()).$().chain(resize, new 
 JsScope() {
      @Override public void execute(JsScopeContext aScopeContext) {
        // event listener implementation here
      }
    });
  }
 }

 This will generate Javascript code that looks like this:

 $('#componentId').resize(function() {
  // event listener implementation here });

 This code will register a jQuery event on the component with id 
 'componentId'. However when this component disappears from the page, I would 
 like this event handler to be unbound again, but that does not happen.

 Any ideas?

 Thanks,

 -Stijn

 P.S:
 This is cross-posted to 
 http://groups.google.com/group/wiquery-plugins/browse_thread/thread/aaceac38d60adbcf
  because that group seems to have hardly any traffic... Hopefully one of the 
 Wicket gurus here knows a bit about WiQuery as well? Although maybe this 
 question can be formulated for Wicket as well as also there when doing Ajax 
 we need to clean up after components when they are removed from the page 
 right?



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

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


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



Re: How to cleanup when plugin/behavior is removed through Ajax?

2012-03-15 Thread Martin Grigorov
On Thu, Mar 15, 2012 at 2:51 PM, Stijn de Witt
stijn.dew...@planonsoftware.com wrote:
 Hi Martin, thanks for your quick response!

 AFAIK jQuery unbinds all registered event listeners for a DOM element when 
 this element is removed with jQuery method like #remove(), #replaceWith(), 
 etc.

 I think so too... However I am not sure that that is indeed the way that 
 Wicket removes components that are replaced by an Ajax request? I think 
 Wicket relies on their own code that they based on Prototype JS ?

No. Including version 1.5 Wicket uses its own JavaScript code to do
this (see wicket-ajax.js #replaceOuterHtml()).
In Wicket 6.0 jQuery is used behind the scenes and this method is
implemented with: jQuery(oldElement).after(newElementHtml.remove().

If upgrading to Wicket 6.0-SNAPSHOT is not an option for you then you
can use monkey patching approach to override the old impl in 1.5


 Better ask in jQuery forums.

 I am not sure if that is the right place. Seems to me that Wicket is doing 
 the inserting / removing of the components for the page. The statement() 
 method lets me hook into the insertion phase to add my own listeners (be it 
 with jQuery or any other framework) so it seems to me there should also be a 
 corresponding method for the removing phase where you can unhook/unbind 
 events etc...

 -Stijn


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: donderdag 15 maart 2012 13:32
 To: users@wicket.apache.org
 Subject: Re: How to cleanup when plugin/behavior is removed through Ajax?

 Hi,

 AFAIK jQuery unbinds all registered event listeners for a DOM element when 
 this element is removed with jQuery method like #remove(), #replaceWith(), 
 etc.
 But I'm not sure this is the case when you remove a parent element of an 
 element with event listeners. Better ask in jQuery forums.

 On Thu, Mar 15, 2012 at 11:22 AM, Stijn de Witt 
 stijn.dew...@planonsoftware.com wrote:
 Hi. We are using WiQuery in our application to attach some behaviors to some 
 components. For example a resize behavior to react on the component being 
 resized. I added some debug logging and I see that when we switch panels 
 (through Ajax) all event listeners for the components on the new panel are 
 added, but the old ones from the panel being replaced are never removed. So 
 the list of event handlers just grows and grows...

 We register event listeners in the statement method of the WiQuery behavior, 
 like this:

 public abstract class BaResizeEventBehavior extends
 WiQueryAbstractBehavior {
  // ...
  @Override public JsStatement statement() {
    return new JsQuery(getComponent()).$().chain(resize, new
 JsScope() {
      @Override public void execute(JsScopeContext aScopeContext) {
        // event listener implementation here
      }
    });
  }
 }

 This will generate Javascript code that looks like this:

 $('#componentId').resize(function() {
  // event listener implementation here });

 This code will register a jQuery event on the component with id 
 'componentId'. However when this component disappears from the page, I would 
 like this event handler to be unbound again, but that does not happen.

 Any ideas?

 Thanks,

 -Stijn

 P.S:
 This is cross-posted to 
 http://groups.google.com/group/wiquery-plugins/browse_thread/thread/aaceac38d60adbcf
  because that group seems to have hardly any traffic... Hopefully one of the 
 Wicket gurus here knows a bit about WiQuery as well? Although maybe this 
 question can be formulated for Wicket as well as also there when doing Ajax 
 we need to clean up after components when they are removed from the page 
 right?



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

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


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




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

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



Re: Language setting from browser

2012-03-15 Thread Thomas Götz
From the JavaDoc of org.apache.wicket.Session:

* libLocale /b- A session has a Locale property to support localization. 
The Locale for a
* session can be set by calling {@link Session#setLocale(Locale)}. The Locale 
for a Session
* determines how localized resources are found and loaded.

Cheers,
   -Tom

mukesh kumar wrote:

 Hi,
   In my wicket application, when i change the language from browser , than
 after refresh (F5) the page, than my language have not be changed. It is
 changes, when we first logout the application than login. 
 But according to my project requirement, i want to change my
 language when refresh the page after language change.
  So, please give me kindly reply ASAP. I am working on
 wicket 1.5.3 versions.
 
 Thanks !
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Language-setting-from-browser-tp4474740p4474740.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: How to cleanup when plugin/behavior is removed through Ajax?

2012-03-15 Thread Stijn de Witt
We are still at Wicket 1.4 even...

However, presumably there is a method one can implement to respond to the 
removal of components as well as the adding?

Upgrading to a snapshot is probably not allowed by my company policy and I'd 
rather not modify Wicket itself... But surely others must have found a way to 
remove events bound to components? Seems like fundamental stuff.

-Stijn


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: donderdag 15 maart 2012 13:59
To: users@wicket.apache.org
Subject: Re: How to cleanup when plugin/behavior is removed through Ajax?

On Thu, Mar 15, 2012 at 2:51 PM, Stijn de Witt 
stijn.dew...@planonsoftware.com wrote:
 Hi Martin, thanks for your quick response!

 AFAIK jQuery unbinds all registered event listeners for a DOM element when 
 this element is removed with jQuery method like #remove(), #replaceWith(), 
 etc.

 I think so too... However I am not sure that that is indeed the way that 
 Wicket removes components that are replaced by an Ajax request? I think 
 Wicket relies on their own code that they based on Prototype JS ?

No. Including version 1.5 Wicket uses its own JavaScript code to do this (see 
wicket-ajax.js #replaceOuterHtml()).
In Wicket 6.0 jQuery is used behind the scenes and this method is implemented 
with: jQuery(oldElement).after(newElementHtml.remove().

If upgrading to Wicket 6.0-SNAPSHOT is not an option for you then you can use 
monkey patching approach to override the old impl in 1.5


 Better ask in jQuery forums.

 I am not sure if that is the right place. Seems to me that Wicket is doing 
 the inserting / removing of the components for the page. The statement() 
 method lets me hook into the insertion phase to add my own listeners (be it 
 with jQuery or any other framework) so it seems to me there should also be a 
 corresponding method for the removing phase where you can unhook/unbind 
 events etc...

 -Stijn


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: donderdag 15 maart 2012 13:32
 To: users@wicket.apache.org
 Subject: Re: How to cleanup when plugin/behavior is removed through Ajax?

 Hi,

 AFAIK jQuery unbinds all registered event listeners for a DOM element when 
 this element is removed with jQuery method like #remove(), #replaceWith(), 
 etc.
 But I'm not sure this is the case when you remove a parent element of an 
 element with event listeners. Better ask in jQuery forums.

 On Thu, Mar 15, 2012 at 11:22 AM, Stijn de Witt 
 stijn.dew...@planonsoftware.com wrote:
 Hi. We are using WiQuery in our application to attach some behaviors to some 
 components. For example a resize behavior to react on the component being 
 resized. I added some debug logging and I see that when we switch panels 
 (through Ajax) all event listeners for the components on the new panel are 
 added, but the old ones from the panel being replaced are never removed. So 
 the list of event handlers just grows and grows...

 We register event listeners in the statement method of the WiQuery behavior, 
 like this:

 public abstract class BaResizeEventBehavior extends 
 WiQueryAbstractBehavior {
  // ...
  @Override public JsStatement statement() {
    return new JsQuery(getComponent()).$().chain(resize, new
 JsScope() {
      @Override public void execute(JsScopeContext aScopeContext) {
        // event listener implementation here
      }
    });
  }
 }

 This will generate Javascript code that looks like this:

 $('#componentId').resize(function() {
  // event listener implementation here });

 This code will register a jQuery event on the component with id 
 'componentId'. However when this component disappears from the page, I would 
 like this event handler to be unbound again, but that does not happen.

 Any ideas?

 Thanks,

 -Stijn

 P.S:
 This is cross-posted to 
 http://groups.google.com/group/wiquery-plugins/browse_thread/thread/aaceac38d60adbcf
  because that group seems to have hardly any traffic... Hopefully one of the 
 Wicket gurus here knows a bit about WiQuery as well? Although maybe this 
 question can be formulated for Wicket as well as also there when doing Ajax 
 we need to clean up after components when they are removed from the page 
 right?



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

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


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




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

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

Re: How to cleanup when plugin/behavior is removed through Ajax?

2012-03-15 Thread Martin Grigorov
With 1.5 Wicket sends notifications before removing and after adding an element.
See test Wicket.DOM.replace - test event notifications at
http://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=blob_plain;f=wicket-core/src/test/js/dom.js;hb=master
for an example.
But you need to upgrade to 1.5 ...

On Thu, Mar 15, 2012 at 3:05 PM, Stijn de Witt
stijn.dew...@planonsoftware.com wrote:
 We are still at Wicket 1.4 even...

 However, presumably there is a method one can implement to respond to the 
 removal of components as well as the adding?

 Upgrading to a snapshot is probably not allowed by my company policy and I'd 
 rather not modify Wicket itself... But surely others must have found a way to 
 remove events bound to components? Seems like fundamental stuff.

 -Stijn


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: donderdag 15 maart 2012 13:59
 To: users@wicket.apache.org
 Subject: Re: How to cleanup when plugin/behavior is removed through Ajax?

 On Thu, Mar 15, 2012 at 2:51 PM, Stijn de Witt 
 stijn.dew...@planonsoftware.com wrote:
 Hi Martin, thanks for your quick response!

 AFAIK jQuery unbinds all registered event listeners for a DOM element when 
 this element is removed with jQuery method like #remove(), #replaceWith(), 
 etc.

 I think so too... However I am not sure that that is indeed the way that 
 Wicket removes components that are replaced by an Ajax request? I think 
 Wicket relies on their own code that they based on Prototype JS ?

 No. Including version 1.5 Wicket uses its own JavaScript code to do this (see 
 wicket-ajax.js #replaceOuterHtml()).
 In Wicket 6.0 jQuery is used behind the scenes and this method is implemented 
 with: jQuery(oldElement).after(newElementHtml.remove().

 If upgrading to Wicket 6.0-SNAPSHOT is not an option for you then you can use 
 monkey patching approach to override the old impl in 1.5


 Better ask in jQuery forums.

 I am not sure if that is the right place. Seems to me that Wicket is doing 
 the inserting / removing of the components for the page. The statement() 
 method lets me hook into the insertion phase to add my own listeners (be it 
 with jQuery or any other framework) so it seems to me there should also be a 
 corresponding method for the removing phase where you can unhook/unbind 
 events etc...

 -Stijn


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: donderdag 15 maart 2012 13:32
 To: users@wicket.apache.org
 Subject: Re: How to cleanup when plugin/behavior is removed through Ajax?

 Hi,

 AFAIK jQuery unbinds all registered event listeners for a DOM element when 
 this element is removed with jQuery method like #remove(), #replaceWith(), 
 etc.
 But I'm not sure this is the case when you remove a parent element of an 
 element with event listeners. Better ask in jQuery forums.

 On Thu, Mar 15, 2012 at 11:22 AM, Stijn de Witt 
 stijn.dew...@planonsoftware.com wrote:
 Hi. We are using WiQuery in our application to attach some behaviors to 
 some components. For example a resize behavior to react on the component 
 being resized. I added some debug logging and I see that when we switch 
 panels (through Ajax) all event listeners for the components on the new 
 panel are added, but the old ones from the panel being replaced are never 
 removed. So the list of event handlers just grows and grows...

 We register event listeners in the statement method of the WiQuery 
 behavior, like this:

 public abstract class BaResizeEventBehavior extends
 WiQueryAbstractBehavior {
  // ...
  @Override public JsStatement statement() {
    return new JsQuery(getComponent()).$().chain(resize, new
 JsScope() {
      @Override public void execute(JsScopeContext aScopeContext) {
        // event listener implementation here
      }
    });
  }
 }

 This will generate Javascript code that looks like this:

 $('#componentId').resize(function() {
  // event listener implementation here });

 This code will register a jQuery event on the component with id 
 'componentId'. However when this component disappears from the page, I 
 would like this event handler to be unbound again, but that does not happen.

 Any ideas?

 Thanks,

 -Stijn

 P.S:
 This is cross-posted to 
 http://groups.google.com/group/wiquery-plugins/browse_thread/thread/aaceac38d60adbcf
  because that group seems to have hardly any traffic... Hopefully one of 
 the Wicket gurus here knows a bit about WiQuery as well? Although maybe 
 this question can be formulated for Wicket as well as also there when doing 
 Ajax we need to clean up after components when they are removed from the 
 page right?



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

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


 

WicketTester.startPanel is returning DummyHomePage instead of DummyPanelPage

2012-03-15 Thread albgentius
I have a Panel that has a form and inside that inner form there is another
panel with another internal form.
Before I used to have only the inner panel with the form and all wicket
tests were running fine.
Once I simply refactored that form to get a few buttons out of it so we
could re-use the internal panel with the form and modified the test
accordingly, I am not getting anymore a DummyPanelPage but a DummyHomePage
instead.

I thought a WicketTester.startPanel always returns a DummyPanelPage.

Any insight or any direction is highly appreciated.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-startPanel-is-returning-DummyHomePage-instead-of-DummyPanelPage-tp4475046p4475046.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: WicketTester.startPanel is returning DummyHomePage instead of DummyPanelPage

2012-03-15 Thread Martin Grigorov
Hi,

Direction: upgrade to Wicket 1.5 and use #startComponentInPage()
(#startPanel() is deprecated and delegates to the new method).
Even if this is broken in 1.4.x it wont be fixed. 1.4.x goes will
receive only security fixes from now on.

On Thu, Mar 15, 2012 at 3:56 PM, albgentius genti.t...@gmail.com wrote:
 I have a Panel that has a form and inside that inner form there is another
 panel with another internal form.
 Before I used to have only the inner panel with the form and all wicket
 tests were running fine.
 Once I simply refactored that form to get a few buttons out of it so we
 could re-use the internal panel with the form and modified the test
 accordingly, I am not getting anymore a DummyPanelPage but a DummyHomePage
 instead.

 I thought a WicketTester.startPanel always returns a DummyPanelPage.

 Any insight or any direction is highly appreciated.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/WicketTester-startPanel-is-returning-DummyHomePage-instead-of-DummyPanelPage-tp4475046p4475046.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: WicketTester.startPanel is returning DummyHomePage instead of DummyPanelPage

2012-03-15 Thread albgentius
We will probably upgrade sometime soon but probably not right now.

At the moment we're still using 1.4.18.

Thank you, 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-startPanel-is-returning-DummyHomePage-instead-of-DummyPanelPage-tp4475046p4475192.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: setTextEncoding on JavascriptResourceReferences/CssResourceReferences

2012-03-15 Thread exaptis
Hi Martin,

thank you for your reply. Followed your advise, and filled a ticket:
https://issues.apache.org/jira/browse/WICKET-4457

Cheers,
David

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setTextEncoding-on-JavascriptResourceReferences-CssResourceReferences-tp4472204p4475232.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



Wicket 1.5.4 setResponsesPage() removing port from URL

2012-03-15 Thread relong
All,

In Wicket 1.5.4, when I have a redirect using setResponsePage() on my test
Jetty server, the URL changes from localhost:8080/myapp to localhost/myapp,
which breaks things, obviously.

Here's a code snippet as an example of redirection:

In my Login.class file:

public void onSubmit(){
  doing stuff, like checking LDAP for login credentials...

  RequestCycle.get().setResponsePage(new
RequestForm(username.getModelObject()));
}

Any reason why it removes the port from the URL? It didn't do this in
1.4.19. How should I fix this for 1.5?

Thanks!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-4-setResponsesPage-removing-port-from-URL-tp4475303p4475303.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 1.5.4 setResponsesPage() removing port from URL

2012-03-15 Thread Martin Grigorov
Hi,

There is something in your code.
Wicket generates relative paths for the redirects and the port is not
touched at all.

The port is touched only if HttpsMapper is used.

If you think it is problem in Wicket then create a quickstart app that
reproduces the problem and attach it to Jira.

On Thu, Mar 15, 2012 at 5:15 PM, relong topdog...@hotmail.com wrote:
 All,

 In Wicket 1.5.4, when I have a redirect using setResponsePage() on my test
 Jetty server, the URL changes from localhost:8080/myapp to localhost/myapp,
 which breaks things, obviously.

 Here's a code snippet as an example of redirection:

 In my Login.class file:

 public void onSubmit(){
  doing stuff, like checking LDAP for login credentials...

  RequestCycle.get().setResponsePage(new
 RequestForm(username.getModelObject()));
 }

 Any reason why it removes the port from the URL? It didn't do this in
 1.4.19. How should I fix this for 1.5?

 Thanks!



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-4-setResponsesPage-removing-port-from-URL-tp4475303p4475303.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: GAE and file uploads

2012-03-15 Thread Chris Merrill
Ahhh - 'pull' is a Git term.  We're a subversion shop, so I know just enough
Git to be dangerous...perhaps even less.

FWIW, I have the file upload code updated for Wicket 1.5 and seems to be
working. Hopefully I'll get some time after our release to submit Mr Ashr's
code to GAE Initializer.  He offered it to be added to Wicket, but I feel
I need to try to get in contact with him and have him submit the code, to
ensure the licensing is handled correctly.

Chris



On 3/10/2012 9:28 AM, Martin Grigorov wrote:
 Hi Chris,
 
 GAE initializer is part of WicketStuff which is hosted at github.com:
 https://github.com/wicketstuff/core/
 See http://help.github.com/send-pull-requests/
 
 On Thu, Mar 8, 2012 at 7:53 PM, Chris Merrill ch...@webperformance.com 
 wrote:
 On 3/8/2012 11:55 AM, Martin Grigorov wrote:
 I'm glad you find gae-initializer project useful!
 Your can make a pull request with the upgraded to 1.5 code so other
 people can gain from it too.

 What is a pull request?  Is it a different kind of file upload?


 --
  -
 Chris Merrill   |  Web Performance, Inc.
 ch...@webperformance.com|  http://webperformance.com
 919-433-1762|  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

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

 
 
 


-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



Re: GAE and file uploads

2012-03-15 Thread Martin Grigorov
Cool!
If you don't want to bother with Git then just paste your code in the
issue tracker at https://github.com/wicketstuff/core/issues (when all
licensing is OK)

On Thu, Mar 15, 2012 at 5:25 PM, Chris Merrill ch...@webperformance.com wrote:
 Ahhh - 'pull' is a Git term.  We're a subversion shop, so I know just enough
 Git to be dangerous...perhaps even less.

 FWIW, I have the file upload code updated for Wicket 1.5 and seems to be
 working. Hopefully I'll get some time after our release to submit Mr Ashr's
 code to GAE Initializer.  He offered it to be added to Wicket, but I feel
 I need to try to get in contact with him and have him submit the code, to
 ensure the licensing is handled correctly.

 Chris



 On 3/10/2012 9:28 AM, Martin Grigorov wrote:
 Hi Chris,

 GAE initializer is part of WicketStuff which is hosted at github.com:
 https://github.com/wicketstuff/core/
 See http://help.github.com/send-pull-requests/

 On Thu, Mar 8, 2012 at 7:53 PM, Chris Merrill ch...@webperformance.com 
 wrote:
 On 3/8/2012 11:55 AM, Martin Grigorov wrote:
 I'm glad you find gae-initializer project useful!
 Your can make a pull request with the upgraded to 1.5 code so other
 people can gain from it too.

 What is a pull request?  Is it a different kind of file upload?


 --
  -
 Chris Merrill                           |  Web Performance, Inc.
 ch...@webperformance.com                |  http://webperformance.com
 919-433-1762                            |  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

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






 --
  -
 Chris Merrill                           |  Web Performance, Inc.
 ch...@webperformance.com                |  http://webperformance.com
 919-433-1762                            |  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

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




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

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



Help required on Spring integration

2012-03-15 Thread Maaz Muqri
Hi everyone,

I am new to Wicket. I am currently working towards kick starting a project
(Enterprise Application) which will use wicket-spring-hibernate. Could
someone please share any experiences you have on integrating the Wicket
framework with Spring. Any other resources and links are most welcome.
Thanks in advance.

Cheers!

Maaz


ResourceStreamResource ignoring content-type of the ResourceStream

2012-03-15 Thread Chris Merrill
We ran into a puzzling bug in our app, that we eventually traced
down to this code in ResourceStreamResource:

if (fileName != null  Application.exists())
{
contentType = Application.get().getMimeType(fileName);
}
else
{
contentType = stream.getContentType();
}

This seems to conflict with the javadocs for IResourceStream.getContentType(),
which says:

 * @return The mime type of this resource, such as image/jpeg or text/html. 
Return null to
 * let {@link ResourceStreamRequestHandler} handle the Content-Type 
automatically

The result is that if we create a ResourceStreamRequestHandler and give
it a filename in the constructor, it always ignores 
IResourceStream.getContentType().
We've been able to work around this another way, but I wanted to understand if 
we
are using these incorrectly or if this is a bug (either code or documentation)?

TIA!
Chris

-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



Re: ResourceStreamResource ignoring content-type of the ResourceStream

2012-03-15 Thread Martin Grigorov
As simple as: upgrade to 1.5.5 ;-)

On Thu, Mar 15, 2012 at 5:44 PM, Chris Merrill ch...@webperformance.com wrote:
 We ran into a puzzling bug in our app, that we eventually traced
 down to this code in ResourceStreamResource:

        if (fileName != null  Application.exists())
        {
                contentType = Application.get().getMimeType(fileName);
        }
        else
        {
                contentType = stream.getContentType();
        }

 This seems to conflict with the javadocs for IResourceStream.getContentType(),
 which says:

  * @return The mime type of this resource, such as image/jpeg or 
 text/html. Return null to
  *         let {@link ResourceStreamRequestHandler} handle the Content-Type 
 automatically

 The result is that if we create a ResourceStreamRequestHandler and give
 it a filename in the constructor, it always ignores 
 IResourceStream.getContentType().
 We've been able to work around this another way, but I wanted to understand 
 if we
 are using these incorrectly or if this is a bug (either code or 
 documentation)?

 TIA!
 Chris

 --
  -
 Chris Merrill                           |  Web Performance, Inc.
 ch...@webperformance.com                |  http://webperformance.com
 919-433-1762                            |  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

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




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

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



RE: Help required on Spring integration

2012-03-15 Thread Michal Wegrzyn
Hi Maaz,

Check wiki:

http://cwiki.apache.org/WICKET/spring.html

Recently sample quickstart integration project has been posted on the list, 
maybe you will find it useful:

http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Boilerplate-td4433541.html

Best regards,
Michal Wegrzyn


 -Original Message-
 From: Maaz Muqri [mailto:maazbinmu...@gmail.com]
 Sent: Thursday, March 15, 2012 16:39
 To: users@wicket.apache.org
 Subject: Help required on Spring integration
 
 Hi everyone,
 
 I am new to Wicket. I am currently working towards kick starting a
 project (Enterprise Application) which will use wicket-spring-
 hibernate. Could someone please share any experiences you have on
 integrating the Wicket framework with Spring. Any other resources and
 links are most welcome.
 Thanks in advance.
 
 Cheers!
 
 Maaz

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



Problem with yui dragdrop on IE

2012-03-15 Thread felix79
Hello

I try to use YUI drag and drop wicket integration, it works perfectly on
Firefox but I get a problem with IE8.
Trying to debug the problem, I see that
YuiDDListViewPanel.onAjaxUpdate(AjaxRequestTarget target) is not called with
IE
If I try to compare the ajax request made by IE and Firefox I see one
difference that cause the problem : the parameter doi is set to 0 while it
has a correct value with Firefox (id1) :

parameters={idx=0,random=0.06608346869365011,doi=0}
instead of
parameters={idx=0,random=0.3958769380539007,doi=id1}

I don't know enough ajax to go further, can somebody help ? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-yui-drag-drop-on-IE-tp4475634p4475634.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



Problem with yui dragdrop on IE

2012-03-15 Thread felix79
Hello

I try to use YUI drag and drop wicket integration, it works perfectly on
Firefox but I get a problem with IE8.
Trying to debug the problem, I see that
YuiDDListViewPanel.onAjaxUpdate(AjaxRequestTarget target) is not called with
IE
If I try to compare the ajax request made by IE and Firefox I see one
difference that cause the problem : the parameter doi is set to 0 while it
has a correct value with Firefox (id1) :

parameters={idx=0,random=0.06608346869365011,doi=0}
instead of
parameters={idx=0,random=0.3958769380539007,doi=id1}

I don't know enough ajax to go further, can somebody help ? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-yui-drag-drop-on-IE-tp4475648p4475648.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: Help required on Spring integration

2012-03-15 Thread Vytautas R.
Hi
 also you might be interested in xaloon archetype for spring + jpa2 +
wicket + spring security [1]

[1] http://www.xaloon.org/blog/admin/xaloon_1.5.0_final_version_is_released
section 3.1.1


On Thu, Mar 15, 2012 at 5:53 PM, Michal Wegrzyn michal.wegr...@onior.comwrote:

 Hi Maaz,

 Check wiki:

 http://cwiki.apache.org/WICKET/spring.html

 Recently sample quickstart integration project has been posted on the
 list, maybe you will find it useful:


 http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Boilerplate-td4433541.html

 Best regards,
 Michal Wegrzyn


  -Original Message-
  From: Maaz Muqri [mailto:maazbinmu...@gmail.com]
  Sent: Thursday, March 15, 2012 16:39
  To: users@wicket.apache.org
  Subject: Help required on Spring integration
 
  Hi everyone,
 
  I am new to Wicket. I am currently working towards kick starting a
  project (Enterprise Application) which will use wicket-spring-
  hibernate. Could someone please share any experiences you have on
  integrating the Wicket framework with Spring. Any other resources and
  links are most welcome.
  Thanks in advance.
 
  Cheers!
 
  Maaz

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




-- 
Best regards,
Vytautas R.
---
www.xaloon.org
www.allcarindex.com


Re: Wicket 1.5.4 setResponsesPage() removing port from URL

2012-03-15 Thread relong
HttpsMapper was the culprit. I have now set it to only be used when in
production, not development. It works as expected now.

Thanks!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-4-setResponsesPage-removing-port-from-URL-tp4475303p4475684.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



Page/Session persistence on AppEngine

2012-03-15 Thread Chris Merrill
So I've got a problem with my sessions getting too big on AppEngine. I've 
already
done some of the more obvious optimizations, but before going further, I'd like
to get some insight into how many pages are being stored in the page map and
how big they are.

I traversed down into PageStoreManager and found where the pages are serialized
in PageStoreManager.SessionEntry.writeObject() and think that I can put some
diagnostics in there to illuminate the situation.

However, I don't know how to convince GAE and/or Wicket to store the session
to persistent storage in the AppEngine development environment (or in Wicket?).

Can anyone point me in the right direction?  Perhaps somewhere I can read up
on the right parts of the mechanism?  I'm not even sure what keywords I should
be searching on...or if this is an AppEngine or Wicket topic...or both?

TIA!
Chris


-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



Re: ResourceStreamResource ignoring content-type of the ResourceStream

2012-03-15 Thread Chris Merrill
On 3/15/2012 11:47 AM, Martin Grigorov wrote:
 As simple as: upgrade to 1.5.5 ;-)

Doh!  My co-worker is going to love this.  He told me to upgrade before asking
this question  :(   Though he pointed me at 1.5.4  :

Thanks!


 On Thu, Mar 15, 2012 at 5:44 PM, Chris Merrill ch...@webperformance.com 
 wrote:
 We ran into a puzzling bug in our app, that we eventually traced
 down to this code in ResourceStreamResource:

if (fileName != null  Application.exists())
{
contentType = Application.get().getMimeType(fileName);
}
else
{
contentType = stream.getContentType();
}

 This seems to conflict with the javadocs for 
 IResourceStream.getContentType(),
 which says:

  * @return The mime type of this resource, such as image/jpeg or 
 text/html. Return null to
  * let {@link ResourceStreamRequestHandler} handle the Content-Type 
 automatically

 The result is that if we create a ResourceStreamRequestHandler and give
 it a filename in the constructor, it always ignores 
 IResourceStream.getContentType().
 We've been able to work around this another way, but I wanted to understand 
 if we
 are using these incorrectly or if this is a bug (either code or 
 documentation)?

 TIA!
 Chris

 --
  -
 Chris Merrill   |  Web Performance, Inc.
 ch...@webperformance.com|  http://webperformance.com
 919-433-1762|  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

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

 
 
 


-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



URL in css problem

2012-03-15 Thread grazia
I have a mouseovermenu.css file that includes references to images as below: 

.mouseovermenuitem .item_itembody .item_itemdetail .icon_page
{
background:transparent URL(../images/mouseovermenu/page.gif) no-repeat 
top
left;
}

I have added the mouseovermenu.css as a shared resource in
myApplication.init as follows:

getSharedResources().add(cssmouseover, new
ContextRelativeResource(/css/mouseovermenu.css));
  
Then, I have included that resource in a page header component as below:

 add(new Behavior() {

@Override
public void renderHead(Component component, IHeaderResponse
response) {
response.renderCSSReference(new
SharedResourceReference(cssmouseover));
}
});

But wicket 1.5 is expecting to find
wicket/resource/images/mouseovermenu/page.gif and it ovisouly does not
exist, so I get the error:

Mar 15, 2012 11:43:39 AM org.apache.wicket.util.lang.WicketObjects
resolveClass
WARNING: Could not resolve class [images]
java.lang.ClassNotFoundException: images
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1680)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1526)
 ()

When the page is rendered, then I see in its source that the .css file is 
link rel=stylesheet type=text/css
href=wicket/resource/org.apache.wicket.Application/cssmouseover-ver-CDB3EE537C4A56387DDB56323FF91CB8
/

Where is the href coming from ? What do all its parts mean ?
I am rather confused about how to manage resources that are not in
classpath. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/URL-in-css-problem-tp4476092p4476092.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: Reloading i18n on demand

2012-03-15 Thread Gabriel Landon
Maybe it's a bit too much but I use the following to reload the properties
files :

Application.get().getResourceSettings().getLocalizer().clearCache();

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Reloading-i18n-on-demand-tp3798545p4476299.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



javascript and properties

2012-03-15 Thread infiniter
I'm creating a js template for each page in my app and added some l18n
support. 
Here is an example:

var someData = {
   'msg'='${message:hello}';
   'a'='${message:min}';
   'b'='${message:max}';
}

I've considered localizing each template instead, but since the js changes
very often, I still want to have support for properties.
The problem is that for each JS template you have to create your variables
model with every single message. 
I don't like having to provide a variables model to get these messages,
cause its just too time-consuming, but instead I'd like to make the
message-resolving part automatic just like wicket:message in the markup
files. That would REALLY speed up the dev time.

Any ideas to do something like this?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/javascript-and-properties-tp4476533p4476533.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: Reloading i18n on demand

2012-03-15 Thread robmcguinness
unless things have changed I used to use the JMX panel to destroy the Wicket
caches during production.  worked like a charm when I need to replace the
markup on the fly without redeploying.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Reloading-i18n-on-demand-tp3798545p4476845.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