You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kshitiz <k....@gmail.com> on 2012/07/01 18:43:46 UTC

setOutputMarkupPlaceholderTag not working to render panel with setvisible false...

Hi,

I am using a panel with setVisible false on a condition. But it is not
getting rendered when its visibility becomes true. Here is  the code :

*final ShowCommentPanel showCommentPanel = new ShowCommentPanel(
				"showCommentPanel", postDomain, userDomain, 3);
		showCommentPanel.setOutputMarkupPlaceholderTag(true);
		showCommentPanel.setVisible(!commentDomainList().isEmpty());
	*	

AjaxFallbackButton ajaxCommentSubmitButton = new AjaxFallbackButton(
				"commentSubmitButton", commentForm) {
		
	@Override
			public void onSubmit(AjaxRequestTarget target, final Form<?> form) {

			
				if (target != null) {

					try {
				// some processing
					} catch (Exception exception) {
						error(exception.getMessage());
					}				
					*target.add(showCommentPanel);*
				}
			}

		

		};

what can be the problem?

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-not-working-to-render-panel-with-setvisible-false-tp4650313.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: setOutputMarkupPlaceholderTag not working to render panel with setvisible false...

Posted by kshitiz <k....@gmail.com>.
Hi,

I have already tried that out...its in the code..:

*owCommentPanel.setOutputMarkupPlaceholderTag(true); *

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-not-working-to-render-panel-with-setvisible-false-tp4650313p4650315.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: setOutputMarkupPlaceholderTag not working to render panel with setvisible false...

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Try setOutputMarkupPlaceholderTag(true)

2012/7/1 kshitiz <k....@gmail.com>:
> Hi,
>
> I am using a panel with setVisible false on a condition. But it is not
> getting rendered when its visibility becomes true. Here is  the code :
>
> *final ShowCommentPanel showCommentPanel = new ShowCommentPanel(
>                                 "showCommentPanel", postDomain, userDomain, 3);
>                 showCommentPanel.setOutputMarkupPlaceholderTag(true);
>                 showCommentPanel.setVisible(!commentDomainList().isEmpty());
>         *
>
> AjaxFallbackButton ajaxCommentSubmitButton = new AjaxFallbackButton(
>                                 "commentSubmitButton", commentForm) {
>
>         @Override
>                         public void onSubmit(AjaxRequestTarget target, final Form<?> form) {
>
>
>                                 if (target != null) {
>
>                                         try {
>                                 // some processing
>                                         } catch (Exception exception) {
>                                                 error(exception.getMessage());
>                                         }
>                                         *target.add(showCommentPanel);*
>                                 }
>                         }
>
>
>
>                 };
>
> what can be the problem?
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-not-working-to-render-panel-with-setvisible-false-tp4650313.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: setOutputMarkupPlaceholderTag not working to render panel with setvisible false...

Posted by kshitiz <k....@gmail.com>.
Thanks a lot...that worked...:)

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-not-working-to-render-panel-with-setvisible-false-tp4650313p4650319.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: setOutputMarkupPlaceholderTag not working to render panel with setvisible false...

Posted by dpmihai <dp...@yahoo.com>.
You make you panel invisible (first time when you create it), but where are
you make it visible?

The idea is to override 

public boolean isVisible() {
        return !commentDomainList().isEmpty();
}

in your panel.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-not-working-to-render-panel-with-setvisible-false-tp4650313p4650318.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