Re: Determine session size for Wicket 1.5

2012-07-16 Thread Ian Marshall
I don't think that I am getting the session size in the right place. Despite
my session sizes being logged as very small at ~1.7kB using the Google App
Engine (GAE) web development server, in GAE production I am getting session
sizes approaching 1MB (and attempting to breach this GAE-imposed limit of
1MB too).

I shall have to try and find somewhere else to get a meaningful session
size.



Ian Marshall wrote
 
 Thanks Martin,
 
 I could not find onDetach() but found detach() so I have done this in my
 WebSession subclass:
 
   @Override
   public void detach()
   {
 long loSize = getSizeInBytes();
 m_logger.log(Level.FINE, String.format(Session size = %,dB.,
 loSize));
 super.detach();
   }
 
 This seems to be fine (my sessions seem very small at ~1.7kB - I must be
 doing something wrong) except that this method can be called several times
 as a result of one request.
 
 Thanks again,
 
 Ian
 
 
 
 Martin Grigorov-4 wrote
 
 Override Session#onDetach() and do it before calling super.onDetach().
 
 On Fri, Jul 13, 2012 at 2:01 PM, Ian Marshall lt;IanMarshall.UK@gt;
 wrote:
 Hello,

 Is there a good way to discover my serialised or about-to-be-serialised
 session size without adding the debug bar to my page?

 I currently use

   @Override
   protected void onAfterRender()
   {
 super.onAfterRender();

 CloudSession ssnSession = (CloudSession)getSession();
 long loSize = ssnSession.getSizeInBytes();
 m_logger.log(Level.FINE, String.format(Session size = %,dB.,
 loSize));
   }

 in my WebPage subclass, but I suspect that this is the wrong place to
 examine the session size.

 My software environment is:

 Web framework: Wicket 1.5.7
 Web server system: Google App Engine for Java version 1.7.0
 Java: 1.6.0_33; Java HotSpot(TM) Client VM 20.8-b03
 Operating system: Microsoft Windows XP Home Edition version 2002 SP3
 (version 5.1 running on x86; Cp1252; en_GB)


 Ian Marshall
 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Determine-session-size-for-Wicket-1-5-tp4650050p4650543.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: wicket 1.4 to 1.5 migration - page id in urls issue - how to remove for certain pages

2012-07-16 Thread samzilverberg
Tried the mapper.
It looks like it behaves exactly as overriding isVersioned to return false
at the wanted page...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-1-4-to-1-5-migration-page-id-in-urls-issue-how-to-remove-for-certain-pages-tp4650445p4650544.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: Generic for FileUploadField model

2012-07-16 Thread Ian Marshall
For my FileUploadField field in a form, I use the model type

  Listorg.apache.wicket.markup.html.form.upload.FileUpload.


meduolis wrote
 
 Wicket version: 1.5.3
 Java version: 1.7.0_02
 
 Hello, how to properly set generic for FilUploadField model?
 
 I try like this, but it does not compile:
 
 
 I get error message
 
 
 If I make it ArrayList:
 
 
 Then it says:
 
 
 I'm really confused :)
 
 help, please
 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generic-for-FileUploadField-model-tp4650519p4650545.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: Generic for FileUploadField model

2012-07-16 Thread Ian Marshall
To explain better

My form has the component

  FileUploadField fufUploadImage = new FileUploadField(fufUploadImage);
  frmForm.add(fufUploadImage);

The form's model is a compound property model, constructed using a
LoadableDetachableModelMyModel.

MyModel includes the data member

  public transient ListFileUpload fufUploadImage = null;

I hope that this helps. Also, do visit

 
http://apache-wicket.1842946.n4.nabble.com/Converter-for-FileUpload-tp3881522p3882908.html

where Martin G helped me out on an allied issue.



For my FileUploadField field in a form, I use the model type

  Listorg.apache.wicket.markup.html.form.upload.FileUpload.


meduolis wrote
 
 Wicket version: 1.5.3
 Java version: 1.7.0_02
 
 Hello, how to properly set generic for FilUploadField model?
 
 I try like this, but it does not compile:
 
 
 I get error message
 
 
 If I make it ArrayList:
 
 
 Then it says:
 
 
 I'm really confused :)
 
 help, please


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generic-for-FileUploadField-model-tp4650519p4650546.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 handle ReplaceHandlerException

2012-07-16 Thread Stefan Droog
Hi all,

The continueToOriginalDestination() method in our Login page throws a 
ReplaceHandlerException (Wicket 1.5.7). This means that it won't invoke the 
setResponsePage, which I do expect. 

Our implementation looks like:

FormVoid form = new StatelessFormVoid(form){

  @Override
   protected void onSubmit() {

   if (session.signIn(username, password)) {
   if (!continueToOriginalDestination()) {
setResponsePage(getApplication().getHomePage());
   }
   }

   }
};

RequestHandlerStack#replaceAll throws this exception because there is still one 
requestHandler (ListenerInterfaceRequestHandler - Listener interface: 
IFormSubmitListener).

How should we handle this exception?

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



Re: Wicket 6 and CDI

2012-07-16 Thread Igor Vaynberg
just pushed the wicket-6 branch

-igor

On Mon, Jul 16, 2012 at 1:04 AM, Jochen Mader pflanzenmoer...@gmail.com wrote:
 Hehehehe, that was easy :)
 It's just a couple of package-renames and fixing the
 ConversationExpiryChecker to use the new way of getting the
 AjaxRequestTarget:
 AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
 if (component instanceof Page ||target != null)
 Took me like 3 minutes.
 I just did a quick smoke test in Glassfish and so far things are looking good.
 Will hopefully get some more time tomorrow evening to test a little more.
 If I find any problems I will let you know.

 CU,

 Jochen


 On Sun, Jul 15, 2012 at 11:45 PM, Jochen Mader
 pflanzenmoer...@gmail.com wrote:
 Tried it out a few minutes ago.
 Looks a few things got moved into the core package (e.g. 
 IPageRequestHandler).
 I had a quick look and so far I didn't find anything beyond renamed
 packages (but that's just a few minutes of looking).
 I might just give it a shot and try to get it running.

 CU
 Jochen

 On Sun, Jul 15, 2012 at 11:15 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 havent had time to try it out on wicket 6 yet, is anything actually broken?

 -igor

 On Sun, Jul 15, 2012 at 11:40 PM, Jochen Mader
 pflanzenmoer...@gmail.com wrote:
 To get that out of the way: I know that Wicket 6 won't be shipped with
 CDI directly :)
 I still would like to use Wicket 6 in Glassfish.
 Are there plans to port wicket-cdi to Wicket 6? I couldn't find
 anything on the 42lines git-repo on that issue.
 Help required?

 Thanks,

 Jochen

 -
 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


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



Re: Generic for FileUploadField model

2012-07-16 Thread meduolis
Iam, thanks for trying to help, but my form have CompoundPropertyModel too,
but I don't want to use it for my FileUploadField, so I create new model for
this. Everything works fine, just I can not put generics correctly.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generic-for-FileUploadField-model-tp4650519p4650554.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