Re: Help with ClientSideImageMap needed

2011-01-17 Thread Christoph Glass
Thank you, this hint was very helpful, I was able to solve the problem.

Best regards
Christoph


On Sat, Jan 15, 2011 at 2:59 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Check in wicket-examples.jar
 : org.apache.wicket.examples.linkomatic.Home.Home()

 On Sat, Jan 15, 2011 at 2:03 PM, Christoph Glass 
 mail.kaffeeser...@googlemail.com wrote:

  Hello,
 
  could please any of you provide a working example with
 ClientSideImageMap?
  I dont get it to work, there are no error messages, the page leaves
 blank.
 
  My code example:
 
  Java:
 
  add(getPlzMap(plzmap);
 
  private ClientSideImageMap getPlzMap(String id)
  {
  ClientSideImageMap csim=new ClientSideImageMap(id, new Image(map,new
  ResourceReference(PlzMapTestPage.class, map.jpg)));
   MapString, Boolean customMap=getCustomPlzMapData(getPlzByAdressid());
  MapString, int[] defaultData=getDefaultPlzMapData();
   IteratorString cmksi=customMap.keySet().iterator();
  while(cmksi.hasNext())
  {
  String key=cmksi.next();
  if(defaultData.containsKey(key))
  {
  IndicatingAjaxLinkObject link=getLink(key.replaceAll(,, ),
  key.split(,), customMap.get(key));
  csim.addPolygonArea(link, defaultData.get(key));
  }
  }
   return csim;
  }
 
  HTML:
 
  wicket:panel
 
  pPlz Map Test/p
   map wicket:id=plzmap /
 
  /wicket:panel
 
  Thank you and best regards
  Christoph
 



Re: Automatic Ajax after page load and redirect to PageExpiredErrorPage

2011-01-17 Thread sadko

Hi guys,
thanks for answers. The solution to disable links until the ajax is finished
don't seems right to me. The links can be spread through different
components so I don't want to create unnecessary dependencies between these
unless there is one general method that disables all links everywhere at
once and I don't know about it.

I tried the veil, but it doesn't work. Maybe I made something wrong but I
proceeded exactly as in this article:
http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/#more-302

The method getAjaxIndicatorMarkupId was at lest called to get the ID,
however no positive result. Afterwards I tried to implement the
IAjaxIndicatorAware in Panel and after that even in Behaviors themselves. On
behaviors the getAjaxIndicatorMarkupId wasn't even called. My example
implementation looked like this.

private class AutoLoginBehavior extends AbstractDefaultAjaxBehavior
implements IAjaxIndicatorAware{
@Override
public String getAjaxIndicatorMarkupId() {
return fb-autologin-veil;
}

@Override
protected void respond(AjaxRequestTarget target) {
MapString, String[] map = ((WebRequestCycle)
RequestCycle.get()).getRequest().getParameterMap();

String uid = map.get(fbid)[0];
String sessionId = map.get(fbsessid)[0];
String accessToken = map.get(fbaccesstoken)[0];
autologin(target, Long.parseLong(uid), sessionId, accessToken);
}
}

and in markup for Panel I included following:

div id=fb-autologin-veil
style=display:none;position:absolute;top:0;left:0;z-index=9;background-color:black;width:100%;height:100%;color:white
h1Can't touch this/h1
/div

The whole block of markup with veils and javascript that calls behaviors is
hidden using css (is part of generated markup, it is just not visible to
user), but I guess that should not be a problem, right?

Any suggestions why the veil doesn't work?

Thanks in advance.
Martin
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Automatic-Ajax-after-page-load-and-redirect-to-PageExpiredErrorPage-tp3220405p3220933.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



howto integrate third-party ajax with channels?

2011-01-17 Thread Frank van Lankvelt
I'm regularly running into problems when integrating client-side ajax code.
 The issue is that the client-side code is doing throttled asynchronous
calls to wicket ajax behaviors.
Now, this generally works fine until I want to integrate this with native
wicket calls (links, buttons).  Then, such throttled calls should be flushed
before the native request is sent to the server.

The only way I can see/make this work is by registering pre-call handlers
and doing the requests synchronously from the pre-call handler.
A short explanation; the request cannot be done asynchronously as there is
no guarantee that it will arrive at the server before the original call
(that triggered the pre-call handler) arrives.
This is clumsy and, generally, error-prone.

It also appears to be partly re-doing what Wicket's channels already do, as
channels take care of request ordering.  So I wonder whether I am
overlooking something.  How do you guys handle this?

Thinking out loud: would it be possible to have a 'throttled' channel that
is flushed whenever a request is scheduled on the default channel (0|s)?
That way, third-party JS lib integrations could schedule calls to this
channel on every key-stroke, having the synchronization handled
automatically.

cheers, Frank


-- 
Hippo Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 (0)20
522 4466
USA  • San Francisco 755 Baywood Drive, Second Floor •  Petaluma, CA. 94954
•  +1 877 414 4776 (toll free)
Canada•   Montréal  5369 Boulevard St-Laurent #430 •  Montréal QC H2T
1S5  •  +1 (514) 316 8966
www.onehippo.com  •  www.onehippo.org  •  i...@onehippo.com

This e-mail may be privileged and/or confidential, and the sender does
not waive any related rights and obligations. Any distribution, use or
copying of this e-mail or the information it contains by other than an
intended recipient is unauthorized. If you received this e-mail in
error, please advise me (by return e-mail or otherwise) immediately.


wicket:message inside html title

2011-01-17 Thread Patrick Petermair

Hi!

We are using wicket:message for i18n of our html pages. It all works 
fine except for the html title. I have the following html:


head
  title
wicket:message key=page.titlemyTitle/wicket:message
  /title
/head

In the properties files I have page.title set to German Title and 
English Title for example.

The output from wicket to the browser is:

head
  title
wicket:message key=page.titleGerman Title/wicket:message
  /title
/head

The localization worked, but wicket leaves the wicket:message tag in 
the title which looks ugly and wrong.


Am I doing something wrong? What's the correct way of i18n html titles?

I could probably treat the page title as a simple label as shown in this 
blogpost:

http://th1rty7.blogspot.com/2009/08/page-title-in-wicket.html
But I would much rather do it with wicket:message since I don't have to 
touch any Java code this way.


Cheers,
Patrick



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



Re: wicket:message inside html title

2011-01-17 Thread Matthias Gasser
Hello Patrick,

I guess the following will do the Job:

https://cwiki.apache.org/WICKET/how-to-remove-wicket-markup-from-output.html

BRGDS
Matthias

Am 17.01.2011 um 12:06 schrieb Patrick Petermair:

 Hi!
 
 We are using wicket:message for i18n of our html pages. It all works fine 
 except for the html title. I have the following html:
 
 head
  title
wicket:message key=page.titlemyTitle/wicket:message
  /title
 /head
 
 In the properties files I have page.title set to German Title and English 
 Title for example.
 The output from wicket to the browser is:
 
 head
  title
wicket:message key=page.titleGerman Title/wicket:message
  /title
 /head
 
 The localization worked, but wicket leaves the wicket:message tag in the 
 title which looks ugly and wrong.
 
 Am I doing something wrong? What's the correct way of i18n html titles?
 
 I could probably treat the page title as a simple label as shown in this 
 blogpost:
 http://th1rty7.blogspot.com/2009/08/page-title-in-wicket.html
 But I would much rather do it with wicket:message since I don't have to touch 
 any Java code this way.
 
 Cheers,
 Patrick
 
 
 
 -
 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: Automatic Ajax after page load and redirect to PageExpiredErrorPage

2011-01-17 Thread sadko

I don't know but for me it seems some kind of other problem. If I understand
right the veil it should be used to avoid the double clicks and the problems
like that. However what I'm dealing with is that somehow the unfinished ajax
call or the new page call that occurs before its end mess up the page
numbers. If I try to change the number to one lower the link works. So for
page:
https://localhost:8443/my-app/en/home.31

doesn't work link:
https://localhost:8443/my-app/en/?wicket:interface=:31:authPanel:notLoggedLoginPanel:signInContainer:signInPanel:communityLoginContainer:communityLoginItems:0:communityLoginItem::IActivePageBehaviorListener:1:1wicket:ignoreIfNotActive=truefbid=xxxfbsessid=xxxfbaccesstoken=xxxrandom=0.9877056940825386

but works link:

https://localhost:8443/my-app/en/?wicket:interface=:30:authPanel:notLoggedLoginPanel:signInContainer:signInPanel:communityLoginContainer:communityLoginItems:0:communityLoginItem::IActivePageBehaviorListener:1:1wicket:ignoreIfNotActive=truefbid=xxxfbsessid=xxxfbaccesstoken=xxxrandom=0.9877056940825386


By works/doesnt work I mean when I call the link in browser in other tab it
returns some normal response instead of redirect response.

Any suggestions now?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Automatic-Ajax-after-page-load-and-redirect-to-PageExpiredErrorPage-tp3220405p3221117.html
Sent from the Users forum mailing list archive at Nabble.com.

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



How to add tooltips to components?

2011-01-17 Thread Erich W Schreiner
Dear list,

what is the recommended way of adding tooltips to wicket components?

I have searched Google, but found mostly outdated (wicketstuff jwicket is 
version 1.4.1) or obsolete (wicketstuff dojo integration) hints.

Thank you very much  have a nice day,
Erich


Re: wicket:message inside html title

2011-01-17 Thread Patrick Petermair

Thank you!

Works like a charm!!

Am 2011-01-17 12:10, schrieb Matthias Gasser:

Hello Patrick,

I guess the following will do the Job:

https://cwiki.apache.org/WICKET/how-to-remove-wicket-markup-from-output.html




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



Re: How to add tooltips to components?

2011-01-17 Thread James Carman
Do you need Ajax tooltips?  Or, do you just need static ones that are known
at page render time?  For static ones, I've used overLIB (
http://www.bosrup.com/web/overlib/) and it worked fairly well.  If you want
to see some Wicket-based code for supporting overLIB, let me know.

On Mon, Jan 17, 2011 at 7:23 AM, Erich W Schreiner eschrei...@yahoo.comwrote:

 Dear list,

 what is the recommended way of adding tooltips to wicket components?

 I have searched Google, but found mostly outdated (wicketstuff jwicket is
 version 1.4.1) or obsolete (wicketstuff dojo integration) hints.

 Thank you very much  have a nice day,
 Erich



Re: How to add tooltips to components?

2011-01-17 Thread Ernesto Reinaldo Barreiro
If you don't mind using jquery here is an option: [1]. Click on the
little ? sign at the right to see the source code.

Ernesto

1-http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage=:com.wiquery.plugins.demo.ToolTipPage

On Mon, Jan 17, 2011 at 1:23 PM, Erich W Schreiner eschrei...@yahoo.com wrote:
 Dear list,

 what is the recommended way of adding tooltips to wicket components?

 I have searched Google, but found mostly outdated (wicketstuff jwicket is
 version 1.4.1) or obsolete (wicketstuff dojo integration) hints.

 Thank you very much  have a nice day,
 Erich


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



Re: How to add tooltips to components?

2011-01-17 Thread Martijn Dashorst
use the title attribute

Martijn

On Mon, Jan 17, 2011 at 1:23 PM, Erich W Schreiner eschrei...@yahoo.com wrote:
 Dear list,

 what is the recommended way of adding tooltips to wicket components?

 I have searched Google, but found mostly outdated (wicketstuff jwicket is
 version 1.4.1) or obsolete (wicketstuff dojo integration) hints.

 Thank you very much  have a nice day,
 Erich




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



Re: How to add tooltips to components?

2011-01-17 Thread Josh Kamau
I use the visural wicket project . it has very nice tooltips. And there is a
nice demo for you to view them before you decide to use them

http://wicket.visural.net/examples/app/

regards.

Josh

On Mon, Jan 17, 2011 at 3:43 PM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 use the title attribute

 Martijn

 On Mon, Jan 17, 2011 at 1:23 PM, Erich W Schreiner eschrei...@yahoo.com
 wrote:
  Dear list,
 
  what is the recommended way of adding tooltips to wicket components?
 
  I have searched Google, but found mostly outdated (wicketstuff jwicket is
  version 1.4.1) or obsolete (wicketstuff dojo integration) hints.
 
  Thank you very much  have a nice day,
  Erich
 



 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com

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




Re: Should Logger classes be transient?

2011-01-17 Thread Fernando Wermus
Just to know Why a static variable is not serializable?

On Sat, Jan 15, 2011 at 7:44 PM, Emmanouil Batsis ma...@abiss.gr wrote:



 Quoting Alexandros Karypidis akary...@yahoo.gr:

 I'm using SLF4J and was wondering whether pages should declare:

private transient final Logger log = LoggerFactory
.getLogger(SomePage.class);

 as members. I guess that accessing a page that was saved and then
 re-loaded
 would result in breaking logging, as the variable would be set to null.
 I've no
 idea how heavy-weight these Logger implementations are though and am
 worried
 that they should not be declared in class scope.


 Using static loggers has the benefit of non-serialization between other
 things, including consistency between instances. Making them final and
 private may be appropriate as well. Here's a snippet from our calipso wicket
 app:

 /**
  * Please make proper use of logging, see
  * http://www.owasp.org/index.php/Category
  * :Logging_and_Auditing_Vulnerability
  */
 private static final Logger logger = // call logger factory


 Cheers,

 Manos


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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


RE: Should Logger classes be transient?

2011-01-17 Thread Wilhelmsen Tor Iver
 Just to know Why a static variable is not serializable?

Because objects (instances) are serialized and static data belongs to the class 
and not instances.

- Tor Iver


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



session size

2011-01-17 Thread Mihai Toma
Hi!

 

I have an application build with wicket and I have a session problem.

 

If one user browse the application the session (the object WebSession)
becomes bigger and bigger, so if I browse 20 pages the session size has
around 16 Mb.

When I start browsing the session has something less than 100 Kb.

 

I read some things about the pages which are stored in session in pageMaps
and versions and I make different settings in Application class
(getSessionSettings().setMaxPageMaps(10);
getSessionSettings().setPageMapEvictionStrategy(new
LeastRecentlyAccessedEvictionStrategy(10));

) but seems not to resolv my problem.

 

Do you have any idea how can I limit the session size or how can I limit the
number of pages stored in session?

 

I use wicket 1.4.8.

 

Thanks!



Re: session size

2011-01-17 Thread Martin Grigorov
Try to find what is stored actually.
Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/

http://www.eclipse.org/mat/I expect that you store some bigger collections
with your data with some of your components.

On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote:

 Hi!



 I have an application build with wicket and I have a session problem.



 If one user browse the application the session (the object WebSession)
 becomes bigger and bigger, so if I browse 20 pages the session size has
 around 16 Mb.

 When I start browsing the session has something less than 100 Kb.



 I read some things about the pages which are stored in session in pageMaps
 and versions and I make different settings in Application class
 (getSessionSettings().setMaxPageMaps(10);
 getSessionSettings().setPageMapEvictionStrategy(new
 LeastRecentlyAccessedEvictionStrategy(10));

 ) but seems not to resolv my problem.



 Do you have any idea how can I limit the session size or how can I limit
 the
 number of pages stored in session?



 I use wicket 1.4.8.



 Thanks!




Re: session size

2011-01-17 Thread Pedro Santos
Pages don't go to session by default, I executed the
PageMapTest#testPagemapIsNotReferencedBySession on Wicket 1.4.8 and it is
ok. I suspect you are referencing some expensive objects in an custom
session.

On Mon, Jan 17, 2011 at 12:16 PM, Mihai Toma mihai.t...@asf.ro wrote:

 Hi!



 I have an application build with wicket and I have a session problem.



 If one user browse the application the session (the object WebSession)
 becomes bigger and bigger, so if I browse 20 pages the session size has
 around 16 Mb.

 When I start browsing the session has something less than 100 Kb.



 I read some things about the pages which are stored in session in pageMaps
 and versions and I make different settings in Application class
 (getSessionSettings().setMaxPageMaps(10);
 getSessionSettings().setPageMapEvictionStrategy(new
 LeastRecentlyAccessedEvictionStrategy(10));

 ) but seems not to resolv my problem.



 Do you have any idea how can I limit the session size or how can I limit
 the
 number of pages stored in session?



 I use wicket 1.4.8.



 Thanks!




-- 
Pedro Henrique Oliveira dos Santos


Re: session size

2011-01-17 Thread Jeremy Thomerson
Are you using HttpSessionStore (this is not the default - which means you
would have to explicitly set this up in your application class)?

On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 Try to find what is stored actually.
 Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/

 http://www.eclipse.org/mat/I expect that you store some bigger
 collections
 with your data with some of your components.

 On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote:

  Hi!
 
 
 
  I have an application build with wicket and I have a session problem.
 
 
 
  If one user browse the application the session (the object WebSession)
  becomes bigger and bigger, so if I browse 20 pages the session size has
  around 16 Mb.
 
  When I start browsing the session has something less than 100 Kb.
 
 
 
  I read some things about the pages which are stored in session in
 pageMaps
  and versions and I make different settings in Application class
  (getSessionSettings().setMaxPageMaps(10);
  getSessionSettings().setPageMapEvictionStrategy(new
  LeastRecentlyAccessedEvictionStrategy(10));
 
  ) but seems not to resolv my problem.
 
 
 
  Do you have any idea how can I limit the session size or how can I limit
  the
  number of pages stored in session?
 
 
 
  I use wicket 1.4.8.
 
 
 
  Thanks!
 
 




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


RE: session size

2011-01-17 Thread Mihai Toma
Yes, I use HttpSessionStore.

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Monday, January 17, 2011 5:20 PM
To: users@wicket.apache.org
Subject: Re: session size

Are you using HttpSessionStore (this is not the default - which means you
would have to explicitly set this up in your application class)?

On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov
mgrigo...@apache.orgwrote:

 Try to find what is stored actually.
 Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/

 http://www.eclipse.org/mat/I expect that you store some bigger
 collections
 with your data with some of your components.

 On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote:

  Hi!
 
 
 
  I have an application build with wicket and I have a session problem.
 
 
 
  If one user browse the application the session (the object WebSession)
  becomes bigger and bigger, so if I browse 20 pages the session size has
  around 16 Mb.
 
  When I start browsing the session has something less than 100 Kb.
 
 
 
  I read some things about the pages which are stored in session in
 pageMaps
  and versions and I make different settings in Application class
  (getSessionSettings().setMaxPageMaps(10);
  getSessionSettings().setPageMapEvictionStrategy(new
  LeastRecentlyAccessedEvictionStrategy(10));
 
  ) but seems not to resolv my problem.
 
 
 
  Do you have any idea how can I limit the session size or how can I limit
  the
  number of pages stored in session?
 
 
 
  I use wicket 1.4.8.
 
 
 
  Thanks!
 
 




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


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



Re: session size

2011-01-17 Thread Jeremy Thomerson
Okay, so you are storing *every* page in your page map in session.  So,
here's your next path (already partially explained by others):

1 - Consider: must you use http session store?  why?  A lot of folks *think*
that they must, and they switch to it, but they don't really need to.  Some
honestly need to.

2 - run a profiler or memory analyzer and see what's actually being held in
memory.  Probably large domain objects, or sometimes even services.

The reason you're holding these big objects is almost always one or both of
the following:

1 - improper use of models.  Not using detachable models.  Putting things
into new Model(someDomainObject).  Or holding fields references to domain
objects, or other large objects (even services).

2 - using final variables that are declared outside of an anonymous inner
class from within it (which creates a field variable in the anon-inn-class
for that object).


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


On Mon, Jan 17, 2011 at 9:27 AM, Mihai Toma mihai.t...@asf.ro wrote:

 Yes, I use HttpSessionStore.

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Monday, January 17, 2011 5:20 PM
 To: users@wicket.apache.org
 Subject: Re: session size

 Are you using HttpSessionStore (this is not the default - which means you
 would have to explicitly set this up in your application class)?

 On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov
 mgrigo...@apache.orgwrote:

  Try to find what is stored actually.
  Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/
 
  http://www.eclipse.org/mat/I expect that you store some bigger
  collections
  with your data with some of your components.
 
  On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote:
 
   Hi!
  
  
  
   I have an application build with wicket and I have a session problem.
  
  
  
   If one user browse the application the session (the object WebSession)
   becomes bigger and bigger, so if I browse 20 pages the session size has
   around 16 Mb.
  
   When I start browsing the session has something less than 100 Kb.
  
  
  
   I read some things about the pages which are stored in session in
  pageMaps
   and versions and I make different settings in Application class
   (getSessionSettings().setMaxPageMaps(10);
   getSessionSettings().setPageMapEvictionStrategy(new
   LeastRecentlyAccessedEvictionStrategy(10));
  
   ) but seems not to resolv my problem.
  
  
  
   Do you have any idea how can I limit the session size or how can I
 limit
   the
   number of pages stored in session?
  
  
  
   I use wicket 1.4.8.
  
  
  
   Thanks!
  
  
 



 --
 Jeremy Thomerson
 http://wickettraining.com
 *Need a CMS for Wicket?  Use Brix! http://brixcms.org*


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




Re: Browser loading absolute image paths

2011-01-17 Thread Martijn Dashorst
This will never, ever, ever work. Image's src attribute tells the
browser where to look. Since your customers won't have
F:\workspace\project\pictures\2\profile.jpg (or possibly they might,
but that is a 0.001% chance), the browser will shows a 404 image
not found error in the best possible scenario, but probably will fail
because you can't refer to local resources from an external domain
without breaking the sandbox.

Martijn

On Sat, Jan 15, 2011 at 8:34 PM, Emmanouil Batsis ma...@abiss.gr wrote:


 Quoting Henrique Boregio hbore...@gmail.com:

 img wicket:id=image src=F:\workspace\project\pictures\2\profile.jpg/

 That will never work. You *might* have a chance using the file: URI scheme
 like

 img wicket:id=image
 src=file:///F:/workspace/project/pictures/2/profile.jpg/


 but, overall, this may be a security thing that requires configuration on
 the browser side to work in any case.

 hth,

 Manos

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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



RE: session size

2011-01-17 Thread Mihai Toma
Thanks for your recommendations.

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Monday, January 17, 2011 5:33 PM
To: users@wicket.apache.org
Subject: Re: session size

Okay, so you are storing *every* page in your page map in session.  So,
here's your next path (already partially explained by others):

1 - Consider: must you use http session store?  why?  A lot of folks *think*
that they must, and they switch to it, but they don't really need to.  Some
honestly need to.

2 - run a profiler or memory analyzer and see what's actually being held in
memory.  Probably large domain objects, or sometimes even services.

The reason you're holding these big objects is almost always one or both of
the following:

1 - improper use of models.  Not using detachable models.  Putting things
into new Model(someDomainObject).  Or holding fields references to domain
objects, or other large objects (even services).

2 - using final variables that are declared outside of an anonymous inner
class from within it (which creates a field variable in the anon-inn-class
for that object).


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


On Mon, Jan 17, 2011 at 9:27 AM, Mihai Toma mihai.t...@asf.ro wrote:

 Yes, I use HttpSessionStore.

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Monday, January 17, 2011 5:20 PM
 To: users@wicket.apache.org
 Subject: Re: session size

 Are you using HttpSessionStore (this is not the default - which means you
 would have to explicitly set this up in your application class)?

 On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov
 mgrigo...@apache.orgwrote:

  Try to find what is stored actually.
  Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/
 
  http://www.eclipse.org/mat/I expect that you store some bigger
  collections
  with your data with some of your components.
 
  On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote:
 
   Hi!
  
  
  
   I have an application build with wicket and I have a session problem.
  
  
  
   If one user browse the application the session (the object WebSession)
   becomes bigger and bigger, so if I browse 20 pages the session size
has
   around 16 Mb.
  
   When I start browsing the session has something less than 100 Kb.
  
  
  
   I read some things about the pages which are stored in session in
  pageMaps
   and versions and I make different settings in Application class
   (getSessionSettings().setMaxPageMaps(10);
   getSessionSettings().setPageMapEvictionStrategy(new
   LeastRecentlyAccessedEvictionStrategy(10));
  
   ) but seems not to resolv my problem.
  
  
  
   Do you have any idea how can I limit the session size or how can I
 limit
   the
   number of pages stored in session?
  
  
  
   I use wicket 1.4.8.
  
  
  
   Thanks!
  
  
 



 --
 Jeremy Thomerson
 http://wickettraining.com
 *Need a CMS for Wicket?  Use Brix! http://brixcms.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



Check for User-Modified (Dirty) Fields before Form Submission

2011-01-17 Thread eugenebalt

Is there a way in wicket to check if a field has been modified by the user
before submitting the form?

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Check-for-User-Modified-Dirty-Fields-before-Form-Submission-tp3221228p3221228.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: Check for User-Modified (Dirty) Fields before Form Submission

2011-01-17 Thread Pedro Santos
or you can test if the formComponent.getConvertedInput() is different from
formComponent.getModelObject() at validation time (inside an IValidator
implementation)

On Mon, Jan 17, 2011 at 2:19 PM, Pedro Santos pedros...@gmail.com wrote:

 I guess you want to test if the raw input is different from the model
 value.


 On Mon, Jan 17, 2011 at 2:12 PM, eugenebalt eugeneb...@yahoo.com wrote:


 Is there a way in wicket to check if a field has been modified by the user
 before submitting the form?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Check-for-User-Modified-Dirty-Fields-before-Form-Submission-tp3221228p3221228.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




 --
 Pedro Henrique Oliveira dos Santos




-- 
Pedro Henrique Oliveira dos Santos


Re: Check for User-Modified (Dirty) Fields before Form Submission

2011-01-17 Thread Pedro Santos
I guess you want to test if the raw input is different from the model value.

On Mon, Jan 17, 2011 at 2:12 PM, eugenebalt eugeneb...@yahoo.com wrote:


 Is there a way in wicket to check if a field has been modified by the user
 before submitting the form?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Check-for-User-Modified-Dirty-Fields-before-Form-Submission-tp3221228p3221228.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




-- 
Pedro Henrique Oliveira dos Santos


Re: Check for User-Modified (Dirty) Fields before Form Submission

2011-01-17 Thread James Carman
Couldn't you do this with JavaScript?  Just modify a hidden form field if a
field is modified by the user?

On Mon, Jan 17, 2011 at 11:23 AM, Pedro Santos pedros...@gmail.com wrote:

 or you can test if the formComponent.getConvertedInput() is different from
 formComponent.getModelObject() at validation time (inside an IValidator
 implementation)

 On Mon, Jan 17, 2011 at 2:19 PM, Pedro Santos pedros...@gmail.com wrote:

  I guess you want to test if the raw input is different from the model
  value.
 
 
  On Mon, Jan 17, 2011 at 2:12 PM, eugenebalt eugeneb...@yahoo.com
 wrote:
 
 
  Is there a way in wicket to check if a field has been modified by the
 user
  before submitting the form?
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Check-for-User-Modified-Dirty-Fields-before-Form-Submission-tp3221228p3221228.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
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 



 --
 Pedro Henrique Oliveira dos Santos



Re: Nested Forms and Multipart Fileupload Issue

2011-01-17 Thread Alexander Morozov

Hi,

I have faced with another problem, related to nested forms and
FileUploadField (wicket-1.4.15).
The nested form have FileUploadField instance and defined setMaxSize(100K).
In case of submitting thru Ajax file more than 100K, hasError() on the
nested form return false. But I expect here 'true' - because of setMaxSize
constraint violation. Is this expected behavior ?

Quickstart is attached. 
http://apache-wicket.1842946.n4.nabble.com/file/n3221235/modalproject2.zip
modalproject2.zip 

Thanks

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3221235.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



Modal Window defined in actionpanel

2011-01-17 Thread gnugrf

I'm trying to get a modal window to popup to make edits on line items from a
Listview. I have an actionpanel with an edit button and I am having
troubles figuring out where to put the markup -- 
div wicket:id=modal/div. The actionpanel is an inner class taken from
the repeater examples. I've tried adding the modal window markup to the page
and to the markup for the actionpanel and neither are working. Maybe it is
dumb to create the modal window in onClick() method?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-Window-defined-in-actionpanel-tp3221239p3221239.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: Modal Window defined in actionpanel

2011-01-17 Thread James Carman
Just use one modal window.  The edit link would be an ajax link and
it would set the model for the window and show it.

On Mon, Jan 17, 2011 at 12:30 PM, gnugrf gnu...@sdf.lonestar.org wrote:

 I'm trying to get a modal window to popup to make edits on line items from a
 Listview. I have an actionpanel with an edit button and I am having
 troubles figuring out where to put the markup --
 div wicket:id=modal/div. The actionpanel is an inner class taken from
 the repeater examples. I've tried adding the modal window markup to the page
 and to the markup for the actionpanel and neither are working. Maybe it is
 dumb to create the modal window in onClick() method?
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Modal-Window-defined-in-actionpanel-tp3221239p3221239.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: [Ljava.lang.String; cannot be cast to java.lang.String - BookmarkablePageRequestTargetUrlCodingStrategy

2011-01-17 Thread Douglas Ferguson
Thoughts?

On Jan 14, 2011, at 5:44 PM, Douglas Ferguson wrote:

 This looks like it must have been one of them.
 
 - - [13/Jan/2011:14:26:34 -0600] GET 
 /?wicket:interface=:26::INewBrowserWindowListener:: HTTP/1.1 302 - 
 http://app.buzzstream.com/link_partners/wicket:pageMapName/link_partners/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/wicket:pageMapName/resources;
  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 
 Firefox/3.6.13 GTB7.1 ( .NET CLR 3.5.30729)
 - - [13/Jan/2011:14:26:34 -0600] GET /?wicket:interface=wicket-8:27 
 HTTP/1.1 200 3163 
 http://app.buzzstream.com/link_partners/wicket:pageMapName/link_partners/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/wicket:pageMapName/resources;
  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 
 Firefox/3.6.13 GTB7.1 ( .NET CLR 3.5.30729)
 
 
 On Jan 14, 2011, at 5:23 PM, Igor Vaynberg wrote:
 
 do their apache logs contain a sample of the url that caused this
 error? would be helpful to see one.
 
 -igor
 
 On Fri, Jan 14, 2011 at 3:12 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Sorry about my previous title.
 
 I'm not sure what's causing this, but I've spoken with some of my clients, 
 who spawned these errors and they weren't manipulating the querystrings..
 So I'm not sure how two pagemap paramenters are getting in there..
 
 D/
 
 On Jan 13, 2011, at 11:40 AM, Douglas Ferguson wrote:
 
 I see the stack trace below in my production logs quite often.
 
 I'm not sure what is causing it but it seems that this error need not 
 happen. I.E. Why Cast this to a string when it could easily be String[] if 
 somebody messes with the query string?
 
 Seem like a parameters.removeFirst() method could prevent this..
 
  String pageMapNameEncoded = 
 (String)parameters.remove(WebRequestCodingStrategy.PAGEMAP);
  if (requestParameters.getPageMapName() == null)
  {
  requestParameters.setPageMapName(pageMapNameEncoded);
  }
 
 
 
 
 [Ljava.lang.String; cannot be cast to java.lang.String
 java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to 
 java.lang.String
 at 
 org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:91)
 at 
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:537)
 at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:191)
 at 
 org.apache.wicket.protocol.https.HttpsRequestCycleProcessor.resolve(HttpsRequestCycleProcessor.java:219)
 at 
 com.conducive.wicket.PRManagerApplication$8.resolve(PRManagerApplication.java:709)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:317)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
 at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
 at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
 at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
 at java.lang.Thread.run(Unknown Source)
 
 
 
 
 -
 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 

