Re: AjaxSelfUpdatingBehavior .. page expired

2012-03-14 Thread mlabs
after much hair pulling and searching I googled a post describing the same
issue...

the magic trick is to attach the behavior to a CHILD of the panel returned
by ITab.getPanel() ...

no idea why ?

but it works

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingBehavior-page-expired-tp4470925p4471087.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: Seeing sporadic ClassNotFoundExceptions after upgrading from 1.4.9 or 1.4.11

2012-03-14 Thread Martin Grigorov
Hi,

Try with 1.4.20.
I remember such problem have been fixed at some point. 1.4.11 is too old.

On Wed, Mar 14, 2012 at 2:19 AM, nhsoft.yhw nhsoft@gmail.com wrote:
 I have same problem also, This situation occasionally occurs.



 Nitnatsnok wrote

 03-13 18:37:30.466[      WicketObjects.java:82 :WARN ] Could not resolve
 class [resources]
 java.lang.ClassNotFoundException: resources
       at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
       at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:247)
       at
 org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
       at
 org.apache.wicket.util.lang.WicketObjects.resolveClass(WicketObjects.java:68)
       at
 org.apache.wicket.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:138)
       at
 org.apache.wicket.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
       at
 org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:268)
       at
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:131)
       at
 org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:184)
       at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
       at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
       at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:185)
       at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:241)
       at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
       at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
       at
 org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:399)
       at
 org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
       at
 org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
       at
 org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
       at
 org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188)
       at
 org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
       at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
       at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
       at
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
       at
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
       at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
       at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
       at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
       at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
       at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
       at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
       at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
       at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
       at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
       at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
       at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:303)
       at
 org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:183)
       at
 org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:169)
       at
 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
       at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
       at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:662)



 -
 first wicket application: 114生活网
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Seeing-sporadic-ClassNotFoundExceptions-after-upgrading-from-1-4-9-or-1-4-11-tp3018268p4470715.html
 Sent from the Users forum mailing list archive at Nabble.com.

 

Re: WicketTester - getTagByWicketId

2012-03-14 Thread Martin Grigorov
Hi,

I guess it doesn't work because your application is configured to
remove wicket:xyz tags and attributes.
See org.apache.wicket.settings.IMarkupSettings#setStripWicketTags().

Additionally this method works only with component id, not with
component path, i.e. it should work for 'panel' and 'container', but
wont work for 'panel:container'.

On Tue, Mar 13, 2012 at 9:20 PM, northar josef.anders...@gmail.com wrote:
 Learning more about wickettests, i would need some help with
 getTagByWicketId(String wicketid). I can't get it to return anything else
 than null. Stuff like:

  tester.clickLink(panel:mycontainer:mylistview:0:link, true);
  tester.assertListView(panel:mycontainer:listview, testArray);
 and even
 getTagById(the name of a id for a div in my  panel);
 works fine in my tests

 but.. when testing stuff like
 getTagByWicketId(the name of a wicket:id for a component). i only get
 null.
 ie tried stuff like
 getTagByWicketId(panel);
 getTagByWicketId(panel:mycontainer);
 getTagByWicketId(mycontainer);
 getTagByWicketId(panel:mycontainer:mylistview);

 Any hints for me that i missed?





 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/WicketTester-getTagByWicketId-tp4470042p4470042.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: [Announce] Wicket Stuff Core 1.5.5 Released

2012-03-14 Thread danisevsky
Thank you very much Michael!

