SV: Application of setOutputMarkupPlaceholderTag and setOutputMarkupId

2010-09-17 Thread Wilhelmsen Tor Iver
 Clicking another button I want the hidden panel to be visible and when
 i set
 the visibility to true and attach the markupContainer to the
 ajaxRequest, it
 does not repaint it and I got an error saying the component was not
 found.

Yes, without a placeholder tag for invisible components there is no DOM element 
for the Javascript to find for the Ajax replacement code when the (now visible) 
compopnent should be rendered.

 I changed it to setOutputMarkupPlaceholderTag and this time it works. I
 understand that Wicket does not have any reference to the component if
 we
 used setOutputMarkupid but why is this and when do we use the methods?

When you work with toggling invisibility via Ajax you need to use the 
placeholder tag. The difference is that in the case where you don't output the 
placeholder, and invisible component's markup will not be found by other 
Javascript code traversing the DOM, which could have undesired effects based on 
assumptions about the element in question.

- Tor Iver

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



Re: SV: Application of setOutputMarkupPlaceholderTag and setOutputMarkupId

2010-09-17 Thread nivs

Hi 

Thanks for your thoughts. It is clearer now. Re-iterating from what you
mentioned, my understanding is that
when 
1. toggling invisibility via Ajax you need to use the placeholder tag - 
2.and we don't toggle visibility and want that component to be re-painted
then we need setOutputMarkupId.

Thanks guys
Niv


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Application-of-setOutputMarkupPlaceholderTag-and-setOutputMarkupId-tp2543555p2543665.html
Sent from the Users forum mailing list archive at Nabble.com.

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