You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by PhilipJohnson <jo...@hawaii.edu> on 2008/08/01 21:39:45 UTC

How to make PagingNavigator work in Modal window?

Greetings, Wicket Wizards,

Lots of modal window questions lately in this list. I searched but none
seems to address my particular problem, so I apologize in advance for adding
to the stack. 

I have been displaying a table with PagingNavigator in a Panel that was
added to a regular Wicket page and it worked perfectly. Here's a snippet of
the code, which does nothing unusual:
 
DataView dataView = new DataView("sensorDataDetailsList", provider) {
    
      @Override
      protected void populateItem(Item item) {
        SensorDataDetails details = (SensorDataDetails)
item.getModelObject();
        item.add(new Label("timestamp", details.getTimeStamp()));
        // stuff deleted.
      }
    };
    dataView.setItemsPerPage(itemsPerPage);
    add(dataView);
    add(new PagingNavigator("navigator", dataView));

Recently, I redesigned my UI, and now I want this same table to appear in a
Modal Window.  So, I added the Panel containing this table to the Modal
Window.  

The problem is that when the Modal window appears and I click on the paging
navigator link to move to the next page of data, I get a popup indicating I
am leaving the modal window.  If I say OK, then the modal window (and thus
my table) disappears. 

It appears that I am in need of some Special Magic to make PagingNavigator
work within a Modal Window. Could someone please enlighten me?

Thanks very much!
Philip Johnson 

-- 
View this message in context: http://www.nabble.com/How-to-make-PagingNavigator-work-in-Modal-window--tp18781353p18781353.html
Sent from the Wicket - User 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: How to make PagingNavigator work in Modal window?

Posted by Martijn Dashorst <ma...@gmail.com>.
Or use a Page inside the modalwindow instead of a panel. Then it uses
an iframe, and that does work with normal links iirc.

Martijn

On Sat, Aug 2, 2008 at 12:51 PM, Daniel Stoch <da...@gmail.com> wrote:
> Use AjaxPagingNavigator. You cannot use normal (non-ajax) links inside
> a ModalWindow (like standard PagingNavigator does) because then the
> whole page is refreshed.
>
> --
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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


Re: How to make PagingNavigator work in Modal window?

Posted by Daniel Stoch <da...@gmail.com>.
Use AjaxPagingNavigator. You cannot use normal (non-ajax) links inside
a ModalWindow (like standard PagingNavigator does) because then the
whole page is refreshed.

--
Daniel

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