2012/3/14 Michael O'Cleirigh michael.ocleir...@rivulet.ca:

 Hello,

 Following the release of wicket 1.5.5 have cut a matching
 wicketstuff-core release.

 The artifacts have been promoted and are now available in maven central.

 They can be retrieved like this:

 dependency
 groupIdorg.wicketstuff/groupId
 artifactIdwicketstuff-tinymce/artifactId
 version1.5.5/version
 /dependency

 The release tag is here:
 https://github.com/wicketstuff/core/tree/wicketstuff-core-1.5.5

 Development on the next release takes place on the core-1.5.x branch here:
 https://github.com/wicketstuff/core/tree/core-1.5.x

 Issues can be reported here: https://github.com/wicketstuff/core/issues

 The Project Wiki is available here:
 https://github.com/wicketstuff/core/wiki

 Changelog between wicketstuff-core-1.5.4 and this release:

 =Tom B (12):
      Cherry Picked into Core 1.5.x Insertable Changes (Mid cherry pick
 commit)
      More Cherry-picked commits from for the merge history
 AbstractPageableView clearCache support     DataGrid InsertRow()  Igrid
      committing pull/merge from github WicketStuff/Core
      updating .gitignore to ignore IDEA project files
      ended up clarifying parameter order in .gitignore     Cherry Pick:
 updating .gitignore to ignore IDEA project files
      [InMethod-Grid] Added Additional columns      LinkColumn - abstract
  PageLinkColumn - example implementation for linking to an
      [InMethod Grid] Updated the new classes for core-1.5.x compatibility
   Added Generics to the new columns     Began Simplifying ar
      [InMethod Grid] rollback of Failed 1 html Table     simplified if
 statements by removing useless '== true'     made sure form exist
      [InMethod Grid] Final Cherry Pick Commit hopefully evertyhing is to
 rights     now.     Cherry Pick: [InMethod Grid] remove errant
      [InMethod Grid]Final Cherry Pick Commit hopefully everything is to
 rights not.     CherryPick [InMethod Grid] remove errant generic
      [InMethod Grid] reset poms to remove local build changes     delete
 extraneous/erroneous files from another project org.cometd.java
      [InMethod Grid] compile fixes      + removed unused logger in
 AddRecordsToolbar - testing/debugging artifact      + corrected isFoc

 Michael O'Cleirigh (2):
      [wicket-security] Change wicket-util dependency type due to wicket
 upstream change
      commit wicketstuff-core 1.5.5 release pom's

 chrisco484 (2):
      Merge pull request #96 from raystorm/raystorm-inmethod-grid
      Merge pull request #98 from raystorm/raystorm-inmethod-grid

 Andrei Costescu (1):
      Manually merged changes from 1.4 branch.     Options that should
 evaluate to function objects browser side should not     escape un


 (This listing was generated using: git shortlog -n
 wicketstuff-core-1.5.4..wicketstuff-core-1.5.5).

 I will plan to do the next release within one month of today but if you
 commit code and/or need a release cut sooner please file a ticket.

 Regards,

 Mike


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


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



Re: WicketTester - getTagByWicketId

2012-03-14 Thread northar
Thanks for your reply.
Yes, didn't even know the application i work on had this configured, but
setStripWicketTags was the issue. Works now!


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-getTagByWicketId-tp4470042p4471631.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



Could not find component after session dies

2012-03-14 Thread Francois Meillet
Release:
Wicket 6.0-SNAPSHOT


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.

Question 2
Why don't I get a PageExpiredException ?


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



Control panels through Ajax

2012-03-14 Thread Alexander Zotter
 

Hi,

 

I´m trying to achieve a 4 Panel Page, which has a navigating panel (which is
a wicket tree basically) and a detailpanel which should show detail for the
selected element.

 

My problem is how to redirect the ajax target from one Panel to the other.
Are there any best practice examples, because I´ve been searching for a
while now and wasn´t able to get panelbased ajax architecture examples.

 

Thx

 



RE: Control panels through Ajax

2012-03-14 Thread Wilhelmsen Tor Iver
 My problem is how to redirect the ajax target from one Panel to the other.

