Re: Handling page refresh or redirect when the server reboots

2014-10-21 Thread Martin Grigorov
Hi,

HttpXmlRequest is asynchronous by default.
It is not finished by the time you return from your function.

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

On Tue, Oct 21, 2014 at 8:37 AM, msalman mohammad_sal...@yahoo.com wrote:

 Sebastian, thanks for your response and idea.


 Taking your idea  myproject.zip
 http://apache-wicket.1842946.n4.nabble.com/file/n4667990/myproject.zip
 I
 am trying to use the following javascript code in wicket:



 Http.Get = function(theUrl)
 {
 var xmlHttp = null;
 try
 {
 xmlHttp = new XMLHttpRequest();
 return xmlHttp.open(GET, theUrl, true );
 xmlHttp.send();
 return xmlHttp.statusText;
 //return xmlHttp.responseText;
 }
 catch (error)
 {
 return 'error in my code: ' + error;
 }
 }


 The above code is called via:

 add(new AjaxLink(link)
 {


 @Override
 public void onClick(AjaxRequestTarget target)
 {
 target.add(testLabel);
 }


 @Override
 protected IAjaxCallDecorator getAjaxCallDecorator()
 {
 return new IAjaxCallDecorator()
 {
 private static final long
 serialVersionUID = 1L;

 public CharSequence decorateScript(
 Component component,
 CharSequence script)
 {
 return
 document.getElementById('testlabel').innerHTML = 'plain '  +
 Http.Get('http://www.cnn.com') ; + script;
 }


 public CharSequence
 decorateOnSuccessScript(
 Component component,
 CharSequence script)
 {
 return
 document.getElementById('testlabel').innerHTML = 'on success '
 + Http.Get('http://www.cnn.com') ; + script;
 }


 public CharSequence
 decorateOnFailureScript(
 Component component,
 CharSequence script)
 {
 return
 document.getElementById('testlabel').innerHTML = 'on Failure '
 +  Http.Get('http://www.cnn.com') ; + script;
 }
 };
 }

 });


 The problem is that when I use it in wicket the xmlHttp.statusText or
 xmlHttp.responseText returns nothing.
 Can any one please tell me what I might be doing wrong?
 Does the code or calling it even makes sense?

 I am attaching  quickstart project.  Please see:
 com.mytest.javascript.*


 Thanks.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Handling-page-refresh-or-redirect-when-the-server-reboots-tp4667465p4667990.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 clear select2Choice component model value.

2014-10-21 Thread Martin Grigorov
Hi Maxim,

Please prepare a quickstart at GitHub and I'll take a look.

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

