Re: Long running task with download

2010-10-20 Thread Martin Zardecki

Yeah, I close the modal window first and this works on Safari but still gives
the message on Firefox.

Go figure.

Thanks again.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Long-running-task-with-download-tp3003232p3004771.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: Long running task with download

2010-10-20 Thread Martin Zardecki

I had the whole zip + download working from a simple link but building the
zip file could take a while and without feedback the user might try
refreshing the screen or something stupid which is why I wanted to have a
progress status update.

Using that AjaxDownload behavior fixed my issue and it works now, I guess I
needed to create another request/response for the download to workI
couldn't just start the download inside an AjaxButton.onSubmit method.

The only downside is on some browsers it asks "Are you sure you want to
navigate away from this page" due to the redirect in the AjaxDownload
behavior.

Thanks.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Long-running-task-with-download-tp3003232p3004093.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



Long running task with download

2010-10-19 Thread Martin Zardecki
Hi List, I have an interesting problem, I have a long running task where I 
build a zip file out of data which I then want to download to the user.

I have a dialog on my main windows which builds the zip file fine while 
providing feedback (using a ModalWindow and Wicket AJAX) but I'm then finding 
myself unable to send the zip file back to the user.

The RequestCycle (to get the Web response) is unavailable inside my zip file 
building thread (as it's ThreadLocal) and if I try passing the RequestCycle to 
my thread I get error stating that RequestCycle is non serializable.

I'm playing around trying to build the zip file in the thread/dialog then 
downloading from the main window but still experiencing some issues.

Any advice or tips? Should I be able to access RequectCycle and just send the 
zip file inside the ModalWindow without creating a separate thread to zip the 
file?

Thanks,

Martin


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



Re: mountBookmarkablePage problem?

2010-09-09 Thread Martin Zardecki

Figured it out, nothing to do with Wicket (sorry but I was getting
desperate).

If it helps anyone...we had to enable httpOnly on our server and the page in
question was trying to make sure we only uploaded to our current session.

Well turns out that httpOnly causes statefull Java Applets to lose their
waythe solution we employed was to make sure our Applet sent back the
session cookie.

Thanks,

Martin

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/mountBookmarkablePage-problem-tp2527600p2533461.html
Sent from the Wicket - User 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: IE Problem

2010-09-09 Thread Martin Zardecki

In some cases there are no work arounds (css that generically applies to
both).

We ended using css_browser_selector
(http://rafael.adm.br/css_browser_selector/) and this works well for us.

Alternatively you could try generating different pages based on the browser
from the server but I don't think anyone wants to do that.

Cheers,

Martin

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IE-Problem-tp2533248p2533459.html
Sent from the Wicket - User 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



mountBookmarkablePage problem?

2010-09-05 Thread Martin Zardecki
Hi List I'm not sure if I uncovered a strange problem or something changed in 
how we configure things and I missed it.

I have an applet that uploads files to a my Wicket application using http, I 
have an upload handler defined like this:

mountBookmarkablePage("uploadHandler", UploadHandler.class);

And my UploadHandler class extends WebPage and looks like this:

public class UploadHandler extends SecureOneColumnBasePage // extends WebPage {
  public UploadHandler() {

final HttpServletRequest request = ((WebRequest) 
RequestCycle.get().getRequest()).getHttpServletRequest();
final WebResponse response = getWebRequestCycle().getWebResponse();
UploadUtils.handleUpload(request, response);
  }
}

Everything works great in Wicket 1.4.1.

Then I went to upgrade to Wicket 1.4.10 and the uploading fails in all browsers 
except Safari running under Mac. My upload handler codes never gets hit or 
entered under 1.4.10 and nothing in the logs to indicated any problems related 
to this.

Any clues?

Thanks.

Martin



Re: How to do an AjaxLink shiftOnclick behaviour?

2010-05-02 Thread Martin Zardecki
The point isn't whether it's done in a link or a checkbox, the point is more 
about making it easier to select a number of objects.

If the user is presented with a large number of objects and we want to make it 
easier to select or pick a number of them without having to click each one then 
shift-clicking seems like a good way to do it whether it's a link or a checkbox.

From what I can tell Wicket CheckBoxes do not have explicit support for shift 
clicking any more than Links do.

On 2010-05-02, at 4:29 PM, users-digest-h...@wicket.apache.org wrote:

> 
> From: Igor Vaynberg 
> Date: May 1, 2010 2:25:25 PM MDT
> To: users@wicket.apache.org
> Subject: Re: How to do an AjaxLink shiftOnclick behaviour?
> 
> 
> thats what checkboxes are for
> 
> -igor
> 
> On Sat, May 1, 2010 at 8:23 AM, Martin Zardecki  wrote:
>> Hi List, I have an AjaxLink where I use onClick and everything works well 
>> but I'd like to add a separate behaviour when the user shift-clicks the link.
>> 
>> The idea is to achieve something similar to when using a Explorer in Windows 
>> or in any file picker where a single click selects one item whereas 
>> shift-clicking selects multiple items.
>> 
>> I can probably achieve this using brute force where I add some JS to my link 
>> then use wicketAjaxGet to callback to an AbstractDefaultAjaxBehavior but I 
>> was wondering if there was a way to do this nicely and cleanly.
>> 
>> I had a quick look at InputBehavior from Wicket contrib but it doesn't look 
>> like that will do the trick.
>> 
>> Any advice or tips appreciated.
>> 
>> Thanks list.
>> 
>> Martin
>> 
>> 
>> 
> 



Re: How to do an AjaxLink shiftOnclick behaviour?

2010-05-01 Thread Martin Zardecki
>> you are trying to mix keyboard and mouse events which is not possible in
>> javascript I think

>> see http://www.javascriptkit.com/jsref/eventkeyboardmouse.shtml for more
>> info

Pretty sure it's possible in modern browsers at least:

http://www.javascripter.net/faq/ctrl_alt.htm

How to do an AjaxLink shiftOnclick behaviour?

2010-05-01 Thread Martin Zardecki
Hi List, I have an AjaxLink where I use onClick and everything works well but 
I'd like to add a separate behaviour when the user shift-clicks the link.

The idea is to achieve something similar to when using a Explorer in Windows or 
in any file picker where a single click selects one item whereas shift-clicking 
selects multiple items.

I can probably achieve this using brute force where I add some JS to my link 
then use wicketAjaxGet to callback to an AbstractDefaultAjaxBehavior but I was 
wondering if there was a way to do this nicely and cleanly.

I had a quick look at InputBehavior from Wicket contrib but it doesn't look 
like that will do the trick.

Any advice or tips appreciated.

Thanks list.

Martin




Re: Logging configuration trouble

2009-12-29 Thread Martin Zardecki

Think I figured this out; it appears to be related to the order things
happen.

I originally had my logging initialization as the first line in my
Application init() method.

Unfortunately this occurs after some of the class Loggers get initialized
statically and consequently our initialization occurs too late.

If I place my initialization as the first line of the constructor class or
as a static initialization everything appears to work properly.

This could also solve the problem of some people who have mentioned issues
with their formatters.

HTH

MZ


Martin Zardecki wrote:
> 
> Hi list, I'm using Java Utils Logging along with Wicket and I have a
> log.properties which I read in the WicketApplication init method as
> follows:
> 
> java.util.logging.LogManager.getLogManager().readConfiguration(input);
> 
> I confirm that my log.properties is read in correctly using a debugger.
> 
> ---
> My log.properties file is as follows:
> 
> # Specify the handlers to create in the root logger
> # (all loggers are children of the root logger)
> # The following creates two handlers
> handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
> 
> # Set the default logging level for the root logger
> .level = WARNING
> 
> # Set the default logging level for new ConsoleHandler instances
> java.util.logging.ConsoleHandler.level = ALL
> java.util.logging.ConsoleHandler.formatter =
> java.util.logging.SimpleFormatter
> 
> # Set the default logging level for new FileHandler instances
> java.util.logging.FileHandler.level = ALL
> java.util.logging.FileHandler.pattern = %h/stagetwo.log
> java.util.logging.FileHandler.limit = 5
> java.util.logging.FileHandler.count = 1
> java.util.logging.FileHandler.formatter =
> java.util.logging.SimpleFormatter
> 
> # Set the default logging level for the logger named com.truecool
> com.truecool.stagetwo.level = WARNING
> 
> org.apache.wicket.level = WARNING
> org.apache.wicket.markup.resolver.WicketMessageResolver.level = SEVERE
> 
> # Hibernate Logging options
> #logger.org.hibernate=info
> org.hibernate.level = WARNING
> ---
> 
> For whatever reason I'm still getting all the WicketMessageResolver
> warnings in my logs.
> 
> Any suggestions on how to get rid of the WicketMessageResolver warnings?
> 
> Thanks,
> 
> Martin Zardecki
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Logging-configuration-trouble-tp26867097p26961354.html
Sent from the Wicket - User 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



Logging Configuration Question

2009-12-21 Thread Martin Zardecki
Hi list, sorry if I'm double posting but I sent a question two days ago and 
haven't seen it on the daily digest yet.

I'm using Java Utils Logging along with Wicket and I have a log.properties 
which I read in the WicketApplication init method as follows:

java.util.logging.LogManager.getLogManager().readConfiguration(input);

I confirm that my log.properties is read in correctly using a debugger.

My log.properties file is as follows:

---
# Specify the handlers to create in the root logger
# (all loggers are children of the root logger)
# The following creates two handlers
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler

# Set the default logging level for the root logger
.level = WARNING

# Set the default logging level for new ConsoleHandler instances
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

# Set the default logging level for new FileHandler instances
java.util.logging.FileHandler.level = ALL
java.util.logging.FileHandler.pattern = %h/stagetwo.log
java.util.logging.FileHandler.limit = 5
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter

# Set the default logging level for the logger named com.truecool
com.truecool.stagetwo.level = WARNING

org.apache.wicket.level = WARNING
org.apache.wicket.markup.resolver.WicketMessageResolver.level = SEVERE

# Hibernate Logging options
#logger.org.hibernate=info
org.hibernate.level = WARNING
---

For whatever reason I'm still getting all the WicketMessageResolver warnings in 
my logs.

Any suggestions on how to get rid of the WicketMessageResolver warnings?

Thanks,

Martin Zardecki

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



Logging configuration trouble

2009-12-20 Thread Martin Zardecki
Hi list, I'm using Java Utils Logging along with Wicket and I have a 
log.properties which I read in the WicketApplication init method as follows:

java.util.logging.LogManager.getLogManager().readConfiguration(input);

I confirm that my log.properties is read in correctly using a debugger.

---
My log.properties file is as follows:

# Specify the handlers to create in the root logger
# (all loggers are children of the root logger)
# The following creates two handlers
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler

# Set the default logging level for the root logger
.level = WARNING

# Set the default logging level for new ConsoleHandler instances
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

# Set the default logging level for new FileHandler instances
java.util.logging.FileHandler.level = ALL
java.util.logging.FileHandler.pattern = %h/stagetwo.log
java.util.logging.FileHandler.limit = 5
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter

# Set the default logging level for the logger named com.truecool
com.truecool.stagetwo.level = WARNING

org.apache.wicket.level = WARNING
org.apache.wicket.markup.resolver.WicketMessageResolver.level = SEVERE

# Hibernate Logging options
#logger.org.hibernate=info
org.hibernate.level = WARNING
---

For whatever reason I'm still getting all the WicketMessageResolver warnings in 
my logs.

Any suggestions on how to get rid of the WicketMessageResolver warnings?

Thanks,

Martin Zardecki


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