If Panel A needs to invoke anything in Panel B then Panel A should have a 
reference to Panel B (or to a mediator object that knows about it), and send 
the AjaxRequestTarget (which applies to the entire Page's component structure) 
so that (the mediator or) Panel B can add the required component to it.

http://en.wikipedia.org/wiki/Mediator_pattern

- Tor Iver

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



RE: Control panels through Ajax

2012-03-14 Thread saschisch87

Wilhelmsen Tor Iver wrote
 
 My problem is how to redirect the ajax target from one Panel to the
 other.
 
 If Panel A needs to invoke anything in Panel B then Panel A should have a
 reference to Panel B (or to a mediator object that knows about it), and
 send the AjaxRequestTarget (which applies to the entire Page's component
 structure) so that (the mediator or) Panel B can add the required
 component to it.
 
 http://en.wikipedia.org/wiki/Mediator_pattern
 
 

I´m really new to web programming, so how should that solve my Problem? If I
got it right the mediator does only know the colleagues which would be
Panels in my case. But the methods of these colleague Panels are hidden
because of inheritance (myPanel is child of Panel). Could you describe this
solution a bit deeper?

thx for your fast reply btw

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Control-panels-through-Ajax-tp4471697p4471741.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: Could not find component after session dies

2012-03-14 Thread Martin Grigorov
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.


 Question 2
 Why don't I get a PageExpiredException ?

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



 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: Control panels through Ajax

2012-03-14 Thread Martin Grigorov
Hi,

I think the best approach is to share models between the panels
combined with events.
I.e. Panel A uses the model to decide which node is the selected one
in the Tree. Panel B uses the model to decide what details to show for
this node.
If Panel A has a reference to Panel B then you can just do:
target.add(panelB). But if there is no direct reference then you can
use the Event system in Wicket 1.5. See
http://www.wicket-library.com/wicket-examples/events/ for an example.
Wicket sends automatically an event with the AjaxRequestTarget as a
payload for each Ajax request. You may use it or you may fire your own
event with your own payload additionally.

On Wed, Mar 14, 2012 at 2:17 PM, Alexander Zotter
alexander.zot...@msit.at wrote:


 Hi,



 I´m trying to achieve a 4 Panel Page, which has a navigating panel (which is
 a wicket tree basically) and a detailpanel which should show detail for the
 selected element.



 My problem is how to redirect the ajax target from one Panel to the other.
 Are there any best practice examples, because I´ve been searching for a
 while now and wasn´t able to get panelbased ajax architecture examples.



 Thx






-- 
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: Control panels through Ajax

2012-03-14 Thread Wilhelmsen Tor Iver
 I´m really new to web programming, so how should that solve my Problem? If I 
 got it right the mediator does only know the colleagues which would be Panels 
 in my case. But the methods of these colleague Panels are hidden because of 
 inheritance (myPanel is child of Panel). Could you describe this solution a 
 bit deeper?

In general terms:

class A extends Panel {

private ABMediator mediator;

//...
add(new AjaxLinkVoid(theLink) {
public void onClick(AjaxRequestTarget target) {
mediator.callIntoB(target);
});
}
}

class B extends Panel {

// ...

public methodForTheMediator(AjaxRequestTarget target) {
// Do something
target.addComponent(someBComponent);
}
}

class ABMediator {
private A a;
private B b;

// ...

public void callIntoB(AjaxRequestTarget target) {
b. methodForTheMediator(target);
}
}

You could also leave out passing around the target and instead get it using 
AjaxRequestTarget.get(). As you see, the method invoked on B is public in this 
case.

- Tor Iver


Re: Could not find component after session dies

2012-03-14 Thread François Meillet
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

 
 
 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



Re: Could not find component after session dies

2012-03-14 Thread Martin Grigorov
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



Re: Seeing sporadic ClassNotFoundExceptions after upgrading from 1.4.9 or 1.4.11

2012-03-14 Thread nhsoft.yhw

Martin Grigorov-4 wrote
 
 Hi,
 
 Try with 1.4.20.
 I remember such problem have been fixed at some point. 1.4.11 is too old.
 
 

I am using wicket 1.5.5, This problem has always existed from version 1.4.9
to version 1.5.x.

However, this problem seems to have little effect, this problem the
probability of about 2-3 times in one day


-
first wicket application: 114生活网 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Seeing-sporadic-ClassNotFoundExceptions-after-upgrading-from-1-4-9-or-1-4-11-tp3018268p4471875.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



Debug Performance Issue in Wicket App

2012-03-14 Thread eugenebalt
I am having some delays/performance issues in my Wicket app. It could be
anything.

Is there a way to turn on some debugging that monitors the lifecycle of all
Wicket requests/responses? thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Debug-Performance-Issue-in-Wicket-App-tp4471948p4471948.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: Debug Performance Issue in Wicket App

2012-03-14 Thread Martin Grigorov
See IRequestLogger

On Wed, Mar 14, 2012 at 4:22 PM, eugenebalt eugeneb...@yahoo.com wrote:
 I am having some delays/performance issues in my Wicket app. It could be
 anything.

 Is there a way to turn on some debugging that monitors the lifecycle of all
 Wicket requests/responses? thanks

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Debug-Performance-Issue-in-Wicket-App-tp4471948p4471948.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



Tracking % Complete for Resource Download

2012-03-14 Thread eugenebalt
I have a large resource that is downloaded from the server.

Does Wicket have a way of tracking % Complete for the download? Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tracking-Complete-for-Resource-Download-tp4471988p4471988.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



setTextEncoding on JavascriptResourceReferences/CssResourceReferences

2012-03-14 Thread exaptis
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



Re: StackOverflow while getting browser info

2012-03-14 Thread Andre Schütz
Hi,
Thank you for the hint. Do you have an idea where should place my code? I tried 
it in the constructor of my index webpage, but the setLocale method created a 
page reload that did not occur in the Webapplication constructor.

Thanks,
Andre

---
Andre Schütz
www.faustas.de

Dan Retzlaff dretzl...@gmail.com schrieb:

Andre, check out this javadoc comment on Session#getClientInfo:

 * Note: Do strongnot/strong call this method from your custom {@link
Session} constructor
 * because the temporary page needs a constructed {@link Session} to be
able to work.

Dan

2012/3/13 André Schütz andre-p...@gmx.de

 Hi,

 I have the following code in my MyApplication class:

 {CODE}

 public void init() {
super.init();
getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
getResourceSettings().setThrowExceptionOnMissingResource(false);

...
 }

 public Session newSession(Request request, Response response) {
MySession session = new MySession(request);

// determine default language from the browser
String defaultLanguage = null;
if (request != null  request.getClientUrl() != null 
 !request.getClientUrl().toString().isEmpty()) {
defaultLanguage =
 session.getClientInfo().getProperties().getNavigatorLanguage();
}
Locale locale = session.getLocale();

// no locale available
if (locale == null) {
if (defaultLanguage != null) {
if (defaultLanguage.startsWith(en)) {
locale = new Locale(en, EN);
}
else if (defaultLanguage.startsWith(de)) {
locale = new Locale(de, DE);
}
}
else {
locale = new Locale(en, EN);
}

session.setLocale(locale);
}

return session;
}

 {CODE}

 I get an error, when I delete the Cookies in my browser and reload the
 actual page. The same error occurs when I delete the line ( if (request !=
 null  request.getClientUrl() != null 
 request.getClientUrl().toString().isEmpty()) { ) from the code example at
 building time from the TestHomePage.java.

 The error is:

 {ERROR}

 java.lang.StackOverflowError

  
 org.apache.wicket.session.HttpSessionStore.getHttpSession(HttpSessionStore.java:95)

  
 org.apache.wicket.session.HttpSessionStore.getSessionId(HttpSessionStore.java:155)

  org.apache.wicket.session.HttpSessionStore.lookup(HttpSessionStore.java:192)

  
 org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1526)
org.apache.wicket.Session.get(Session.java:156)

  org.apache.wicket.Application$1.onInstantiation(Application.java:279)

  
 org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:36)

  
 org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34)

  
 org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)

  
 org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:32)