On Fri, Oct 17, 2014 at 5:42 PM, Maxim Solodovnik solomax...@gmail.com
wrote:

 Martin,

 I have forked select2, unfortunately I'm still not sure how to fix the
 issue :(
 Clean link is added to the form and select data is being restored from
 requestParameters :(

 On 13 October 2014 19:06, Martin Grigorov mgrigo...@apache.org wrote:

  Maxim,
 
  Feel free to fork it! I.e. move it to WicketStuff.
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Thu, Oct 9, 2014 at 8:53 PM, Maxim Solodovnik solomax...@gmail.com
  wrote:
 
   Additionally select2 seems to need to be forked to wicketstuff to be
  fixed,
   should I do this?
  
   On 10 October 2014 00:49, Maxim Solodovnik solomax...@gmail.com
 wrote:
  
@Paul, @Martin
   
Select2Choice sets back its value
to getWebRequest().getRequestParameters().getParameterNames()
in renderInitializationScript method [1]
It seems like JS code like: $(#country1).select2(data, null); can
  be
executed on clear input, but this seems to be workaround
   
I'm not sure why [1] method is used to get value, maybe you can
 suggest
correct way of fixing this?
   
   
[1]
   
  
 
 https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62
   
On 9 October 2014 16:39, MadasamySankarapandian 
  madas...@mcruncher.com
wrote:
   
Thanks Maxim Solodovnik.
   
On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik 
  solomax...@gmail.com
   
wrote:
   
 I also noticed this issue in our project,
 Will try to take a look at it

 On 9 October 2014 07:33, MadasamySankarapandian 
   madas...@mcruncher.com

 wrote:

  Thankyou very much for yours reply.
 
  I call formComponent.clearInput() in my ClearFormVisitor class.
  But
   It
 does
  not work.
  I have created issue-96
  https://github.com/ivaynberg/wicket-select2/issues/96 in
 wicket-select2
  project.
 
 
 
 
 
 
  On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik 
solomax...@gmail.com
  wrote:
 
   Done, thanks for pointing this out
  
   On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote:
  
Can you update this issue then?
   
https://github.com/ivaynberg/wicket-select2/issues/93
   
On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik 
  solomax...@gmail.com
wrote:
   
 we recently moved this component to wicketstuff:


   
  
 

   
  
 
 https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent

 to get Wicket7 compatible version


 On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote:

  You can also ask the developer via:
  https://github.com/ivaynberg/wicket-select2/issues
 
  You should probably take a look over the open issues so
  that
you
  are
  familiar with that other developers faced. Maybe one of
   those
  issues
 might
  be a road block for you?
 
  Although you will get a faster reply from Igor or
 another
Wicket
 developer
  via this list :)
 
  On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov 
   mgrigo...@apache.org
  wrote:
 
   Hi,
  
   You should call formComponent.clearInput() too.
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
   On Tue, Oct 7, 2014 at 9:13 AM,
 MadasamySankarapandian 
   madas...@mcruncher.com wrote:
  
   
This is regarding wicket-select2 project. I could
 not
   find
 any
 mailing
list for this project. That is why sending here.
  Please
some
  one
help
  me.
   
I have created clear link to clear the form input
   values.
 After
click
  the
clear link,  all components values are cleared
 except
   Select2Choice
component.
   
Here with attached quickstart to recreate this
  problem.
   
Follow below steps to recreate this problem
   
* Download attachment and extract it.
* cd select2-quickstart.
* Then execute mvn clean package jetty:run
* Type localhost:8080 in browser
* Give the input to name and country field.
* Click clear link
   
Now name(*TextField*) field value is cleared and
  country(*Select2Choice*)
field value is not cleared.
  

Re: ModalWindow - full screen

2014-10-21 Thread Marieke Vandamme
Hi,

We've tried your proposal, but it doesn't work, because the setCssClassName
doesn't apply to the div that needs to be resized.
In code underneath you can see the structure. The class should be place on
the div that now has wicket-modal, but this is not possible, or is it?
- cannot depend on element higher in the html, because the only element
would be the body, and this modalwindow is used onto multiple pages
- cannot use wicket-modal class, because it the full screen may not
reflect on all modal windows

div class=wicket-modal id=_wicket_window_0 role=dialog style=top:
54px; left: 76px; width: 1000px; position: absolute; visibility: visible;
form
style=background-color:transparent;padding:0px;margin:0px;border-width:0px;position:staticdiv
id=_wicket_window_1 class=OWN_CLASS_NAME

Thanks ! Kind Regards, Marieke


Met vriendelijke groeten,


*MARIEKE VANDAMMECORPORATE SERVICES* • *Domain Coordinator*
T +32 56 43 42 45 • F +32 56 43 44 46 • marieke.vanda...@tvh.com

*TVH GROUP NV*
Brabantstraat 15 • BE-8790 WAREGEM
T +32 56 43 42 11 • F +32 56 43 44 88 • www.tvh.com
Watch our company movies on www.tvh.tv

2014-10-14 11:10 GMT+02:00 Martin Grigorov mgrigo...@apache.org:

 Hi,

 With #setCssClassName() (

 https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java#L513
 )
 you can set your custom CSS class that should be applied on the main modal
 window div element.
 In your own .css file you can define CSS rules to show any element having
 this custom CSS class as fullscreen.
 I am not CSS master but I guess you have to play with position, top,
 left. width and height properties.

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

 On Tue, Oct 14, 2014 at 11:32 AM, Marieke Vandamme 
 marieke.vanda...@tvh.com
  wrote:

  Hi,
 
  I know you can set initial width and height for a modalwindow,
  but we now get the requirement to open it full screen.
  Is this something built in already, or has somebody done this before?
 
  Thanks ! Kind Regards, Marieke Vandamme
 
  --
 
 
   DISCLAIMER 
 
  http://www.tvh.com/glob/en/email-disclaimer
 
  This message is delivered to all addressees subject to the conditions
  set forth in the attached disclaimer, which is an integral part of this
  message.
 


-- 


 DISCLAIMER 

http://www.tvh.com/glob/en/email-disclaimer

This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message.


Re: ModalWindow - full screen

2014-10-21 Thread Martin Grigorov
Hi,

I see two ways to do it then:
1) ModalWindow#setMarkupId(myFullscreenId); $(#myFullscreenId)
2) $(.OWN_CLASS_NAME).closest(div)

