To give one an impression, Here is a code snippet from our application:
/**
* sends an ajax action to focus the given field.
* @param formField
*/
protected void focus( IFormComponent formField ) {
this.getAjaxRenderer(true).add(
ResponseActionConstants.DO_DELEGATE_NODE,
new FormComponentIdRenderer( formField ),
"focus" );
}
The Response renderer renders an xml response.
The Javascript which processes this xml will do a lookup for the node
with the given ID (the ID is rendered into the response by the
FormComponentIDRenderer), and perform "focus()" on it.
This snippet can be easily done also by a tapestry script file - only it
would involve much more code.
Note that if after the "focus" additionaly IRenderer are passed to the
AjaxRenderer.add method, their rendering will be passed to the focus
method as parameters. Is this possible with 4.1 ?
Cheers,
Ron
Jesse Kuhnert wrote:
Hi Ron,
I definitely welcome any feedback people may have.
It's obvious that I haven't spent nearly as much time on components/widgets
as I have been on general infrastructure.
If you have a specific problem or two in mind I can try to come up with
solutions, but with only solutions I'm going to have a hard time
visualizing
everything properly.
Please feel free to chirp up with more specifics, I do value your input
very
much. (as you have been doing this for as long as I have I think ..)
On 8/22/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
Hi all -
The 4.1 version seems very exciting: the @EventListener annotation is
really cool and easy to use.
Currently I am working on a Project with a very extensive use of XHR
using Dojo and currently Tapestry 4.0
In evaluating 4.1 it seems to me, a great work has been done to enable
render and process XHRs - it seems to me however that some *abstraction*
and *extensibility* is missing.
Talking concrete:
The ResponseBuilder (Dojo, Default, JSON) are built around an Interface
that enables these three.
The Tapestry Javascript Response renderer (tapestry.load) handles a few
actions : JavaScript processing and "replace by id".
I would suggest making both response builder implementations and
tapestry.load more extendable, adding pluggable actions to both.
Cheers,
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]