I can't submit it because the user has to fill in some more fields.
Maybe I am wrong. There is nothing about submitting the form (async). I
will try that. The user then might fill in the rest...
Thanks,
Andy
Pedro Viegas schrieb:
Hi there Andy,
Why can't you submit the form like you say?
If you read the bottom comments on:
http://tapestry.apache.org/tapestry4.1/ajax/EventListener.html
You'll see that...
"When your
listener<http://tapestry.apache.org/tapestry4.1/UsersGuide/listenermethods.html>is
invoked you can be confident that your
projectSelect
Autocomplete<http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/dojo/form/Autocompleter.html>component
has also been updated to reflect the currently selected value.
As an added bonus, form validation is turned off by default with the
EventListener<http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html#EventListener>annotation
as the majority use case is likely to be one off individual
events where invoking client side validation would be a cumbersome
experience for users."
So, according to this there is no problem with the other fields being
submitted since the client validation will not be activated. So I think
you've got the answer all along. :-D
Regards,
On 8/28/06, Andy Pahne <[EMAIL PROTECTED]> wrote:
Currently I am playing with the new @EventListener feature and I like it
very much. That's how Ajax should be.
I have a question: in the form there are two @PropertySelection
components. The second one is supposed the change it's selected value
dependant on the first one. Both PropertySelections are connected to a
page property.
This is my listener:
@EventListener(events = "onchange", elements = "countrySelection")
public void countryChanged(IRequestCycle cycle) {
cycle.getResponseBuilder().updateComponent("regionSelection");
}
Submitting the form (asyn or not) like I saw in the TimeTracker demo
application is not an option because there are more form fields the user
is supposed to fill out. So this one will not work for me:
@EventListener(events = "onchange",
elements = "countrySelection" submitForm = "myForm")
public void countryChanged(IRequestCycle cycle) {
cycle.getResponseBuilder().updateComponent("regionSelection");
}
So: how can I access the value of the
[EMAIL PROTECTED]'s value that triggerd the listener
method? I think that the page property is not yet updated by my async
request because the form was not submitted.
Thanks,
Andy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Andy Pahne
Email [EMAIL PROTECTED]
Telefon +49 (721) 722 84 67
Mobil +49 (174) 171 68 70
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]