JasperReport viewing options for wicket 1.5

2011-01-17 Thread Jim Pinkham
I found this tantalizingly close msg:

http://www.mail-archive.com/users@wicket.apache.org/msg55375.html

Sounds like about what I'd need; except I've moved on to wicket 1.5.

I don't need any pagination or other bells  whistles - just a simple way to
deliver dynamically generated pdf reports.  (Although Excel ouput might be
nice too)

I think I'd do links with report name and other named parameters in the URL,
then have my app declare a shared resource mounted at \reports.

I was hoping someone has already done this and I could learn (or shamelessly
copy) from it.  ;)

I could not find any version of org.wicketstuff jasperreports  1.4.x

I did find jasperreports-maven-plugin and so it's compiling .jrxml into
.jasper at build time just fine.

Could someone kindly point me in the right direction with a brief example
perhaps?

Thanks,
-- Jim.


Re: Check for User-Modified (Dirty) Fields before Form Submission

2011-01-17 Thread Paul Wong
We've done it in our project using a jquery plugin:
http://www.thoughtdelimited.org/dirtyFields/index.cfm


On Tue, Jan 18, 2011 at 3:33 AM, James Carman ja...@carmanconsulting.comwrote:

 Couldn't you do this with JavaScript?  Just modify a hidden form field if a
 field is modified by the user?

 On Mon, Jan 17, 2011 at 11:23 AM, Pedro Santos pedros...@gmail.com
 wrote:

  or you can test if the formComponent.getConvertedInput() is different
 from
  formComponent.getModelObject() at validation time (inside an IValidator
  implementation)
 
  On Mon, Jan 17, 2011 at 2:19 PM, Pedro Santos pedros...@gmail.com
 wrote:
 
   I guess you want to test if the raw input is different from the model
   value.
  
  
   On Mon, Jan 17, 2011 at 2:12 PM, eugenebalt eugeneb...@yahoo.com
  wrote:
  
  
   Is there a way in wicket to check if a field has been modified by the
  user
   before submitting the form?
  
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/Check-for-User-Modified-Dirty-Fields-before-Form-Submission-tp3221228p3221228.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
  
  
  
  
   --
   Pedro Henrique Oliveira dos Santos
  
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 



