I want to change visibility attribute of a panel (containing other components) using Ajax.

The panel initially is hidden  panel.setVisible( false ).

When user change selection in a radio group the panel should become visible.

I've tried to do something like that :

radio.add( new AjaxFormComponentUpdatingBehavior("onclick") {
    protected void onUpdate(AjaxRequestTarget target) {
        panel.setVisible( true );
} );

But it don't work. Using the AJAX Debugger I could see that event is raised but it reports the following error:

ERROR: Component with id [[form1_panel]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update.
ERROR: error while processing response: [object Error].Object required

Obviuosly I used setOutputMarkupId(true) on panel.

Any idea why it don't work?

Thanks for helping.

- Paolo
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
Wicket-user mailing list

Reply via email to