You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by eugenebalt <eu...@yahoo.com> on 2013/09/10 17:28:17 UTC

Ajax setVisible(true) Action not Working after a single setVisible(false)

A selection in one of my Ajax dropdowns controls the visibility of another
dropdown. The code is very simple, and there are no other changes.

choiceVerType.add(new AjaxFormComponentUpdatingBehavior("onchange")
{
   protected void onUpdate(AjaxRequestTarget target) {

   if
(choiceVerType.getValue().equals(UMCConstants.VERIFICATION_APPLICATION)) {
       choiceVerPeriod.setVisible(false);
   }
   else {
       choiceVerPeriod.setVisible(true);
   }
   target.addComponent(choiceVerPeriod);
}

Once I hit the setVisible(false) condition once, any further changes in the
1st dropdown don't take effect and the 2nd dropdown remains invisible. Any
thoughts? Thanks.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-setVisible-true-Action-not-Working-after-a-single-setVisible-false-tp4661281.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 setVisible(true) Action not Working after a single setVisible(false)

Posted by eugenebalt <eu...@yahoo.com>.
Solved my problem - I had to set the output markup placeholder tag:

choiceVerPeriod.setOutputMarkupPlaceholderTag(true);



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-setVisible-true-Action-not-Working-after-a-single-setVisible-false-tp4661281p4661282.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