both gives you a reference to the div.modal-window.
From there on you can manipulate it to make it fullscreen.





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

On Tue, Oct 21, 2014 at 12:18 PM, Marieke Vandamme marieke.vanda...@tvh.com
 wrote:

 Hi,

 We've tried your proposal, but it doesn't work, because the setCssClassName
 doesn't apply to the div that needs to be resized.
 In code underneath you can see the structure. The class should be place on
 the div that now has wicket-modal, but this is not possible, or is it?
 - cannot depend on element higher in the html, because the only element
 would be the body, and this modalwindow is used onto multiple pages
 - cannot use wicket-modal class, because it the full screen may not
 reflect on all modal windows

 div class=wicket-modal id=_wicket_window_0 role=dialog style=top:
 54px; left: 76px; width: 1000px; position: absolute; visibility: visible;
 form

 style=background-color:transparent;padding:0px;margin:0px;border-width:0px;position:staticdiv
 id=_wicket_window_1 class=OWN_CLASS_NAME

 Thanks ! Kind Regards, Marieke


 Met vriendelijke groeten,


 *MARIEKE VANDAMMECORPORATE SERVICES* • *Domain Coordinator*
 T +32 56 43 42 45 • F +32 56 43 44 46 • marieke.vanda...@tvh.com

 *TVH GROUP NV*
 Brabantstraat 15 • BE-8790 WAREGEM
 T +32 56 43 42 11 • F +32 56 43 44 88 • www.tvh.com
 Watch our company movies on www.tvh.tv

 2014-10-14 11:10 GMT+02:00 Martin Grigorov mgrigo...@apache.org:

  Hi,
 
  With #setCssClassName() (
 
 
 https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java#L513
  )
  you can set your custom CSS class that should be applied on the main
 modal
  window div element.
  In your own .css file you can define CSS rules to show any element having
  this custom CSS class as fullscreen.
  I am not CSS master but I guess you have to play with position, top,
  left. width and height properties.
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Tue, Oct 14, 2014 at 11:32 AM, Marieke Vandamme 
  marieke.vanda...@tvh.com
   wrote:
 
   Hi,
  
   I know you can set initial width and height for a modalwindow,
   but we now get the requirement to open it full screen.
   Is this something built in already, or has somebody done this before?
  
   Thanks ! Kind Regards, Marieke Vandamme
  
   --
  
  
    DISCLAIMER 
  
   http://www.tvh.com/glob/en/email-disclaimer
  
   This message is delivered to all addressees subject to the conditions
   set forth in the attached disclaimer, which is an integral part of this
   message.
  
 

 --


  DISCLAIMER 

 http://www.tvh.com/glob/en/email-disclaimer

 This message is delivered to all addressees subject to the conditions
 set forth in the attached disclaimer, which is an integral part of this
 message.



Re: Could not clear select2Choice component model value.

2014-10-21 Thread Maxim Solodovnik
Here it is:
https://github.com/solomax/WicketSelect2Clear