Re: Modal Window defined in actionpanel

2011-01-17 Thread gnugrf

I figured it out - I was creating the modal window inside the onClick()
method, but it needed to take place outside the method. I was able to put
the markup inside the corresponding action panel html. When the onclick is
called it's just recreating the modal window (because we need to construct
with the appropriate lineitem id).
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-Window-defined-in-actionpanel-tp3221239p3221274.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: howto integrate third-party ajax with channels?

2011-01-17 Thread Igor Vaynberg
can you do the flushing yourself by registering a wicket.ajax.pre-call-handler?

-igor

On Mon, Jan 17, 2011 at 2:57 AM, Frank van Lankvelt
f.vanlankv...@onehippo.com wrote:
 I'm regularly running into problems when integrating client-side ajax code.
  The issue is that the client-side code is doing throttled asynchronous
 calls to wicket ajax behaviors.
 Now, this generally works fine until I want to integrate this with native
 wicket calls (links, buttons).  Then, such throttled calls should be flushed
 before the native request is sent to the server.

 The only way I can see/make this work is by registering pre-call handlers
 and doing the requests synchronously from the pre-call handler.
 A short explanation; the request cannot be done asynchronously as there is
 no guarantee that it will arrive at the server before the original call
 (that triggered the pre-call handler) arrives.
 This is clumsy and, generally, error-prone.

 It also appears to be partly re-doing what Wicket's channels already do, as
 channels take care of request ordering.  So I wonder whether I am
 overlooking something.  How do you guys handle this?

 Thinking out loud: would it be possible to have a 'throttled' channel that
 is flushed whenever a request is scheduled on the default channel (0|s)?
 That way, third-party JS lib integrations could schedule calls to this
 channel on every key-stroke, having the synchronization handled
 automatically.

 cheers, Frank


 --
 Hippo Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 (0)20
 522 4466
 USA  • San Francisco 755 Baywood Drive, Second Floor •  Petaluma, CA. 94954
 •  +1 877 414 4776 (toll free)
 Canada    •   Montréal  5369 Boulevard St-Laurent #430 •  Montréal QC H2T
 1S5  •  +1 (514) 316 8966
 www.onehippo.com  •  www.onehippo.org  •  i...@onehippo.com
 
 This e-mail may be privileged and/or confidential, and the sender does
 not waive any related rights and obligations. Any distribution, use or
 copying of this e-mail or the information it contains by other than an
 intended recipient is unauthorized. If you received this e-mail in
 error, please advise me (by return e-mail or otherwise) immediately.


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



