Hi,
>
> I've just committed the refactoring for the DatePickerPanel.
> The Panel is using Fragments now for switching between the accessible 
> mode and non-accessible mode with the same markupfile.
>
> The only problem is that you need to refresh the page when switching 
> the date with the datepicker. The same problem appears also
> when using AjaxLinks eg. in the DateSwitcherPanel. Links created with 
> an AjaxTabbedPanel works fine!
>
> Does anyone know how to resolve his?
>
> Thnx in advance
>
> Paul
>

I've had a similar problem with a RadioChoice with 
wantOnSelectionChangedNotifications. The notification is done using 
javascript so this doesn't work without javascript. To work around the 
problem I added a button to the page that is made invisible using 
javascript (so when you do have JS it's not visible):

<input type="submit" value="refresh" id="selectbutton" 
wicket:id="selectButton"/>
<script type="text/javascript">
    if(button = document.getElementById('selectbutton')){
        button.style.display = "none";
    }
</script>

There may be a smarter way to do this (preferably from Java code, anyone?).
You don't want the form to be submitted when this button is pressed so 
you have to set defaultFormProcessing to false. You do want all models 
to be updated, so you need to call process() when the button is pressed:

Button selectButton = new Button("selectButton") {
    @Override
    protected void onSubmit() {
        process();
    }
};
selectButton.setDefaultFormProcessing(false);
this.add(selectButton);

You still won't get onSelectionChanged events when you don't have JS, 
but you will get onModelChanged events in both cases.

I'm cc-ing this to the wicket-user list too as this may be of interest 
to other wicket users as well.

Matthijs

-- 
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500 


-------------------------------------------------------------------------
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
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to