public final void onSelectionChanged()
{
convert();
if(onSelectionChanged(getConvertedObject()))
{
updateModel();
}
}
On 8/30/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
Could you please add a feature request, so that we can change it when
we agree for 2.0 and 1.3?
To my knowledge, the model always has been updated from the start. And
I think that is good, though it would be better if it was optional
(but not manual).
Eelco
On 8/30/06, landtuna <[EMAIL PROTECTED]> wrote:
>
> Thanks for looking into this. Here's my ugly hack to get around the problem:
>
> DropDownChoice elevationSelect = new DropDownChoice("elevationSelect") {
>
> private float oldElevation = 0.0f;
>
> public List getChoices() {
> return ((HwddcState)
> parent.getModelObject()).getElevationList();
> }
>
> protected boolean wantOnSelectionChangedNotifications() {
> // The following is a hack to be able to record the
> // change from the old version. Unfortunately, the old
> // version is not available by the time
> // onSelectionChanged is called, so it needs to be saved
> // here.
> HwddcState hwddcState = (HwddcState) parent.getModelObject();
> oldElevation = hwddcState.getPpiImageParams().getElevation();
>
> return true;
> }
>
> protected void onSelectionChanged(final Object newSelection) {
> HwddcState hwddcState = (HwddcState) parent.getModelObject();
>
> final float oldElevation = this.oldElevation;
> ((PpiPage) getPage()).recordChange(new Change() {
> public void undo() {
> ((HwddcState)
> parent.getModelObject()).getPpiImageParams().setElevation(oldElevation);
> }
> });
>
> hwddcState.getPpiImageParams().setElevation((Float)
> newSelection);
> ((PpiPage) getPage()).updateMapImages();
> }
> };
>
> elevationSelect.setChoiceRenderer(new ElevationChoiceRenderer());
> boundModel.bind(elevationSelect, "ppiImageParams.elevation");
> add(elevationSelect);
>
>
> --
> View this message in context: http://www.nabble.com/DropDownChoice%27s-onSelectionChanged-called-too-late-tf2186138.html#a6058680
> Sent from the Wicket - User forum at Nabble.com.
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user