Re: [Ljava.lang.String; cannot be cast to java.lang.String - BookmarkablePageRequestTargetUrlCodingStrategy

2011-01-17 Thread Igor Vaynberg
not really sure what is happenning. that url is pretty badly mangled.
can you set a breakpoint in part of the code that generates it and see
if its wicket or someone is playing with the url.

-igor


On Mon, Jan 17, 2011 at 11:56 AM, Douglas Ferguson
doug...@douglasferguson.us wrote:
 Thoughts?

 On Jan 14, 2011, at 5:44 PM, Douglas Ferguson wrote:

 This looks like it must have been one of them.

 - - [13/Jan/2011:14:26:34 -0600] GET 
 /?wicket:interface=:26::INewBrowserWindowListener:: HTTP/1.1 302 - 
 http://app.buzzstream.com/link_partners/wicket:pageMapName/link_partners/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/wicket:pageMapName/resources;
  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) 
 Gecko/20101203 Firefox/3.6.13 GTB7.1 ( .NET CLR 3.5.30729)
 - - [13/Jan/2011:14:26:34 -0600] GET /?wicket:interface=wicket-8:27 
 HTTP/1.1 200 3163 
 http://app.buzzstream.com/link_partners/wicket:pageMapName/link_partners/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/wicket:pageMapName/resources;
  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) 
 Gecko/20101203 Firefox/3.6.13 GTB7.1 ( .NET CLR 3.5.30729)


 On Jan 14, 2011, at 5:23 PM, Igor Vaynberg wrote:

 do their apache logs contain a sample of the url that caused this
 error? would be helpful to see one.

 -igor

 On Fri, Jan 14, 2011 at 3:12 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Sorry about my previous title.

 I'm not sure what's causing this, but I've spoken with some of my clients, 
 who spawned these errors and they weren't manipulating the querystrings..
 So I'm not sure how two pagemap paramenters are getting in there..

 D/

 On Jan 13, 2011, at 11:40 AM, Douglas Ferguson wrote:

 I see the stack trace below in my production logs quite often.

 I'm not sure what is causing it but it seems that this error need not 
 happen. I.E. Why Cast this to a string when it could easily be String[] 
 if somebody messes with the query string?

 Seem like a parameters.removeFirst() method could prevent this..

              String pageMapNameEncoded = 
 (String)parameters.remove(WebRequestCodingStrategy.PAGEMAP);
              if (requestParameters.getPageMapName() == null)
              {
                      requestParameters.setPageMapName(pageMapNameEncoded);
              }




 [Ljava.lang.String; cannot be cast to java.lang.String
 java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to 
 java.lang.String
     at 
 org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:91)
     at 
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:537)
     at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:191)
     at 
 org.apache.wicket.protocol.https.HttpsRequestCycleProcessor.resolve(HttpsRequestCycleProcessor.java:219)
     at 
 com.conducive.wicket.PRManagerApplication$8.resolve(PRManagerApplication.java:709)
     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
     at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
     at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
     at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:317)
     at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
     at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
     at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
     at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
     at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
     at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
     at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
     at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
     at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
     at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
     at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
     at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
     at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
     at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
     at java.lang.Thread.run(Unknown Source)




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



 

