I'm fairly new to Wicket and was wondering if there is a way to use AJAX to change the style of a WebMarkupContainer? Below is a snippet of my code:

        IModel sourceModel = new Model() {
            public Object getObject() {
                return sourceOptions;
            }
        };
final DropDownChoice source = new DropDownChoice("source", new PropertyModel(this, "sourceSelection"), sourceModel);
        source.add(new AjaxFormComponentUpdatingBehavior("onchange") {
            protected void onUpdate(AjaxRequestTarget target) {
variationMetricRow.add(new AttributeModifier ("style", true, new Model(sourceSelection.equals("CHOP_Normals") ? "display:block" : "display:none")));
                variationMetricRow.setOutputMarkupId(true);
                target.addComponent(variationMetricRow);
            }
        });

In this example, I would like to change the display to show/hide a particular component. Any help would be appreciated.

Thanks,
Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to