Hi

Thanks for the input. I now used wicketstuff-jquery and wrote a custom behaviour which adds the code to my form.
For later reference:
public class UIBlockerBehaviour extends JQueryBehavior {
   private static final ResourceReference BLOCKUI_JS =
new CompressedResourceReference(UIBlockerBehaviour.class, "jquery.blockUI.js");

   public void renderHead (IHeaderResponse response) {
       super.renderHead(response);
       response.renderJavascriptReference(BLOCKUI_JS);
   }

   protected void onBind () {
     super.onBind();
     getComponent().add(
new AttributeAppender(this.attributeName, new ResourceModel("JQuery.blockUI.code"), ";"));
   }
}

Where the string resource contains:

JQuery.blockUI.code = \
               $.blockUI({\
               message: '<h1>Please wait...</h1>',\
               css:{\
                   border: 'none',\
                   padding: '15px',\
                   backgroundColor: '#000',\
                   '-webkit-border-radius': '10px',\
                   '-moz-border-radius': '10px',\
                   opacity: '.5',\
                   color: '#fff'\
               }\
               });

Thanks for your help

The Veil component didn't work for me at all - I saw no difference wether I had added it to the button or not at all....

Matt

Serkan Camurcuoglu wrote:
you could use the jquery blockui plugin..

http://malsup.com/jquery/block/#demos



James Carman wrote:
There is a "veil" component in wicketstuff-minis, I believe. That might help.

On Wed, May 6, 2009 at 10:30 AM, Linda van der Pal
<lvd...@heritageagenturen.nl> wrote:
Back when I was programming in jsp I solved this by disabling the button after clicking it (because it would redirect after processing the data). Not
sure how I'd do such a thing with Wicket.

Linda.


Matthias Keller wrote:
Hi

We have a web form which does some very extensive backend communication
requiring a lot of time. So usually after pressing 'submit', the UI is
locked for 10-30 seconds. To avoid re-submission, we'd like to put some kind of ui-lock-page over the current page, stating 'Please wait' or something. So I'd need something to add to the onclick of the submit button (which is NOT an ajax button but a normal <input type=submit> button) which blocks the
UI until the response is ready.
I've tried the wicket-stuff veil thingy, but it doesn't work. Here's what
I tried:
WebMarkupContainer submit = new WebMarkupContainer("submit");
submit.add(new Veil());
add(submit);

But even though I see some JS files added to the page, nothing happens
when I click my button?

Is there something else that I can just add to a button?
Thanks a lot

Matt

---------------------------------------------------------------------
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



--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
______________________________________________________________
e r g o n    smart people - smart software


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to