we could call validate() instead of convert()
but i don't know we we want that at that time. Because it is not really a submit...
(thats why it shouldn't really go into the model by default anyway)

And for this case required test is not really needed. And validators for a DropDownSelect (not form validators but the component validators itself)
mostly don't make any sense because there is not really a thing to validate (the options are preset)
(tampering of data not counted)

johan


On 8/30/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
still....where is the validation?

-Igor



On 8/30/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
if we can break a little bit more we could do something like this:

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




-------------------------------------------------------------------------
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

Reply via email to