Re: Ajax refresh component with initial setVisible(false)
Please help me out hereis there any silly mistake that I am making? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-component-with-initial-setVisible-false-tp4650171p4650205.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
Re: Ajax refresh component with initial setVisible(false)
This is my submitCommentPanel: public SubmitCommentPanel(String id, final PostDomain postDomain, final UserDomain userDomain) { super(id); this.setOutputMarkupId(true); AjaxFallbackButton ajaxCommentSubmitButton = new AjaxFallbackButton( "commentSubmitButton", commentForm) { /** * */ private static final long serialVersionUID = 1L; @Override public void onSubmit(AjaxRequestTarget target, final Form form) { /* * Populating commentDomain instance for submitting comment. * This instance is then passed to CommentService class */ if (target != null) { try { // some processing } catch (Exception exception) { error(exception.getMessage()); } target.add(submitCommentFeedbackPanel); *target.add(SubmitCommentPanel.this);* } } }; * here, I am adding one more panel which should not be visible in a situation ... ShowCommentPanel showCommentPanel = new ShowCommentPanel( "showCommentPanel", postDomain, userDomain); showCommentPanel.setVisible(!postDomain.getCommentDomainList().isEmpty()); add(showCommentPanel);* } Now ShowCommentPanel is: public ShowCommentPanel(final String id, final PostDomain postDomain, final UserDomain userDomain) { super(id); // TODO Auto-generated constructor stub * @SuppressWarnings("rawtypes") Label numberOfCommentLabel = new Label("numberOfCommentLabel", new PropertyModel(postDomain, "numberOfComments")); add(numberOfCommentLabel);* } Now what is happening that when showCommentPanel visibility is initially false but later becomes true after ajax refresh, even then *numberOfCommentLabel * does not appear. I have to refresh the whole page to make them appear. After that they refresh properly by ajax. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-component-with-initial-setVisible-false-tp4650171p4650196.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
Re: Ajax refresh component with initial setVisible(false)
Could you show us some code? This will make it much easier for us to help you, thanks! -Tom On 22.06.2012, at 04:21, kshitiz wrote: > Hi, > > I have added the whole panel in which that navigator is present. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh component with initial setVisible(false)
Hi, I have added the whole panel in which that navigator is present. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-component-with-initial-setVisible-false-tp4650171p4650180.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
Re: Ajax refresh component with initial setVisible(false)
Did you add your component to the AjaxRequestTarget for update? target.add(ajaxPagingNavigator); ?? Sven On 06/21/2012 06:12 PM, kshitiz wrote: Hi, How to ajax refresh components which are initially setvisible to false but later set to true. I know when it is false, then its mark up is not created in DOM. I have tried like **ajaxPagingNavigator.setOutputMarkupPlaceholderTag(true);** here, ajaxPagingNavigator is component. *But it is not appearing but its visibility becomes true.* What is the solution? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-component-with-initial-setVisible-false-tp4650171.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Ajax refresh component with initial setVisible(false)
Hi, How to ajax refresh components which are initially setvisible to false but later set to true. I know when it is false, then its mark up is not created in DOM. I have tried like **ajaxPagingNavigator.setOutputMarkupPlaceholderTag(true);** here, ajaxPagingNavigator is component. *But it is not appearing but its visibility becomes true.* What is the solution? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-component-with-initial-setVisible-false-tp4650171.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