This is great explanation thank you , I am looking more to create
something like
org.apache.wicket.extensions.ajax.markup.html.WicketAjaxIndicatorAppender .
I am trying to do something like IndicatingAjaxLink to
AjaxFallbackDefaultDataTable and trying follow whats in
IndicatingAjaxLink
and here is what i did to your code
public class BlockerBehaviour extends JQueryBehavior {
private static final ResourceReference BLOCKUI_JS = new
CompressedResourceReference(BlockerBehaviour.class, "jquery.blockUI.js");
@Override protected CharSequence getOnReadyScript() {
return null;
}
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.renderJavascriptReference(getBlockUIJs());
}
private ResourceReference getBlockUIJs() {
return BLOCKUI_JS;
}
public String getMarkupId()
{
return getComponent().getMarkupId();
}
}
just added the method
public String getMarkupId()
{
return getComponent().getMarkupId();
}
now not sure where to add this "$.blockUI({ message: null, overlayCSS:
{opacity: '0.1'} })", ";"));
and "$.unblockUI();"
Anton Veretennikov wrote:
>
> As you told about blockUI.
> There is Jquery integration from WicketStuff.
> You need to add
>
> <dependency>
> <groupId>org.wicketstuff</groupId>
> <artifactId>wicketstuff-jquery</artifactId>
> <version>1.4-SNAPSHOT</version>
> </dependency>
>
> to your pom.xml
>
>
> Then create behaviour that will add JavaScript on demand:
>
> public class BlockerBehaviour extends JQueryBehavior {
> private static final ResourceReference BLOCKUI_JS = new
> CompressedResourceReference(BlockerBehaviour.class,
> "jquery.blockUI.js");
>
> @Override protected CharSequence getOnReadyScript() {
> return null;
> }
>
> @Override
> public void renderHead(IHeaderResponse response) {
> super.renderHead(response);
> response.renderJavascriptReference(getBlockUIJs());
> }
>
> private ResourceReference getBlockUIJs() {
> return BLOCKUI_JS;
> }
>
> }
>
> add jquery.blockUI.js to resources for BlockerBehaviour class to locate it
>
> and then
>
> add this behaviour to panel or page where you like to have it.
>
> and use it something like:
>
> ajaxFallbackLink.add(new SimpleAttributeAppender("onclick",
> "$.blockUI({ message: null, overlayCSS: {opacity: '0.1'} })", ";"));
>
> and to unblock:
>
> @Override
> protected void onAjaxUpdate(AjaxRequestTarget target) {
> super.onAjaxUpdate(target);
> target.appendJavascript("$.unblockUI();");
> }
>
>
> -- Tony
>
>
> On Thu, Mar 19, 2009 at 7:26 PM, fachhoch <[email protected]> wrote:
>>
>> please suggest me on what changes should i make to Veil component in
>> wicketstuff-minis to use it as a mask or block my page ?
>>
>> igor.vaynberg wrote:
>>>
>>> see the Veil component in wicketstuff-minis project, that should give
>>> you all the clues you need.
>>>
>>> -ig
>>>
>>> On Tue, Mar 17, 2009 at 12:57 PM, fachhoch <[email protected]> wrote:
>>>>
>>>> I want to use jquery block plugin to block my page for ajax
>>>> requests
>>>> ,
>>>> please help me with some tutorials how to integrate wicket and
>>>> jquery.
>>>> url for jquery block plugin
>>>> http://www.malsup.com/jquery/block/#demos
>>>>
>>>> the script provided by jquery to block page is $.blockUI(); now
>>>> please
>>>> suggest me how to call this through wicket
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/using-jquery---with-wicket-tp22566645p22566645.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/using-jquery---with-wicket-tp22566645p22599127.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/using-jquery---with-wicket-tp22566645p22601001.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]