wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kshitiz <k.agarw...@gmail.com>
Subject Re: Ajax refresh component with initial setVisible(false)
Date Fri, 22 Jun 2012 18:44:26 GMT
This is my submitCommentPanel:

public SubmitCommentPanel(String id, final PostDomain postDomain,
			final UserDomain userDomain) {



AjaxFallbackButton ajaxCommentSubmitButton = new AjaxFallbackButton(
				"commentSubmitButton", commentForm) {
			private static final long serialVersionUID = 1L;

			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) {

* here, I am adding one more panel which should not be visible in a
situation ...
ShowCommentPanel showCommentPanel = new ShowCommentPanel(
				"showCommentPanel", postDomain, userDomain);
Now ShowCommentPanel is:

public ShowCommentPanel(final String id,
			final PostDomain postDomain,
			final UserDomain userDomain) {
		// TODO Auto-generated constructor stub

	*	@SuppressWarnings("rawtypes")
		Label numberOfCommentLabel = new Label("numberOfCommentLabel",
				new PropertyModel(postDomain, "numberOfComments"));

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

View raw message