Of course, but the goal of using a framework like Wicket is just that: avoid
having to write everything by myself. No?

So it is a suggestion to add in a future release. I think a lot of people
need that kind of functionality. If it could be generic enough.

I think Ajax is rarely used to submit a form. It is more to make it dynamic.
Like adapting the form content based on other fields values. I can see tons
of examples for that.
It would be very nice to be able to do that kind of stuff without having to
rewrite part of the code ourselves.

I I find time to write it myself I will be glad to give my code to the
Wicket team...

Thierry


On Tue, Jul 7, 2009 at 15:40, Igor Vaynberg <igor.vaynb...@gmail.com> wrote:

> you can see how the submit behavior does it and replicate the parts
> you need. all these things are not using some magical internal apis.
> you are meant to build your own things when the default
> implementations do not do what you want.
>
> -igor
>
> On Tue, Jul 7, 2009 at 6:35 AM, Thierry Leveque<tleve...@gmail.com> wrote:
> > Thanks, but I was not talking about using the submit behavior.
> >
> > I was talking about the way to create my own ajax behavior to send the
> value
> > of multiple form fields.
> >
> > I think this should be part of Wicket. It is not the first time I
> encounter
> > this problem. The first time, I found a workaround but this time I am
> stuck.
> > There should be a simple way to create an ajax behavior that will send
> the
> > values from the form components we want. Maybe with the option to
> validate
> > them or not.
> > What do you think?
> >
> > Thierry
> >
> >
> > 2009/7/7 Stefan Malmesjö <s.m.mo...@gmail.com>
> >
> >> I just realized that maybe you need to extend your validators, too, at
> >> least if you want your modelobject to be updated. And how you do that on
> a
> >> textfield that is required, I don't really know.
> >>
> >> Maybe that path is too complicated.
> >>
> >> /Stefan
> >>
> >> On 2009-07-06 22:55, Stefan Malmesjö wrote:
> >>
> >>> Could setting visibility for the FeedbackPanel to false until the form
> has
> >>> been "properly" submitted with a press of a submit button work?
> >>>
> >>> /Stefan
> >>>
> >>> On Mon, Jul 6, 2009 at 8:42 PM, Thierry Leveque <tleve...@gmail.com
> <mailto:
> >>> tleve...@gmail.com>> wrote:
> >>>
> >>>    Any following on that?
> >>>
> >>>    Daniel, have you been able to solve your problem? Did you wrote
> >>>    your own
> >>>    behavior?
> >>>
> >>>    I have the same requirement as you and I am trying to find a quick
> >>>    way to
> >>>    solve my problem.
> >>>
> >>>    Can someone point me to some examples on how to write my own Ajax
> >>>    behavior?
> >>>
> >>>    Thanks
> >>>
> >>>    Thierry
> >>>
> >>>
> >>>    On Tue, Jun 2, 2009 at 12:21, Igor Vaynberg
> >>>    <igor.vaynb...@gmail.com <mailto:igor.vaynb...@gmail.com>> wrote:
> >>>
> >>>    > well, if you do not want to *submit* the form then dont use
> >>>    > ajaxformSUBMITbehavior :)
> >>>    >
> >>>    > with little work you can roll your own behavior that does a simple
> >>>    > ajax get and appends whatever values you need from formcomponents
> to
> >>>    > the url. that way the form is not submitted and you have access
> >>>    to the
> >>>    > raw values.
> >>>    >
> >>>    > -igor
> >>>    >
> >>>    >
> >>>    >
> >>>    > On Tue, Jun 2, 2009 at 9:16 AM, dfernandez
> >>>    > <dfernan...@users.sourceforge.net
> >>>    <mailto:dfernan...@users.sourceforge.net>> wrote:
> >>>    > >
> >>>    > >
> >>>    > > Yes, I know it is tricky, but the fact is I don't think I
> >>>    would really
> >>>    > need
> >>>    > > type conversion in this case.
> >>>    > >
> >>>    > > I will try to explain myself. I have the following UI:
> >>>    > >
> >>>    > >    |OPERATOR |V|
> >>>    > >
> >>>    > >    |INPUT1="aBc"        |     |INPUT2="DeF"          |
> >>>    > >
> >>>    > > ...being "OPERATOR" the DropDownChoice, and both INPUT1 and
> >>>    INPUT2 two
> >>>    > > TextFields (String TextFields, to be precise). Both INPUT1 and
> >>>    INPUT2 are
> >>>    > > required (when they are visible, of course).
> >>>    > >
> >>>    > > When I change the value on "OPERATOR", the UI will change,
> >>>    hiding INPUT1
> >>>    > and
> >>>    > > INPUT2 but showing INPUT3, another TextField which should have
> >>>    the same
> >>>    > > contents that were on INPUT1 before:
> >>>    > >
> >>>    > >    |OPERATOR |V|
> >>>    > >
> >>>    > >    |INPUT3="aBc"        |
> >>>    > >
> >>>    > > The problem is that, when changing OPERATOR, I need to read
> >>>    the value
> >>>    > from
> >>>    > > INPUT1 to set it into INPUT3, but if INPUT2 is empty I will
> >>>    receive a
> >>>    > > validation message telling me that it is required... which it
> >>>    is, but I
> >>>    > just
> >>>    > > want Wicket to validate that when I want to *really* submit
> >>>    the form, and
> >>>    > > not now that I am only changing the operator.
> >>>    > >
> >>>    > > Thanks.
> >>>    > >
> >>>    > > Regards,
> >>>    > > Daniel.
> >>>    > >
> >>>    > >
> >>>    > >
> >>>    > >
> >>>    > >
> >>>    > > igor.vaynberg wrote:
> >>>    > >>
> >>>    > >> how are you planning on reading the other values? you cannot
> >>>    access
> >>>    > >> the model so you will have to call getinput(), are you also
> >>>    planning
> >>>    > >> on doing type conversion yourself then?
> >>>    > >>
> >>>    > >> -igor
> >>>    > >>
> >>>    > >> 2009/6/2 Daniel Fernández <dfernan...@users.sourceforge.net
> >>>    <mailto:dfernan...@users.sourceforge.net>>:
> >>>
> >>>    > >>> Hello,
> >>>    > >>>
> >>>    > >>> I have a form with a DropDownChoice, on which "onchange"
> >>>    event I want
> >>>    > to
> >>>    > >>> update some form components. But I need to read data from
> >>>    other fields
> >>>    > of
> >>>    > >>> the form for doing so, and so I added an
> >>>    AjaxFormSubmitBehavior to the
> >>>    > >>> DropDownChoice.
> >>>    > >>>
> >>>    > >>> My intention is to read the data from the drop down and from
> >>>    the other
> >>>    > >>> fields, and depending on these data, update some other
> >>>    components...
> >>>    > but
> >>>    > >>> the
> >>>    > >>> problem is that AjaxFormSubmitBehavior not only sends the
> >>>    form data,
> >>>    > but
> >>>    > >>> also *validates it*, which I don't want (I don't want
> validation
> >>>    > messages
> >>>    > >>> to
> >>>    > >>> appear when changing the value of the drop down).
> >>>    > >>>
> >>>    > >>> If it where an AjaxButton I would be able to just
> >>>    > >>> setDefaultFormProcessing(false), but I don't see anything
> >>>    like that in
> >>>    > >>> AjaxFormSubmitBehavior...
> >>>    > >>>
> >>>    > >>> Is there a way to do this?
> >>>    > >>>
> >>>    > >>> Regards,
> >>>    > >>> Daniel.
> >>>    > >>>
> >>>    > >>
> >>>    > >>
> >>>
>  ---------------------------------------------------------------------
> >>>    > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>>    <mailto:users-unsubscr...@wicket.apache.org>
> >>>    > >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>    <mailto:users-h...@wicket.apache.org>
> >>>    > >>
> >>>    > >>
> >>>    > >>
> >>>    > >
> >>>    > > --
> >>>    > > View this message in context:
> >>>    >
> >>>
> >>>
> http://www.nabble.com/Can-I-make-AjaxFormSubmitBehavior-submit-raw-form-data-but-not--validate-it--tp23830542p23835836.html
> >>>    > > Sent from the Wicket - User mailing list archive at Nabble.com.
> >>>    > >
> >>>    > >
> >>>    > >
> >>>
>  ---------------------------------------------------------------------
> >>>    > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>>    <mailto:users-unsubscr...@wicket.apache.org>
> >>>    > > For additional commands, e-mail: users-h...@wicket.apache.org
> >>>    <mailto:users-h...@wicket.apache.org>
> >>>    > >
> >>>    > >
> >>>    >
> >>>    >
> >>>
>  ---------------------------------------------------------------------
> >>>    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>>    <mailto:users-unsubscr...@wicket.apache.org>
> >>>    > For additional commands, e-mail: users-h...@wicket.apache.org
> >>>    <mailto:users-h...@wicket.apache.org>
> >>>    >
> >>>    >
> >>>
> >>>
> >>>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to