You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sam Hough <sa...@redspr.com> on 2007/08/22 14:46:53 UTC

Re: ModalWindow problem

Do you have an element with id content111?

-- 
View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12273905
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: ModalWindow problem - resolved

Posted by "Artur W." <a_...@gazeta.pl>.

Sam Hough wrote:
> 
> Do you have an element with id content111?
> 
> 
Ok. I have found the problem.

The id wasn't generated becouse I have set setRenderBodyOnly(true) in Panel.

Thanks for you help!
Artur

-- 
View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12276791
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: ModalWindow problem

Posted by Sam Hough <sa...@redspr.com>.
maybe try setting setOutputMarkupId(true) on your ModalWindow? In the source
it uses its own content id to give to the getElementById bit...

So if that Id is not in your response that could be the problem. 

Bit dodgy that it resends that element then immediately wants to get the
element. Not sure if it waits for the HTML to "settle"?
-- 
View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274679
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: ModalWindow problem

Posted by "Artur W." <a_...@gazeta.pl>.

Sam Hough wrote:
> 
> Did you copy the:
> 
> result.setOutputMarkupId(true);
> 
> bit? I think the Ajax callback uses this to find elements. Normally blows
> up at render time if not set.
> 
> 
I don't have result label. I just want to open modal window. I don't need to
return any results.

Artur

-- 
View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274574
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: ModalWindow problem

Posted by Sam Hough <sa...@redspr.com>.
Did you copy the:

result.setOutputMarkupId(true);

bit? I think the Ajax callback uses this to find elements. Normally blows up
at render time if not set.

-- 
View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274319
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: ModalWindow problem

Posted by Sam Hough <sa...@redspr.com>.
Even if you use Firefox, select all, view selection source? Sorry if I'm
asking the obvious.

ModalPanel as in the examples?
-- 
View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274286
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: ModalWindow problem

Posted by "Artur W." <a_...@gazeta.pl>.


Sam Hough wrote:
> 
> Do you have an element with id content111?
> 
> 
No, I don't have.

I don't know where it comes from. My code looks like this:

ModalWindow modal = new ModalWindow("orderNotes");
add(modal);
modal.setContent(new ModalPanel(modal.getContentId()));
modal.setTitle("This is modal window with panel content.");
modal.setCookieName("modal-2");

AjaxLink link;
add(link = new AjaxLink("notesLink")
{
        public void onClick(AjaxRequestTarget target)
        {
            modal.show(target);
        }
});

Artur
-- 
View this message in context: http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274189
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