somehow in this example nothing works as expected :(
I tried 2 different approaches, correct new value arrives to the page
(according to wicket debug) but select2 is not being updated :(

On 21 October 2014 13:23, Martin Grigorov mgrigo...@apache.org wrote:

 Hi Maxim,

 Please prepare a quickstart at GitHub and I'll take a look.

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

 On Fri, Oct 17, 2014 at 5:42 PM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  Martin,
 
  I have forked select2, unfortunately I'm still not sure how to fix the
  issue :(
  Clean link is added to the form and select data is being restored from
  requestParameters :(
 
  On 13 October 2014 19:06, Martin Grigorov mgrigo...@apache.org wrote:
 
   Maxim,
  
   Feel free to fork it! I.e. move it to WicketStuff.
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
   On Thu, Oct 9, 2014 at 8:53 PM, Maxim Solodovnik solomax...@gmail.com
 
   wrote:
  
Additionally select2 seems to need to be forked to wicketstuff to be
   fixed,
should I do this?
   
On 10 October 2014 00:49, Maxim Solodovnik solomax...@gmail.com
  wrote:
   
 @Paul, @Martin

 Select2Choice sets back its value
 to getWebRequest().getRequestParameters().getParameterNames()
 in renderInitializationScript method [1]
 It seems like JS code like: $(#country1).select2(data, null);
 can
   be
 executed on clear input, but this seems to be workaround

 I'm not sure why [1] method is used to get value, maybe you can
  suggest
 correct way of fixing this?


 [1]

   
  
 
 https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62

 On 9 October 2014 16:39, MadasamySankarapandian 
   madas...@mcruncher.com
 wrote:

 Thanks Maxim Solodovnik.

 On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik 
   solomax...@gmail.com

 wrote:

  I also noticed this issue in our project,
  Will try to take a look at it
 
  On 9 October 2014 07:33, MadasamySankarapandian 
madas...@mcruncher.com
 
  wrote:
 
   Thankyou very much for yours reply.
  
   I call formComponent.clearInput() in my ClearFormVisitor
 class.
   But
It
  does
   not work.
   I have created issue-96
   https://github.com/ivaynberg/wicket-select2/issues/96 in
  wicket-select2
   project.
  
  
  
  
  
  
   On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik 
 solomax...@gmail.com
   wrote:
  
Done, thanks for pointing this out
   
On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote:
   
 Can you update this issue then?

 https://github.com/ivaynberg/wicket-select2/issues/93

 On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik 
   solomax...@gmail.com
 wrote:

  we recently moved this component to wicketstuff:
 
 

   
  
 

   
  
 
 https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent
 
  to get Wicket7 compatible version
 
 
  On 7 October 2014 22:56, Paul Bors p...@bors.ws
 wrote:
 
   You can also ask the developer via:
   https://github.com/ivaynberg/wicket-select2/issues
  
   You should probably take a look over the open issues
 so
   that
 you
   are
   familiar with that other developers faced. Maybe one
 of
those
   issues
  might
   be a road block for you?
  
   Although you will get a faster reply from Igor or
  another
 Wicket
  developer
   via this list :)
  
   On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov 
mgrigo...@apache.org
   wrote:
  
Hi,
   
You should call formComponent.clearInput() too.
   
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
   
On Tue, Oct 7, 2014 at 9:13 AM,
  MadasamySankarapandian 
madas...@mcruncher.com wrote:
   

 This is regarding wicket-select2 project. I could
  not
find
  any
  mailing
 list for this project. That is why sending here.
   Please
 some
   one
 help
   me.

 I have created clear link to clear the form input
values.
  After
 click
   the
 clear link,  all components values are cleared
  except
Select2Choice
 component.

 Here with attached quickstart to recreate this
   

Lock timeout per page class

2014-10-21 Thread Guillaume Smet
Hi,

We have a few pages in our application which might take a long time to
generate. This is definitely not the usual case but there are a few of
them.

Thus we were forced to define a high lockTimeout to be sure these
pages can be served.

The fact is that we would really like to have a far lower default
timeout except for these pages.

Is there a way to configure the lockTimeout on a per page basis (I
haven't found one)?

If not, would it be a good idea to provide a way to do so?

Thanks for your feedback.

-- 
Guillaume

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



Re: Lock timeout per page class

2014-10-21 Thread Martin Grigorov
Hi Guillaume,

You can
use org.apache.wicket.request.cycle.PageRequestHandlerTracker#getFirstHandler()
to check what is the requested page in your
own org.apache.wicket.settings.def.RequestCycleSettings#getTimeout

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

On Tue, Oct 21, 2014 at 1:12 PM, Guillaume Smet guillaume.s...@gmail.com
wrote:

 Hi,

 We have a few pages in our application which might take a long time to
 generate. This is definitely not the usual case but there are a few of
 them.

 Thus we were forced to define a high lockTimeout to be sure these
 pages can be served.

 The fact is that we would really like to have a far lower default
 timeout except for these pages.

 Is there a way to configure the lockTimeout on a per page basis (I
 haven't found one)?

 If not, would it be a good idea to provide a way to do so?

 Thanks for your feedback.

 --
 Guillaume

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




Re: Lock timeout per page class

2014-10-21 Thread Guillaume Smet
Thanks Martin!

We will give it a try and post what we got.

-- 
Guillaume

On Tue, Oct 21, 2014 at 1:19 PM, Martin Grigorov mgrigo...@apache.org wrote:
 Hi Guillaume,

 You can
 use 
 org.apache.wicket.request.cycle.PageRequestHandlerTracker#getFirstHandler()
 to check what is the requested page in your
 own org.apache.wicket.settings.def.RequestCycleSettings#getTimeout

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

 On Tue, Oct 21, 2014 at 1:12 PM, Guillaume Smet guillaume.s...@gmail.com
 wrote:

 Hi,

 We have a few pages in our application which might take a long time to
 generate. This is definitely not the usual case but there are a few of
 them.

 Thus we were forced to define a high lockTimeout to be sure these
 pages can be served.

 The fact is that we would really like to have a far lower default
 timeout except for these pages.

 Is there a way to configure the lockTimeout on a per page basis (I
 haven't found one)?

 If not, would it be a good idea to provide a way to do so?

 Thanks for your feedback.

 --
 Guillaume

 -
 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



org.apache.wicket.util.upload.FileUploadBase#fileSizeMax

2014-10-21 Thread Roman Grigoriadi
Hi Wicket users,

I am trying to check size of a single file in a multi file upload POST
request. It seems there is a parameter for this in FileUploadBase class
called fileSizeMax which is used for checking length of an input stream
for a file during parsing request and writing files to disk temp. Is there
any way to propagate this parameter inside considering use of default
MultipartServletWebRequestImpl ?

I am using wicket 6.11.0

Thanks, best regards!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-util-upload-FileUploadBase-fileSizeMax-tp4668001.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: org.apache.wicket.util.upload.FileUploadBase#fileSizeMax

2014-10-21 Thread Martin Grigorov
Hi,

It is not clear to me what you want to accomplish.

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

On Tue, Oct 21, 2014 at 4:39 PM, Roman Grigoriadi 
roman.grigori...@gmail.com wrote:

 Hi Wicket users,

 I am trying to check size of a single file in a multi file upload POST
 request. It seems there is a parameter for this in FileUploadBase class
 called fileSizeMax which is used for checking length of an input stream
 for a file during parsing request and writing files to disk temp. Is there
 any way to propagate this parameter inside considering use of default
 MultipartServletWebRequestImpl ?

 I am using wicket 6.11.0

 Thanks, best regards!

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-util-upload-FileUploadBase-fileSizeMax-tp4668001.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




FeedbackPanel / just showing one error message / missing messages

2014-10-21 Thread Patrick Davids
Hi all,
I'm struggling around with a feedback panel.

What I would like to implement is a single global feedback panel in the 
top hierarchy of my page inheritence.

Its a sort of fallback-panel. If no other feedback panel catches the 
messages, it should display them, so its a FencedFeedback. A form or 
other component can have an own feedback panel with the component as a 
fence.

This global feedback panel should display only one single message.
Independent of how many e.g. form validation errors occur.
So its configured setMaxMessages(1).

To avoid displaying all other messages in sequence as long the user 
reloads the page, I have implemented a FeedbackCollector marking all of 
them rendered (onDetach()).

This all works quite good in the past.
But just one page, I have implemented once, does not show any messages 
at all by entering the page.

And I really really dont know why.

Also Session.get().error(my error message) does not work.

It seems to me, onDetach() is called earlier on this page, as on other 
pages, so my markRendered() of the FeedbackCollector is executed to 
early, but I am not sure.

Does anyone have an hint to me, what can force an early detach()?
Or what can force a cleanup of feedback messages?
Where should I put a breakpoint to have a deeper look?

Really thanx for help!

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



DataView: Sission ID generated for big pages and not for small one?!

2014-10-21 Thread Fuad Efendi
Hello,

 

 

I have a scenario, just to be quick (developing sample application  problem
isolation will take some more time):

 

I use custom DataView with custom DataProvider, custom pagination (based on
existing one, but with BookmarkablePageLink)

 

Whenever I use itemsPerPage=20 or smaller parameter for DataView, I do not
have Session created (I do not have JSESSIONID in generated URLs nor Cookie
set)

Anything higher than 20 will create Session, and all URLs will contain
JSESSIONID.

 

 

I tried with 1.6.17 and 7.0.0-M3, the same result.

 

 

Is that known bug?

 

Thanks,

-  Fuad Efendi

http://www.tokenizer.ca

 

 

 

 



RE: DataView: Sission ID generated for big pages and not for small one?!

2014-10-21 Thread Fuad Efendi
Please ignore previous message; I found the bug in my code: in the paginated
list, item No.21 contained link to internal image (unexpectedly
non-bookmarkable):

.add(new Image(linkToImage, new ModelString(no_image.jpg)));

 

And this item created Session for everything.

 

Thanks.

 

From: Fuad Efendi [mailto:f...@efendi.ca] 
Sent: October-21-14 12:26 PM
To: 'd...@wicket.apache.org'
Cc: 'users@wicket.apache.org'
Subject: DataView: Sission ID generated for big pages and not for small
one?!

 

Hello,

 

 

I have a scenario, just to be quick (developing sample application  problem
isolation will take some more time):

 

I use custom DataView with custom DataProvider, custom pagination (based on
existing one, but with BookmarkablePageLink)

 

Whenever I use itemsPerPage=20 or smaller parameter for DataView, I do not
have Session created (I do not have JSESSIONID in generated URLs nor Cookie
set)

Anything higher than 20 will create Session, and all URLs will contain
JSESSIONID.

 

 

I tried with 1.6.17 and 7.0.0-M3, the same result.

 

 

Is that known bug?

 

Thanks,

-  Fuad Efendi

http://www.tokenizer.ca

 

 

 

 



Re: Lock timeout per page class

2014-10-21 Thread Guillaume Smet
Hi Martin,

On Tue, Oct 21, 2014 at 1:19 PM, Martin Grigorov mgrigo...@apache.org wrote:
 You can
 use 
 org.apache.wicket.request.cycle.PageRequestHandlerTracker#getFirstHandler()
 to check what is the requested page in your
 own org.apache.wicket.settings.def.RequestCycleSettings#getTimeout

Cute trick but it doesn't work: the timeout is determined once and for
all when the PageAccessSynchronizer is instantiated (see
Session$PageAccessSynchronizerProvider).

And AFAICS, the PageAccessSynchronizer is too low level to be a good
place to manipulate the RequestCycle. Or am I wrong?

-- 
Guillaume

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



Re: Could not clear select2Choice component model value.

2014-10-21 Thread Maxim Solodovnik
It seems like script generated in renderInitializationScript should be
added to AjaxRequestTarget on every Ajax update ...

On 21 October 2014 17:09, Maxim Solodovnik solomax...@gmail.com wrote:

 Here it is:
 https://github.com/solomax/WicketSelect2Clear

 somehow in this example nothing works as expected :(
 I tried 2 different approaches, correct new value arrives to the page
 (according to wicket debug) but select2 is not being updated :(

 On 21 October 2014 13:23, Martin Grigorov mgrigo...@apache.org wrote:

 Hi Maxim,

 Please prepare a quickstart at GitHub and I'll take a look.

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

 On Fri, Oct 17, 2014 at 5:42 PM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  Martin,
 
  I have forked select2, unfortunately I'm still not sure how to fix the
  issue :(
  Clean link is added to the form and select data is being restored from
  requestParameters :(
 
  On 13 October 2014 19:06, Martin Grigorov mgrigo...@apache.org wrote:
 
   Maxim,
  
   Feel free to fork it! I.e. move it to WicketStuff.
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
   On Thu, Oct 9, 2014 at 8:53 PM, Maxim Solodovnik 
 solomax...@gmail.com
   wrote:
  
Additionally select2 seems to need to be forked to wicketstuff to be
   fixed,
should I do this?
   
On 10 October 2014 00:49, Maxim Solodovnik solomax...@gmail.com
  wrote:
   
 @Paul, @Martin

 Select2Choice sets back its value
 to getWebRequest().getRequestParameters().getParameterNames()
 in renderInitializationScript method [1]
 It seems like JS code like: $(#country1).select2(data, null);
 can
   be
 executed on clear input, but this seems to be workaround

 I'm not sure why [1] method is used to get value, maybe you can
  suggest
 correct way of fixing this?


 [1]

   
  
 
 https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62

 On 9 October 2014 16:39, MadasamySankarapandian 
   madas...@mcruncher.com
 wrote:

 Thanks Maxim Solodovnik.

 On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik 
   solomax...@gmail.com

 wrote:

  I also noticed this issue in our project,
  Will try to take a look at it
 
  On 9 October 2014 07:33, MadasamySankarapandian 
madas...@mcruncher.com
 
  wrote:
 
   Thankyou very much for yours reply.
  
   I call formComponent.clearInput() in my ClearFormVisitor
 class.
   But
It
  does
   not work.
   I have created issue-96
   https://github.com/ivaynberg/wicket-select2/issues/96 in
  wicket-select2
   project.
  
  
  
  
  
  
   On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik 
 solomax...@gmail.com
   wrote:
  
Done, thanks for pointing this out
   
On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote:
   
 Can you update this issue then?

 https://github.com/ivaynberg/wicket-select2/issues/93

 On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik 
   solomax...@gmail.com
 wrote:

  we recently moved this component to wicketstuff:
 
 

   
  
 

   
  
 
 https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent
 
  to get Wicket7 compatible version
 
 
  On 7 October 2014 22:56, Paul Bors p...@bors.ws
 wrote:
 
   You can also ask the developer via:
   https://github.com/ivaynberg/wicket-select2/issues
  
   You should probably take a look over the open issues
 so
   that
 you
   are
   familiar with that other developers faced. Maybe one
 of
those
   issues
  might
   be a road block for you?
  
   Although you will get a faster reply from Igor or
  another
 Wicket
  developer
   via this list :)
  
   On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov 
mgrigo...@apache.org
   wrote:
  
Hi,
   
You should call formComponent.clearInput() too.
   
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
   
On Tue, Oct 7, 2014 at 9:13 AM,
  MadasamySankarapandian 
madas...@mcruncher.com wrote:
   

 This is regarding wicket-select2 project. I could
  not
find
  any
  mailing
 list for this project. That is why sending here.
   Please
 some
   one
 help
   me.

 I have created clear link to clear the form input
values.
  After
 click
   

Re: org.apache.wicket.util.upload.FileUploadBase#fileSizeMax

2014-10-21 Thread Roman Grigoriadi
I am trying to check size of each of uploaded files, when there is more than
one file in one POST request. 

While there may be other way to do so, it looks like fileSizeMax in
FileUploadBase, does just the right thing, aborting processing multipart
POST by throwing FileUploadException which causes a call to
Form.onFileUploadException.

I would like to use it this way, instead of a check after POST request is
parsed and files are copied to disk, but I don't see any way to propagate
the parameter in. Could it be that MultipartServletWebRequestImpl (which
creates FileUploadBase objects) has forgotten to propagate fileSizeMax
inside FileUploadBase?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-util-upload-FileUploadBase-fileSizeMax-tp4668001p4668018.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