Re: Check for User-Modified (Dirty) Fields before Form Submission

2011-01-17 Thread jcgarciam

JavaScript Trick:

After Page Load, serialized your form elements into a global variable.
Before Submit, serialize your form elements again and compare
it against your previously serialized version.

Rinse and Repeat

On Mon, Jan 17, 2011 at 1:12 PM, eugenebalt [via Apache Wicket] 
ml-node+3221228-1217690326-65...@n4.nabble.comml-node%2b3221228-1217690326-65...@n4.nabble.com
 wrote:

 Is there a way in wicket to check if a field has been modified by the user
 before submitting the form?


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/Check-for-User-Modified-Dirty-Fields-before-Form-Submission-tp3221228p3221228.html
 To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.comml-node%2b1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
--Anyone who has never made a mistake has never tried anything new.--

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Check-for-User-Modified-Dirty-Fields-before-Form-Submission-tp3221228p3221278.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: Check for User-Modified (Dirty) Fields before Form Submission

2011-01-17 Thread jcgarciam

JavaScript Trick:

After Page Load, serialized your form elements into a global variable.
Before Submit, serialize your form elements again and compare it against
your previously serialized version.

Rinse and Repeat
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Check-for-User-Modified-Dirty-Fields-before-Form-Submission-tp3221228p3221280.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