org.apache.wicket.Component.init(Component.java:678)
org.apache.wicket.MarkupContainer.init(MarkupContainer.java:118)
org.apache.wicket.Page.init(Page.java:206)
org.apache.wicket.Page.init(Page.java:170)
org.apache.wicket.markup.html.WebPage.init(WebPage.java:74)

  
 org.apache.wicket.markup.html.pages.BrowserInfoPage.init(BrowserInfoPage.java:66)

  
 org.apache.wicket.protocol.http.WebSession.newBrowserInfoPage(WebSession.java:239)

  
 org.apache.wicket.protocol.http.WebSession.getClientInfo(WebSession.java:216)

 {ERROR}

 Any ideas why that happens?

 Thank you,
 Andre
 --
 Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
 belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

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




Re: StackOverflow while getting browser info

2012-03-14 Thread Dan Retzlaff
It seems a bit hacky, but you might try ThreadContext.setSession(session)
in MyApplication#newSession right after you construct MySession.

2012/3/14 Andre Schütz andre-p...@gmx.de

 Hi,
 Thank you for the hint. Do you have an idea where should place my code? I
 tried it in the constructor of my index webpage, but the setLocale method
 created a page reload that did not occur in the Webapplication constructor.

 Thanks,
 Andre

 ---
 Andre Schütz
 www.faustas.de

 Dan Retzlaff dretzl...@gmail.com schrieb:

 Andre, check out this javadoc comment on Session#getClientInfo:
 
  * Note: Do strongnot/strong call this method from your custom {@link
 Session} constructor
  * because the temporary page needs a constructed {@link Session} to be
 able to work.
 
 Dan
 
 2012/3/13 André Schütz andre-p...@gmx.de
 
  Hi,
 
  I have the following code in my MyApplication class:
 
  {CODE}
 
  public void init() {
 super.init();
 getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
 getResourceSettings().setThrowExceptionOnMissingResource(false);
 
 ...
  }
 
  public Session newSession(Request request, Response response) {
 MySession session = new MySession(request);
 
 // determine default language from the browser
 String defaultLanguage = null;
 if (request != null  request.getClientUrl() != null 
  !request.getClientUrl().toString().isEmpty()) {
 defaultLanguage =
  session.getClientInfo().getProperties().getNavigatorLanguage();
 }
 Locale locale = session.getLocale();
 
 // no locale available
 if (locale == null) {
 if (defaultLanguage != null) {
 if (defaultLanguage.startsWith(en)) {
 locale = new Locale(en, EN);
 }
 else if (defaultLanguage.startsWith(de)) {
 locale = new Locale(de, DE);
 }
 }
 else {
 locale = new Locale(en, EN);
 }
 
 session.setLocale(locale);
 }
 
 return session;
 }
 
  {CODE}
 
  I get an error, when I delete the Cookies in my browser and reload the
  actual page. The same error occurs when I delete the line ( if (request
 !=
  null  request.getClientUrl() != null 
  request.getClientUrl().toString().isEmpty()) { ) from the code example
 at
  building time from the TestHomePage.java.
 
  The error is:
 
  {ERROR}
 
  java.lang.StackOverflowError
 
 
  
 org.apache.wicket.session.HttpSessionStore.getHttpSession(HttpSessionStore.java:95)
 
 
  
 org.apache.wicket.session.HttpSessionStore.getSessionId(HttpSessionStore.java:155)
 
 
  org.apache.wicket.session.HttpSessionStore.lookup(HttpSessionStore.java:192)
 
 
  org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1526)
 org.apache.wicket.Session.get(Session.java:156)
 
   org.apache.wicket.Application$1.onInstantiation(Application.java:279)
 
 
  
 org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:36)
 
 
  
 org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34)
 
 
  
 org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
 
 
  
 org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:32)
 org.apache.wicket.Component.init(Component.java:678)
 
  org.apache.wicket.MarkupContainer.init(MarkupContainer.java:118)
 org.apache.wicket.Page.init(Page.java:206)
 org.apache.wicket.Page.init(Page.java:170)
 org.apache.wicket.markup.html.WebPage.init(WebPage.java:74)
 
 
  
 org.apache.wicket.markup.html.pages.BrowserInfoPage.init(BrowserInfoPage.java:66)
 
 
  
 org.apache.wicket.protocol.http.WebSession.newBrowserInfoPage(WebSession.java:239)
 
 
  org.apache.wicket.protocol.http.WebSession.getClientInfo(WebSession.java:216)
 
  {ERROR}
 
  Any ideas why that happens?
 
  Thank you,
  Andre
  --
  Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
  belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



