i don't see why there should be a getInputAsArray. it seems to me there should 
be an 'Object getInput()', which will usually return 
getRequest().getParameter(getInputName()), but for some components, that for 
some reason require multiple inputs, it will return  
getRequest().getParameters(getInputName())

then, if there needs to be a conversion from that object to a String (which i 
don't see why), then the converter needs to take care of it.



Johan Compagner wrote:
rawinput should also be a string[] but the problem is if we change that then getValue()/getRawInput() and maybe als getModelValue all should also change and that will affect a lot...

johan


On 5/9/06, *Igor Vaynberg* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    i was just looking at that. i think we messed up a little bit there.
    now that getinputasarray() is public i made getinput() go through
    that instead of request parameters directly.

    -Igor



    On 5/8/06, *Ittay Dror* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:

        on the off chance that not only igor is patient with this thread....

        i noticed that there is an inconsistency (in my view) in how
        input is handled:
        there's Component.getInput()
        then FormComponent.inputAsStringArray ()
        which is used to set
          convertedInput - by convert()
        and
          rawInput - by inputChanged()

        which are used all over the place. for example, getValue returns
        the rawInput if it was set and getModelValue otherwise (which,
        btw, uses the converter directly, rather than calling
        convert()). this may cause surprises.

        for convertedInput, i think it should be considered a caching
        value. the method getConvertedInput() should check it, if it is
        null, it does the conversion and sets it. it then returns it.
        calling 'convert' explicitely from other places is not needed.
        whoever needs a converted input should call getConvertedInput.

        i don't know about rawInput, and why it is used, so i can't
        comment much, but i also think it should be used as cached
        value. it seems odd though, that getInput is not 'raw' enough.

        of course inputChanged should just invalidate the caches.

        ittay



        Ittay Dror wrote:
        >
        >
        >  Ittay Dror wrote:
        > >
        > >
        > > Ittay Dror wrote:
        > >>
        > >>
        > >> Igor Vaynberg wrote:
        > >>>     and how do i validate the resulting value? in
        updateModel, if i
        > >>> find
        > >>>     the combined value is not right, there's not much i can do.
        > >>>
        > >>> you mean the sum of correct pieces is not always correct
        itself?!?
        > >>> you can create a validator that performs the same
        aggregation and
        > >>> checks that i suppose.
        > >>>
        > >>>     also, there's a convert() method in Component, what if
        i want it to
        > >>>     be employed also?
        > >>>
        > >>>
        > >>> if you want the whole form workflow to be employed then go
        about
        > >>> this differently. instead of overriding updatemodel() override
        > >>> getInput(), aggregate all the raw inputs from all the
        children and
        > >>> use that to feed the aggregator. that way you get the whole
        workflow.
        > >>
        > >> yep, and also inputAsStringArray
        > >
        > > oops, cannot do that. it is final. maybe i can override
        getRequest...
        >
        >  no, getRequest is also final.
        >
        > >
        > >>
        > >> thank you for your patience
        > >>
        > >> ittay
        > >>
        > >>>
        > >>> -Igor
        > >>>
        > >>
        > >>
        > >
        > >
        >
        >


        --
        ===================================
        Ittay Dror
        Chief architect, openQRM TL,
        R&D, Qlusters Inc.
        [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
        +972-3-6081994 Fax: +972-3-6081841

        http://www.openQRM.org
        - Keeps your Data-Center Up and Running


        -------------------------------------------------------
        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
        
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
        _______________________________________________
        Wicket-user mailing list
        Wicket-user@lists.sourceforge.net
        <mailto:Wicket-user@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/wicket-user
        <https://lists.sourceforge.net/lists/listinfo/wicket-user>





--
===================================
Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


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