there are several components in html that return multipy entries
for example ListMultiplyChoice (SELECT tag) or Checkboxes withing the same group.

convertedinput and rawinput are 2 completely seperate things.
rawinput really caches the raw string data. So that forms can render themselfs again without doing any validation or conversion.

ConvertedInput is only there when required check is ok and the conversion did work. After that the validators will be runned.

rawinput for example is used to cache some results between 2 page loads. With the help of an Button that has the DefaultFormProcessing boolean on false.


johan


On 5/9/06, Ittay Dror <[EMAIL PROTECTED]> wrote:
for me, it is hard to distinguish getInput from getInputAsArray. what use cases do you have of the returned array having more than 1 string? if that happens, why not use several components, each assigned an index, and still returning getInput (by getRequest().getParameters(name)[idx]).

returning object can still be nice to allow getting input which is not from http (e.g, maybe RMI based components?)

what about convertedInput and rawInput? their use is hard to track. why not just have getConvertedInput, which can cache the data if it wants

ittay

Johan Compagner wrote:
> Object?
> ughh
>
> Then we have to cast and or check for it everywhere. Because getInput()
> is used for a lot of things,
> What it could be is always and String[] but then we just have
> getInputAsArray()
> and i guess thats the method we should use as much as possible everywhere.
> which we already do for the convertValue and so on.
>
> if we fall to the Converter then we use plain getInput() but that is
> because for FormComponent
> that specify type the input is always pure text. And if we give to that
> an array. Then the converter
> will be much harder to build for people.
>
> So when input comes in.
> We use getInputAsArray() when components do the conversions themselfs
> If there is a type specified we let the converter handle the conversion
> fron String->Type
> and we use getInput()
>
> And we want to change the converter interface so that it is something
> like this:
>
> convertInput(String, Class);
> convertValue(Object);
>
> So that it is for developers much easier to build a converter and know
> what in and out going is.
> Maybe we could make a
> convertInput(String[], Class);
> instead then it is all type save. And we can use the getInputAsArray()
> everywhere.
>
> johan
>
> On 5/9/06, * Ittay Dror* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     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]>
>      > <mailto:[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] >
>      >     <mailto:[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]>
>     <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
>      >         +972-3-6081994 Fax: +972-3-6081841
>      >
>      >         http://www.openQRM.org <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>
>      >         <
>     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 >
>      >         <mailto: 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] <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