PageExpiredException and PageExpired

2012-03-14 Thread Francois Meillet
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



Check if FormComponent is valid in later request

2012-03-14 Thread Thomas Götz
Hi!

I have the following situation:

I have a form containing several FormComponents and Validators, submitted via 
Ajax. Then I have an AjaxButton on the same page (outside the form) which 
triggers some backend logic. But it should only do so if the mentioned form had 
no validation errors during the last submit. How should I check that? 
Form.hasError() only checks for error messages, which always returns 'false' as 
the error messages already have been rendered in one of the preceding requests.

Is it a good idea to set a flag in the Form (boolean isValid) upon 
onSubmit/onError and check for that flag or is there some already provided 
Wicket mechanic I could use?

Cheers,
   -Tom


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



Re: Check if FormComponent is valid in later request

2012-03-14 Thread Igor Vaynberg
if the form is invalid your button's onsubmit() wont get fired...

-igor

On Wed, Mar 14, 2012 at 1:53 PM, Thomas Götz t...@decoded.de wrote:
 Hi!

 I have the following situation:

 I have a form containing several FormComponents and Validators, submitted via 
 Ajax. Then I have an AjaxButton on the same page (outside the form) which 
 triggers some backend logic. But it should only do so if the mentioned form 
 had no validation errors during the last submit. How should I check that? 
 Form.hasError() only checks for error messages, which always returns 'false' 
 as the error messages already have been rendered in one of the preceding 
 requests.

 Is it a good idea to set a flag in the Form (boolean isValid) upon 
 onSubmit/onError and check for that flag or is there some already provided 
 Wicket mechanic I could use?

 Cheers,
   -Tom


 -
 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: Check if FormComponent is valid in later request

