From the source code it looks to me that you are calling window.show() from a handler invoked (indirectly) from a modal window.
You probably just want to replace the panel inside modal window, so setOutputMarkupId(true) on the panel and add only the panel to the ajax response. -Matej Paul Maarschalkerweerd wrote: > the basepage: > http://webical.svn.sourceforge.net/viewvc/webical/trunk/src/main/java/org/webical/web/components/CalendarDayViewPanel.java?view=markup > > <http://webical.svn.sourceforge.net/viewvc/webical/trunk/src/main/java/org/webical/web/components/CalendarDayViewPanel.java?view=markup> > > and the panels: > http://webical.svn.sourceforge.net/viewvc/webical/trunk/src/main/java/org/webical/web/components/EditAllOrOneEventDecisionPanel.java?view=markup > > <http://webical.svn.sourceforge.net/viewvc/webical/trunk/src/main/java/org/webical/web/components/EditAllOrOneEventDecisionPanel.java?view=markup> > http://webical.svn.sourceforge.net/viewvc/webical/trunk/src/main/java/org/webical/web/components/EventAddEditPanel.java?view=markup > > <http://webical.svn.sourceforge.net/viewvc/webical/trunk/src/main/java/org/webical/web/components/EventAddEditPanel.java?view=markup> > > Here are the snipplets: > > This is the panel where the user clicks on an event, the details are > shown in the modalwindow > > if(!event.isAllDay() && event.getDtStart() != null && event.getDtEnd () > != null){ > YUICalendarEvent yuiCalendarEvent = new > YUICalendarEvent(DAY_VIEW_YUI_EVENT_OBJECT){ > > private static final long serialVersionUID = 1L; > > @Override > public void onEventClicked(AjaxRequestTarget target) { > eventSelectionListener.eventSelected(event, > false, EventSelectionListener.DEFAULT_ALL_EVENTS, > gregorianCalendar,target, modalWindow); > } > }; > .... > > this is the eventSelected method from the basepage > > public void eventSelected(Event event, boolean edit, int editAmount, > GregorianCalendar calendar, AjaxRequestTarget target, ModalWindow > modalWindow) { > > .... > modalWindow.setContent(new > EditAllOrOneEventDecisionPanel(modalWindow.getContentId(), event, > getEventSelectionListener(), > getPanelChangeLister(), calendar, > modalWindow)); > modalWindow.show(target); > > .... > > } > > this is the part from the Panel where the content should be changed : > > ... > AjaxLink editOnlyThisEventLink = new > AjaxLink(EVENT_EDIT_ONLY_THIS_INSTANCE_MARKUP_ID){ > > private static final long serialVersionUID = 1L; > > @Override > public void onClick(AjaxRequestTarget target) { > eventSelectionListener.eventSelected(event, true, > EventSelectionListener.EDIT_ONE_EVENT, calendar, target, modalWindow); > > > } > }; > ... > > and back on the basepage an event is selected an shown in a edit panel : > > public void eventSelected(Event event, boolean edit, int editAmount, > GregorianCalendar calendar, AjaxRequestTarget target, ModalWindow > modalWindow) { > ... > modalWindow.setContent(new EventAddEditPanel( > modalWindow.getContentId(), > > getAddEditFormListener(get(modalWindow.getContentId())),event, > > ((WebicalSession)BasePage.this.getSession()).getUser(), false, new > GregorianCalendar(), getEventSelectionListener())); > modalWindow.show(target); > ... > } > > > > Hope this is useful! > > Paul > > > > > > On 1/24/07, *Igor Vaynberg * <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > how about some code, sounds like you are maybe opening another modal > window with one already open? > > -igor > > On 1/24/07, * Paul Maarschalkerweerd* < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hi, > > I want to change the content of a modalwindow, to do this I use > the method setContent. But the strange thing is that a new > window appears in front of the old one. I don't understand why > is that. > > I create a modalwindow on a page, set the content with the > setContent method and open it with an ajaxlink. I pass the > modalWindow to the new panel via the contructor. The new panel > has also an ajaxlink where I set the new content. When I click > that link a new modalWindow appears in de the screen in front of > the first. > > Maybe this isn't the right way to do it. > > Can somebody help me with this problem? > > Thnx > > Paul > > > > > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance > to share your > opinions on IT & business topics through brief surveys - and > earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > > _______________________________________________ > Wicket-user mailing list > [email protected] > <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/wicket-user > <https://lists.sourceforge.net/lists/listinfo/wicket-user> > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > > _______________________________________________ > Wicket-user mailing list > [email protected] > <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/wicket-user > <https://lists.sourceforge.net/lists/listinfo/wicket-user> > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
