You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Paul Szulc <pa...@gmail.com> on 2011/11/26 11:50:04 UTC

AjaxRequestTarget on page open

This is going to be a lame question :) but I need help with this one.

I have DialogWindow (from visural-wicket library) that can be opened using
AjaxRequestTarget, below example that opens that dialog when ajax link is
clicked

        add(new IndicatingAjaxLink("addCostUp") {
            @Override
            public void onClick(AjaxRequestTarget target) {
                addCostDialog.open(target);
            }
        });

Is there a way to open that dialog when page is opened? You know, someone
is entering a page and dialog pops out? To open that dialog I need
AjaxRequestTarget. Is there a way to make page request ajax call just right
after the page was loaded?

Paul Szulc

Re: AjaxRequestTarget on page open

Posted by Martin Grigorov <mg...@apache.org>.
On Fri, Dec 2, 2011 at 11:46 AM, Ernesto Reinaldo Barreiro
<re...@gmail.com> wrote:
> Martin,
>
> This class just reuses functionality already exiting and does not
> introduce anything new. So, I hope including it will not creates new
> issues as it is only
>
> 1- Making sure windows content is loaded on component creation
> 2- Firing the opening JavaScript on DOM ready event
>
> Shall I create a RFE issue and attach the code there?

Do it. Let's see what the others think.

>
> Best regards,
>
> Ernesto
>
> On Thu, Dec 1, 2011 at 6:54 PM, Martin Grigorov <mg...@apache.org> wrote:
>> Hi,
>>
>> Maybe you are right, Ernesto.
>> I just don't have good feelings about ModalWindow anymore. There are
>> many tickets in Jira about it and I hope to get rid of it somehow
>> instead of adding more code.
>>
>> On Tue, Nov 29, 2011 at 8:41 AM, Ernesto Reinaldo Barreiro
>> <re...@gmail.com> wrote:
>>> Should that simple extension be part of the framework? IMHO yes, as
>>> from time to time people ask for such functionality.
>>>
>>> Regards,
>>>
>>> Ernesto
>>>
>>> On Mon, Nov 28, 2011 at 4:28 PM, robert.mcguinness
>>> <ro...@gmail.com> wrote:
>>>> you don't need ajax for this:
>>>>
>>>> https://cwiki.apache.org/confluence/display/WICKET/Modal+Windows Opening a
>>>> modal window on page load (no AJAX involved)
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxRequestTarget-on-page-open-tp4110093p4115584.html
>>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: AjaxRequestTarget on page open

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Martin,

This class just reuses functionality already exiting and does not
introduce anything new. So, I hope including it will not creates new
issues as it is only

1- Making sure windows content is loaded on component creation
2- Firing the opening JavaScript on DOM ready event

Shall I create a RFE issue and attach the code there?

Best regards,

Ernesto

On Thu, Dec 1, 2011 at 6:54 PM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> Maybe you are right, Ernesto.
> I just don't have good feelings about ModalWindow anymore. There are
> many tickets in Jira about it and I hope to get rid of it somehow
> instead of adding more code.
>
> On Tue, Nov 29, 2011 at 8:41 AM, Ernesto Reinaldo Barreiro
> <re...@gmail.com> wrote:
>> Should that simple extension be part of the framework? IMHO yes, as
>> from time to time people ask for such functionality.
>>
>> Regards,
>>
>> Ernesto
>>
>> On Mon, Nov 28, 2011 at 4:28 PM, robert.mcguinness
>> <ro...@gmail.com> wrote:
>>> you don't need ajax for this:
>>>
>>> https://cwiki.apache.org/confluence/display/WICKET/Modal+Windows Opening a
>>> modal window on page load (no AJAX involved)
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxRequestTarget-on-page-open-tp4110093p4115584.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

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


Re: AjaxRequestTarget on page open

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Maybe you are right, Ernesto.
I just don't have good feelings about ModalWindow anymore. There are
many tickets in Jira about it and I hope to get rid of it somehow
instead of adding more code.

On Tue, Nov 29, 2011 at 8:41 AM, Ernesto Reinaldo Barreiro
<re...@gmail.com> wrote:
> Should that simple extension be part of the framework? IMHO yes, as
> from time to time people ask for such functionality.
>
> Regards,
>
> Ernesto
>
> On Mon, Nov 28, 2011 at 4:28 PM, robert.mcguinness
> <ro...@gmail.com> wrote:
>> you don't need ajax for this:
>>
>> https://cwiki.apache.org/confluence/display/WICKET/Modal+Windows Opening a
>> modal window on page load (no AJAX involved)
>>
>>
>>
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxRequestTarget-on-page-open-tp4110093p4115584.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: AjaxRequestTarget on page open

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Should that simple extension be part of the framework? IMHO yes, as
from time to time people ask for such functionality.

Regards,

Ernesto

On Mon, Nov 28, 2011 at 4:28 PM, robert.mcguinness
<ro...@gmail.com> wrote:
> you don't need ajax for this:
>
> https://cwiki.apache.org/confluence/display/WICKET/Modal+Windows Opening a
> modal window on page load (no AJAX involved)
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxRequestTarget-on-page-open-tp4110093p4115584.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: AjaxRequestTarget on page open

Posted by "robert.mcguinness" <ro...@gmail.com>.
you don't need ajax for this:

https://cwiki.apache.org/confluence/display/WICKET/Modal+Windows Opening a
modal window on page load (no AJAX involved) 




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxRequestTarget-on-page-open-tp4110093p4115584.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: AjaxRequestTarget on page open

Posted by Paul Szulc <pa...@gmail.com>.
Ok, I got the working solution

        add(new AbstractAjaxTimerBehavior(Duration.seconds(1)) {

            @Override
            protected void onTimer(AjaxRequestTarget target) {
                System.out.println("---------------> ajax");
                stop();
            }
        });

On Sat, Nov 26, 2011 at 11:50 AM, Paul Szulc <pa...@gmail.com> wrote:

> This is going to be a lame question :) but I need help with this one.
>
> I have DialogWindow (from visural-wicket library) that can be opened using
> AjaxRequestTarget, below example that opens that dialog when ajax link is
> clicked
>
>         add(new IndicatingAjaxLink("addCostUp") {
>             @Override
>             public void onClick(AjaxRequestTarget target) {
>                 addCostDialog.open(target);
>             }
>         });
>
> Is there a way to open that dialog when page is opened? You know, someone
> is entering a page and dialog pops out? To open that dialog I need
> AjaxRequestTarget. Is there a way to make page request ajax call just right
> after the page was loaded?
>
> Paul Szulc
>



-- 
Best regards,
Paul Szulc

http://www.paulszulc.com