2012-03-14 Thread Dan Retzlaff
If I understand Thomas correctly, the button is not a form submitting
button. It's outside the form and is handled on a request after the form is
submitted.

Thomas, I think if you want to avoid resubmitting the form then you'll need
to set your own formSubmittedSuccessfully state in Form#onSubmit. Form
doesn't remember what happened on previous requests; it either updates
models on success or creates error messages on failure.

On Wed, Mar 14, 2012 at 2:00 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 if the form is invalid your button's onsubmit() wont get fired...

 -igor

 On Wed, Mar 14, 2012 at 1:53 PM, Thomas Götz t...@decoded.de wrote:
  Hi!
 
  I have the following situation:
 
  I have a form containing several FormComponents and Validators,
 submitted via Ajax. Then I have an AjaxButton on the same page (outside the
 form) which triggers some backend logic. But it should only do so if the
 mentioned form had no validation errors during the last submit. How should
 I check that? Form.hasError() only checks for error messages, which always
 returns 'false' as the error messages already have been rendered in one of
 the preceding requests.
 
  Is it a good idea to set a flag in the Form (boolean isValid) upon
 onSubmit/onError and check for that flag or is there some already provided
 Wicket mechanic I could use?
 
  Cheers,
-Tom
 
 
  -
  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: Check if FormComponent is valid in later request

2012-03-14 Thread Thomas Götz
Exactly! My bad I mentioned AjaxButton. It should read 
'AjaxFormComponentUpdatingBehavior' on a DropDownChoice, was trying to 
generalize the problem for explaining, but 'AjaxButton' was a bad example …