Anyone seen this, ajaxsubmit link

2011-01-17 Thread Brown, Berlin [GCG-PFS]
ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
javascript: ReferenceError: custom_inputHints is not defined
ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
javascript: ReferenceError: custom_inputHints is not defined
ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
javascript: ReferenceError: custom_inputHints is not defined
 
 
I added an ajax submit link to a form.  I click on the ajax submit link
and I get this error.
 
On the first click, there is an error and no response from the button.
On the second click, the buttons responds and no error.
 
Berlin Brown
 


Re: howto integrate third-party ajax with channels?

2011-01-17 Thread Frank van Lankvelt
I can, and generally I'm able to resolve the race between multiple xhr
requests.  But only by using synchronous requests.  I was hoping to be
able to do it using async only (synchronous xhr is evil, as I've seen
Mathej remark in an old thread).  So being able to schedule a request
on a channel, before the call that invokes the pre-call listener is
sent, would be the perfect solution.

Perhaps hooking the channel manager would provide a way to schedule a
flush before the actual call is made?  Should at least keep everything
async, so UI responsive.

Thanks for reading my rambling,
Cheers, Frank


Op 18 jan. 2011 om 01:35 heeft Igor Vaynberg igor.vaynb...@gmail.com
het volgende geschreven:

 can you do the flushing yourself by registering a 
 wicket.ajax.pre-call-handler?

 -igor

 On Mon, Jan 17, 2011 at 2:57 AM, Frank van Lankvelt
 f.vanlankv...@onehippo.com wrote:
 I'm regularly running into problems when integrating client-side ajax code.
  The issue is that the client-side code is doing throttled asynchronous
 calls to wicket ajax behaviors.
 Now, this generally works fine until I want to integrate this with native
 wicket calls (links, buttons).  Then, such throttled calls should be flushed
 before the native request is sent to the server.

 The only way I can see/make this work is by registering pre-call handlers
 and doing the requests synchronously from the pre-call handler.
 A short explanation; the request cannot be done asynchronously as there is
 no guarantee that it will arrive at the server before the original call
 (that triggered the pre-call handler) arrives.
 This is clumsy and, generally, error-prone.

 It also appears to be partly re-doing what Wicket's channels already do, as
 channels take care of request ordering.  So I wonder whether I am
 overlooking something.  How do you guys handle this?

 Thinking out loud: would it be possible to have a 'throttled' channel that
 is flushed whenever a request is scheduled on the default channel (0|s)?
 That way, third-party JS lib integrations could schedule calls to this
 channel on every key-stroke, having the synchronization handled
 automatically.

 cheers, Frank


 --
 Hippo Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 (0)20
 522 4466
 USA  • San Francisco 755 Baywood Drive, Second Floor •  Petaluma, CA. 94954
 •  +1 877 414 4776 (toll free)
 Canada•   Montréal  5369 Boulevard St-Laurent #430 •  Montréal QC H2T
 1S5  •  +1 (514) 316 8966
 www.onehippo.com  •  www.onehippo.org  •  i...@onehippo.com
 
 This e-mail may be privileged and/or confidential, and the sender does
 not waive any related rights and obligations. Any distribution, use or
 copying of this e-mail or the information it contains by other than an
 intended recipient is unauthorized. If you received this e-mail in
 error, please advise me (by return e-mail or otherwise) immediately.


 -
 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: howto integrate third-party ajax with channels?

