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/06/21 18:12:48 UTC
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Ajax refresh component with initial setVisible(false)
Posted by kshitiz <k....@gmail.com>.
Please help me out here....is 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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Ajax refresh component with initial setVisible(false)
Posted by kshitiz <k....@gmail.com>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Ajax refresh component with initial setVisible(false)
Posted by Thomas Götz <to...@decoded.de>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Ajax refresh component with initial setVisible(false)
Posted by kshitiz <k....@gmail.com>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Ajax refresh component with initial setVisible(false)
Posted by Sven Meier <sv...@meiers.net>.
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-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