tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danny Angus <da...@apache.org>
Subject Re: IMPORTANT(usability/core logic for ajax): hijacking IMarkupWriter
Date Thu, 23 Feb 2006 11:02:17 GMT



"Jesse Kuhnert" <jkuhnert@gmail.com> wrote on 23/02/2006 04:45:34:

> The initial thought I'm having in regard to rendering "ajax" responses
back
> to client browsers is that all of the infrastructure/components in place
> already do an awful lot of work writing their very important content to
> IMarkupWriter, so why not use that to sort of bootstrap the abililty to
make
> your service JSON/XML/html-able?


We use (tap 3) IMarkupwriter to rewrite form names and form component names
for Oracle portal (9ias), and to add the original value of the "name" as
the value of the "id".
We've just extended that to also rewrite those same names in all script
refrences, inlcuding <script> and element attributes like event handlers
and URL's.
It also detects when the app is being called by portal and doesn't rewrite
at all when it isn't, meaning that our portlet apps can be developed stnad
alone and will Just Work (tm) when called by portal.

We've achieved all of this in around 300 lines of code, it is encapsulated
in a single markup writer and we haven't had to hack Tapestry in any way at
all.

Its a simple but wickedly powerful way to munge every piece of output from
any component.

I'd quite like to see Tapestry enforcing XHTML so that markup writers could
use XSLT. But just using indexOf and subString gives us extraordinary
power. Muahhahha.
The only two issue I have is that the contract for components is not strict
enough that we can reason that a markupwriter will work in all cases,
effectively because component developers have the freedom to come up with
any kind of raw output.



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message