2011-01-17 Thread Igor Vaynberg
from the outside it seems like a rather complex and rare usecase. you
are welcome to create a jira issue with the hooks you need to
implement this in the channel manager js class. preferrably with a
patch.

-igor

On Mon, Jan 17, 2011 at 10:49 PM, Frank van Lankvelt
f.vanlankv...@1hippo.com wrote:
 I can, and generally I'm able to resolve the race between multiple xhr
 requests.  But only by using synchronous requests.  I was hoping to be
 able to do it using async only (synchronous xhr is evil, as I've seen
 Mathej remark in an old thread).  So being able to schedule a request
 on a channel, before the call that invokes the pre-call listener is
 sent, would be the perfect solution.

 Perhaps hooking the channel manager would provide a way to schedule a
 flush before the actual call is made?  Should at least keep everything
 async, so UI responsive.

 Thanks for reading my rambling,
 Cheers, Frank


 Op 18 jan. 2011 om 01:35 heeft Igor Vaynberg igor.vaynb...@gmail.com
 het volgende geschreven:

 can you do the flushing yourself by registering a 
 wicket.ajax.pre-call-handler?

 -igor

 On Mon, Jan 17, 2011 at 2:57 AM, Frank van Lankvelt
 f.vanlankv...@onehippo.com wrote:
 I'm regularly running into problems when integrating client-side ajax code.
  The issue is that the client-side code is doing throttled asynchronous
 calls to wicket ajax behaviors.
 Now, this generally works fine until I want to integrate this with native
 wicket calls (links, buttons).  Then, such throttled calls should be flushed
 before the native request is sent to the server.

 The only way I can see/make this work is by registering pre-call handlers
 and doing the requests synchronously from the pre-call handler.
 A short explanation; the request cannot be done asynchronously as there is
 no guarantee that it will arrive at the server before the original call
 (that triggered the pre-call handler) arrives.
 This is clumsy and, generally, error-prone.

 It also appears to be partly re-doing what Wicket's channels already do, as
 channels take care of request ordering.  So I wonder whether I am
 overlooking something.  How do you guys handle this?

 Thinking out loud: would it be possible to have a 'throttled' channel that
 is flushed whenever a request is scheduled on the default channel (0|s)?
 That way, third-party JS lib integrations could schedule calls to this
 channel on every key-stroke, having the synchronization handled
 automatically.

 cheers, Frank


 --
 Hippo Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 (0)20
 522 4466
 USA  • San Francisco 755 Baywood Drive, Second Floor •  Petaluma, CA. 94954
 •  +1 877 414 4776 (toll free)
 Canada    •   Montréal  5369 Boulevard St-Laurent #430 •  Montréal QC H2T
 1S5  •  +1 (514) 316 8966
 www.onehippo.com  •  www.onehippo.org  •  i...@onehippo.com
 
 This e-mail may be privileged and/or confidential, and the sender does
 not waive any related rights and obligations. Any distribution, use or
 copying of this e-mail or the information it contains by other than an
 intended recipient is unauthorized. If you received this e-mail in
 error, please advise me (by return e-mail or otherwise) immediately.


 -
 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



JavaScript bug in IE (wicket-event.js)

2011-01-17 Thread Alec Swan
Hello,

I have a website using Wicket 1.4.14. There is a link which pops up a
window/page generated by Wicket. The popup works great in Firefox and
Chrome, but in IE I get the following error:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0; MDDR; InfoPath.3)
Timestamp: Tue, 18 Jan 2011 07:47:14 UTC

Message: 'navigator' is undefined
Line: 21
Char: 1
Code: 0
URI:
http://www.customerelite.com/lrm/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js

Is this a bug? Any easy way to fix/patch this?

Thanks,

Alec