Wouldn't it be convenient if a Form (or FormComponent) whould remembered their 
'valid' state so you could check for it in later (e.g. Ajax) requests?

   -Tom


Dan Retzlaff wrote:

 If I understand Thomas correctly, the button is not a form submitting
 button. It's outside the form and is handled on a request after the form is
 submitted.
 
 Thomas, I think if you want to avoid resubmitting the form then you'll need
 to set your own formSubmittedSuccessfully state in Form#onSubmit. Form
 doesn't remember what happened on previous requests; it either updates
 models on success or creates error messages on failure.
 
 On Wed, Mar 14, 2012 at 2:00 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:
 
 if the form is invalid your button's onsubmit() wont get fired...
 
 -igor
 
 On Wed, Mar 14, 2012 at 1:53 PM, Thomas Götz t...@decoded.de wrote:
 Hi!
 
 I have the following situation:
 
 I have a form containing several FormComponents and Validators,
 submitted via Ajax. Then I have an AjaxButton on the same page (outside the
 form) which triggers some backend logic. But it should only do so if the
 mentioned form had no validation errors during the last submit. How should
 I check that? Form.hasError() only checks for error messages, which always
 returns 'false' as the error messages already have been rendered in one of
 the preceding requests.
 
 Is it a good idea to set a flag in the Form (boolean isValid) upon
 onSubmit/onError and check for that flag or is there some already provided
 Wicket mechanic I could use?
 
 Cheers,
  -Tom
 
 
 -
 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: How to submit a result of dropdownchoice and a result of input text simultaneously?

2012-03-14 Thread xiaowang
Thanks very much for your help. I have finished it.
I know it is a very simple question. But if any other new people have the
same question, just email me. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-submit-a-result-of-dropdownchoice-and-a-result-of-input-text-simultaneously-tp4469660p4473193.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: weird interaction between ModalWindow and jQuery mousedown binding

2012-03-14 Thread Andrew Geery
Line 749 of modal.js seems to have the answer that, yes, mousedown events
don't bubble out of a ModalWindow -- am I reading that correctly?

div class=\w_content_1\ onmousedown=\if (Wicket.Browser.isSafari()) {
event.ignore = true; } else { Wicket.stopEvent(event); } \+

Thanks
Andrew

On Wed, Mar 14, 2012 at 4:34 PM, Andrew Geery andrew.ge...@gmail.comwrote:

 I'm using the jQuery Multiselector (
 http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ ) with
 Wicket 1.4.19 (via jqWicket 0.6).  The multi-selector was straightforward
 to integrate with Wicket and use on a regular page.

 Using it in a ModalWindow was a little trickier because you have to
 manually add the JS + CSS to the header of the ModalWindow (which jqWicket
 takes care of for you on a regular page).

  Here's my problem:

 When I click outside of a multi-selector component on a regular page, the
 multiselector closes.  However, when I click outside of a multi-selector in
 the containing ModalWindow, it does not.

 I've traced the problem back to the following line in the multiselector
 (the self.close() method simply closes/rolls up the multiselector options):

$(document).bind('mousedown.multiselect', function (e) {
 if (self._isOpen  !$.contains(self.menu[0], e.target) 
 !$.contains(self.button[0], e.target)  e.target !== self.button[0]) {
 self.close();
 }
});

 I've verified that the mousedown bind does indeed happen in both the
 regular page and in the ModalWindow.

 The difference is that, on a regular page, the handler function is called
 when I click anywhere on the page (i.e., jQuery detects the mousdown
 event).  However, in the ModalWindow, the handler is not called when I
 click in the ModalWindow (i.e., jQuery does not detect the mousedown event
 in the context of the ModalWindow).  To make things more interesting, the
 handler is called if I click on the page *outside* of the ModalWindow.

 Is there anything in a ModalWindow that would make jQuery bind not work
 for mousedown events that target the ModalWindow itself?

 Thanks
 Andrew